id
int64
0
45.1k
file_name
stringlengths
4
68
file_path
stringlengths
14
193
content
stringlengths
32
9.62M
size
int64
32
9.62M
language
stringclasses
1 value
extension
stringclasses
6 values
total_lines
int64
1
136k
avg_line_length
float64
3
903k
max_line_length
int64
3
4.51M
alphanum_fraction
float64
0
1
repo_name
stringclasses
779 values
repo_stars
int64
0
882
repo_forks
int64
0
108
repo_open_issues
int64
0
90
repo_license
stringclasses
8 values
repo_extraction_date
stringclasses
146 values
sha
stringlengths
64
64
__index_level_0__
int64
0
45.1k
exdup_ids_cmlisp_stkv2
sequencelengths
1
47
38,116
personagem-arma.lsp
tictackode_My-firsts-Commom-Lisp-Codes/personagem-arma.lsp
;declara um par personagem-arma (defparameter x1 '(arqueiro (arco))) (defun arma(lista)(last lista)) (defun perso(lista)(first lista))
135
Common Lisp
.l
4
32.75
36
0.763359
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
9c48ea7bd29e146659831a6440728cfb71a253754461f323809fa018dcdabb56
38,116
[ -1 ]
38,117
lista1PythonBrasil.lsp
tictackode_My-firsts-Commom-Lisp-Codes/lista1PythonBrasil.lsp
; Lista 1 do site Python brasil - Regson ; 1-Faça um Programa que mostre a mensagem "Alo mundo" na tela. (defun ola-mundo()(format t"Olá Mundo!")) ; 2-Faça um Programa que peça um número e então mostre a mensagem O número informado foi [número]. (defun numero()(format t "Digite um numero")(setq n (read))(format t"O numero digitado foi ~D~%"n)) ;3-Faça um Programa que peça dois números e imprima a soma. (defun soma()(format t"Digite o primeiro numero: ")(setq num1 (read)) (format t"Digite o segundo numero: ")(setq num2 (read)) (format t"A soma é ~D~%" (+ num1 num2))) ; 4-Faça um Programa que peça as 4 notas bimestrais e mostre a média. (defun media()(format t"Digite a primeira nota: ")(setq n1 (read)) (format t"Digite a segunda nota: ")(setq n2 (read)) (format t"Digite a terceira nota ")(setq n3 (read)) (format t"Digite a quarta nota: ")(setq n4 (read)) (format t"A media e ~F~%" ( / (+ n1 n2 n3 n4) 4.0))) ; 5-Faça um Programa que converta metros para centímetros. (defun m-to-cm()(format t"Digite uma medida em metros:")(setq x (read)) (format t"~F~% centimetros" ( * x 100))) ;6-Faça um Programa que peça o raio de um círculo, calcule e mostre sua área. (defun circulo()(format t"Insira o raio do circulo: ")(setq r (read)) (format t"A area é ~F~%" (* 3.14 ( * r r)))) ;7-Faça um Programa que calcule a área de um quadrado, em seguida mostre o dobro desta área para o usuário. (defun quadrado()(format t"Digite o lado do quadrado")(setq lado (read)) (format t"O dobro da area é ~F~%" (* 2 (* lado lado)))) ;8-Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. ;Calcule e mostre o total do seu salário no referido mês. (defun salario()(format t"Quanto ganha por hora?")(setq por-hora (read)) (format t"Quantas horas foram trabalhadas no mes?")(setq horas-mes (read)) (format t"Salario do mes ~F~%" (* por-hora horas-mes))) ;9-Faça um Programa que peça a temperatura em graus Farenheit, transforme e mostre a temperatura em graus Celsius. ;C = (5 * (F-32) / 9). (defun far-to-c()(format t" Digite a temperatura em farenheit")(setq f (read)) (format t"Em Celsius: ~F~%" (/ (* 5 (- f 32)) 9))) ; 10-Faça um Programa que peça a temperatura em graus Celsius, transforme e mostre em graus Farenheit. conferir a equacao!! (defun c-to-far()(format t" Digite a temperatura em Celsius:")(setq c (read)) (format t"Em Fahrenheit: ~F~%" (+ (/ (* 9 c) 5) 32))) ; 11-Faça um Programa que peça 2 números inteiros e um número real. Calcule e mostre: ;o produto do dobro do primeiro com metade do segundo . ;a soma do triplo do primeiro com o terceiro. ;o terceiro elevado ao cubo.O terceiro elevado ao cubo (defun ex11()(format t"Digite o primeiro numero inteiro: ")(setq int1 (read)) (format t"Digite o segundo numero inteiro: ")(setq int2 (read)) (format t"Digite o numero real: ")(setq real (read)) (format t"Produto do dobro do primeiro com a metade do segundo ~F~%" (* (* 2 int1) (/ int2 2))) (format t"Soma do triplo do primeiro com o terceiro ~F~%" ( + (* 3 int1) real)) (format t "O terceiro elevado ao cubo ~F~%" (* real real real))) ;12-Tendo como dados de entrada a altura de uma pessoa, construa um algoritmo que calcule seu peso ideal, ; usando a seguinte fórmula: (72.7*altura) - 58 (defun peso-ideal()(format t"Digite a altura: ")(setq altura (read)) (format t"Peso ideal ~F~%" (- (* 72.7 altura) 58))) ;13-Tendo como dados de entrada a altura e o sexo de uma pessoa, construa um algoritmo que calcule seu peso ideal, ; utilizando as seguintes fórmulas: ;Para homens: (72.7*h) - 58 ;Para mulheres: (62.1*h) - 44.7 (h = altura) ;Peça o peso da pessoa e informe se ela está dentro, acima ou abaixo do peso. (defun peso-ideal2()(format t"Digite a altura: ")(setq altura (read)) (format t"Digite m para masculino e f para feminino")(setq sexo (read))(format t"Digite o peso")(setq peso (read)) (cond ((eql sexo 'm)(cond ((> peso (- (* 72.7 altura) 58))(format t"Acima do peso!")) ((< peso (- (* 72.2 altura) 58))(format t"Dentro do peso!")))) ((eql sexo 'f)(cond ((> peso (- (* 62.1 altura) 44.7))(format t"Acima do peso!")) ((< peso (- (* 62.1 altura) 44.7))(format t"Dentro do peso!")))))) ;14-João Papo-de-Pescador, homem de bem, comprou um microcomputador para controlar o rendimento diário de seu trabalho. ; Toda vez que ele traz um peso de peixes maior que o estabelecido pelo regulamento de pesca do estado de São Paulo ; (50 quilos) deve pagar uma multa de R$ 4,00 por quilo excedente. João precisa que você faça um programa que leia ; a variável peso (peso de peixes) e verifique se há excesso. Se houver, gravar na variável excesso e na variável multa ; o valor da multa que João deverá pagar. Caso contrário mostrar tais variáveis com o conteúdo ZERO. (defun peixes()(format t"Digite o peso dos peixes: ")(setq peso (read)) (cond ((< peso 50)(format t" Não há multa!")) ((> peso 50)(format t"Valor da multa: ~F~%" (* (- peso 50) 4.00))))) ; 15-Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o total do seu salário no referido mês, sabendo-se que são descontados 11% para o Imposto de Renda, 8% para o INSS e 5% para o sindicato, faça um programa que nos dê: ;salário bruto. ;quanto pagou ao INSS. ;quanto pagou ao sindicato. ;o salário líquido. ;calcule os descontos e o salário líquido, conforme a tabela abaixo: ;+ Salário Bruto : R$ ;- IR (11%) : R$ ;- INSS (8%) : R$ ;- Sindicato ( 5%) : R$ ;= Salário Liquido : R$ ;Obs.: Salário Bruto - Descontos = Salário Líquido. (defun salario()(format t"Quanto ganha por hora?")(setq por-hora (read)) (format t"Digite o numero de horas trabalhadas: ")(setq num-horas (read)) (setq bruto (* por-hora num-horas))(setq IR ( * bruto 0.11)) (setq INSS (* bruto 0.08))(setq sindicato (* bruto 0.05)) (format t"+ Salário Bruto : R$ ~F~%" bruto) (format t"- IR (11%) : R$ ~F~%" IR) (format t"- INSS (8%) : R$ ~F~%" INSS) (format t"- Sindicato (5%) : R$ ~F~%" sindicato) (format t"=Salário Liquido : R$ ~F~%" (- bruto (+ IR INSS sindicato)))) ; 16-Faça um programa para uma loja de tintas. O programa deverá pedir o tamanho em metros quadrados ; da área a ser pintada. Considere que a cobertura da tinta é de 1 litro para cada 3 metros quadrados ; e que a tinta é vendida em latas de 18 litros, que custam R$ 80,00. Informe ao usuário a quantidades ; de latas de tinta a serem compradas e o preço total. (defun loja-tintas()(format t"Informe o tamanho da da area a ser pintada:" ) (setq area (read))(setq num-latas (/ (/ area 3.0) 18.0)) (format t"Numero de latas de tintas ~F~%" num-latas) (format t"Preço total: ~F~%" (* num-latas 80.00))) ; 17-Faça um Programa para uma loja de tintas. O programa deverá pedir o tamanho em metros quadrados ;da área a ser pintada. Considere que a cobertura da tinta é de 1 litro para cada 6 metros quadrados ; e que a tinta é vendida em latas de 18 litros, que custam R$ 80,00 ou em galões de 3,6 litros, que custam R$ 25,00. ;Informe ao usuário as quantidades de tinta a serem compradas e os respectivos preços em 3 situações: ;comprar apenas latas de 18 litros; ;comprar apenas galões de 3,6 litros; ;misturar latas e galões, de forma que o preço seja o menor. Acrescente 10% de folga e sempre arredonde ;os valores para cima, isto é, considere latas cheias. ; funcoes auxiliares (defun calcula-latas(area)(setq num-latas (/ (/ area 6.0) 18.0)) (format t"Situação 1-Numero de latas de tintas ~F~%" num-latas)) (defun calcula-latasr(area) (/ (/ area 6.0) 18.0)) ; recebe uma area e devolve o numero de latas (defun resto(x)(- x (floor x))) ; retorna a parte apos a virgula de um numero real) (defun litros-restantes-lata(x)(* (resto x) 18)) (defun calcula-galoes(x)(format t"Situacao 2- Numero de galoes ~F~%" (/ (/ area 6.0) 3.6))) (defun situacao3(area)(format t"Situacao3- Serao usados ~F~% latas " (floor (calcula-latasr area))) (format t" e ~F~% galoes "(floor (/ (litros-restantes-lata (calcula-latasr area)) 3.6)))) ; exercicio completo (defun loja-tintas2()(format t"Informe o tamanho da da area a ser pintada:" ) (setq area (read))(calcula-latas area)(calcula-galoes area) (situacao3 area)) ;18-Faça um programa que peça o tamanho de um arquivo para download (em MB) e a velocidade de um link de ;Internet (em Mbps), calcule e informe o tempo aproximado de download do arquivo usando este link (em minutos). (defun download-speed()(format t"Digite o tamanho do arquivo em MB : ")(setq tam (read)) (format t"Digite a velocidade da conexão em Mbps: ")(setq vel (read)) (format t" O tempo estimado é de ~F~% minutos" (/ ( / tam (/ vel 10)) 60 )))
9,416
Common Lisp
.l
124
68.330645
285
0.64805
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
0155a70117833b9c01efa16f282bb52b170879c9b1bc5ef37e2a30d799a70f8b
38,117
[ -1 ]
38,118
video1.lsp
tictackode_My-firsts-Commom-Lisp-Codes/video1.lsp
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. ; primeiro video... dizer video nao aula... -- mostrar link pra baixar emacs ; listProcessing , lista principal estrutura de dados ; notacao prefixada e operadores aritmeticos - ctrl j avalia a expressao (+ 1 2) 3 (+ 1 2 3 4 5 6 7 8) 36 ( / (+ 20 10) 2) 15 'john ; quote devolve o simbolo , sem quote avalia o simbolo john '(uva pera maca) ; devolve uma lista , sem o quote gera erro pois o interpretad or vai entender que uva e uma funcao (list '(uva pera) '(maca banana)) ; a funcao list retorna uma lista com os argu mentos (last '(laranja limao mamao)) (mamao) (car '(laranja limao mamao)) laranja (cdr '(laranja limao mamao)) (limao mamao)
929
Common Lisp
.l
22
39.818182
137
0.681507
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
445285d10d70e09bc03409ac88e7dcc106c6a59e3e72c459205f188db70e85c8
38,118
[ -1 ]
38,119
retangulo.lsp~
tictackode_My-firsts-Commom-Lisp-Codes/retangulo.lsp~
(defun retangulo()(print"Digite o lado a do retangulo: ")(setf ladoA (read)) (print"Digite o segundo lado do retangulo: ")(setf ladoB (read))(print"O perimetro é: ")(+(* ladoA 2)(* ladoB 2)) (print"A area é: ")(* ladoA ladoB))
231
Common Lisp
.l
3
74.666667
115
0.662281
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
40339d9f435a5edd88df207a341e2177a0413172432e9fdeb7d5d802f3f271d4
38,119
[ -1 ]
38,120
Lista2_PythonBrasil.lsp
tictackode_My-firsts-Commom-Lisp-Codes/Lista2_PythonBrasil.lsp
; Lista 2 Python Brasil - Regson ;1-Faça um Programa que peça dois números e imprima o maior deles. (defun maior()(format t"Digite um numero: ")(setq n1 (read)) (format t"Digite outro numero: ")(setq n2 (read)) (cond ((> n1 n2)(format t"O maior numero é ~F~%" n1)) ((< n1 n2)(format t" O maior numero é ~F~%" n2)))) ;2-Faça um Programa que peça um valor e mostre na tela se o valor é positivo ou negativo. (defun pos-neg()(format t"Digite um numero: ")(setq num (read)) (cond ((minusp num)(format t"O número é negativo!")) ((plusp num)(format t"O número é positivo!")) ((zerop num)(format t"o número é zero!")))) ;3-Faça um Programa que verifique se uma letra digitada é "F" ou "M". Conforme a letra escrever: ; F - Feminino, M - Masculino, Sexo Inválido. (defun sexo()(format t" Digite m para masculino e f para feminino: ")(setq sexo (read)) (cond ((eql sexo 'm)(format t"Masculino")) ((eql sexo 'f)(format t"Feminino")) (t (format t"Sexo Inválido!")))) ;4-Faça um Programa que verifique se uma letra digitada é vogal ou consoante. (defun vogal-consoante()(format t"Digite uma letra: ")(setq letra (read)) (cond ((eql letra 'a)(format t"Vogal!")) ((eql letra 'e)(format t"Vogal!")) ((eql letra 'i)(format t"Vogal!")) ((eql letra 'o)(format t"Vogal!")) ((eql letra 'u)(format t"Vogal!")) ( t (format t"Consoante!")))) ;5-Faça um programa para a leitura de duas notas parciais de um aluno. ;O programa deve calcular a média alcançada por aluno e apresentar: ;A mensagem "Aprovado", se a média alcançada for maior ou igual a sete; ;A mensagem "Reprovado", se a média for menor do que sete; ;A mensagem "Aprovado com Distinção", se a média for igual a dez. (defun notas()(format t"Digite a primeita nota: ")(setq nota1 (read)) (format t"Digite a segunda nota: ")(setq nota2 (read))(setq final (/ (+ nota1 nota2) 2)) (cond ((AND (>= final 7) (< final 10)) (format t"Aprovado!")) ((< final 7)(format t"Reprovado!")) ((> final 10)(format t"Notas inválidas: Valores acima de 10")) ((equalp final 10)(format t"Aprovado com Distinção!")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; firt use o let (let ((x 2))(print x)) (defun sum()(print "Type the first number:") (let ((num1 (read))) (print "Type the second number:") (let ((num2 (read))) (format t "The sum is ~F~%" (+ num1 num2)))))
2,965
Common Lisp
.l
44
51.931818
103
0.533544
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
b054597ba2596ef3f5c0e2e25e5ff6b5f72e417c9f124544ce59096cf1485d28
38,120
[ -1 ]
38,121
retangulo.lsp
tictackode_My-firsts-Commom-Lisp-Codes/retangulo.lsp
(defun retangulo()(print"Digite o lado a do retangulo: ")(setf ladoA (read)) (print"Digite o segundo lado do retangulo: ")(setf ladoB (read))(setf per (+ (* ladoA 2) (* ladoB 2)))(format t"O perimetro é: ~D~%"per) (setf area (* ladoA ladoB))(format t"A area é: ~D"area))
275
Common Lisp
.l
3
89.333333
138
0.658088
tictackode/My-firsts-Commom-Lisp-Codes
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
7f8cfb613ca35d546c98186de65e112abada5c45d96f14fd468234d7678ab135
38,121
[ -1 ]
38,157
dataset.lisp
ThinCharm_artificial-intelligence/src/dataset.lisp
(defclass dataset () (:documentation "The base class of dataset handling."))
79
Common Lisp
.lisp
2
37.5
57
0.74026
ThinCharm/artificial-intelligence
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
a5df97b3f1392e0154bee74a9bb733581c052b45a684d1f7fefb6c5b1db89088
38,157
[ -1 ]
38,159
.travis.yml
ThinCharm_artificial-intelligence/.travis.yml
language: common-lisp sudo: required install: - curl -L https://raw.githubusercontent.com/snmsts/roswell/release/scripts/install-for-ci.sh | sh script: - ros -s prove -e '(or (prove:run :quri-test) (uiop:quit -1))'
223
Common Lisp
.l
6
34.833333
101
0.718894
ThinCharm/artificial-intelligence
0
0
0
GPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
e67078a0c5f9ac1dafe85f4f2f6a20eaf90b4941bad39079eeeb4c2c72b638d9
38,159
[ -1 ]
38,175
app.lisp
mohe2015_schule/app.lisp
(quicklisp-client:quickload :schule) (defpackage schule.app (:use :cl) (:import-from :lack.builder :builder) (:import-from :ppcre :scan :regex-replace) (:import-from :schule.web :*web*) (:import-from :schule.config :config :productionp :*static-directory*)) (in-package :schule.app) (builder (if (productionp) nil :accesslog) (if (getf (config) :error-log) `(:backtrace :output ,(getf (config) :error-log)) nil) :session :csrf (if (productionp) nil (lambda (app) (lambda (env) (let ((mito.logger:*mito-logger-stream* t)) (funcall app env))))) *web*)
626
Common Lisp
.lisp
23
22.913043
74
0.640133
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
b9f808858f4c6766fa5f42cf366a35c004e30bfd8338da9bd06a355dd0adce52
38,175
[ -1 ]
38,176
math.lisp
mohe2015_schule/js/math.lisp
(var __-p-s_-m-v_-r-e-g) (i "./utils.lisp" "all" "one" "clearChildren") (export (defun render-math () (chain (all ".formula") (for-each (lambda () (chain -math-live (render-math-in-element this))))) (on ("summernote.init" (one "article") event) (chain (one ".formula") (attr "contenteditable" f))))) (export (defun revert-math (dom) (chain dom (query-selector-all ".formula") (for-each (lambda () (setf (@ this inner-h-t-m-l) (concatenate 'string "\\( " (chain -math-live (get-original-content this)) " \\)")))))))
587
Common Lisp
.lisp
17
29.294118
76
0.577739
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
5f37ace75ec73bf5df00704bd7b7874b7c7966e4b4b9c01c094d5e4e6262fffb
38,176
[ -1 ]
38,177
get-url-parameter.lisp
mohe2015_schule/js/get-url-parameter.lisp
(i "./utils.lisp" "all" "one" "clearChildren") (export (defun get-url-parameter (param) (let* ((page-url (chain window location search (substring 1))) (url-variables (chain page-url (split "&")))) (loop for parameter-name in url-variables do (setf parameter-name (chain parameter-name (split "="))) (if (= (chain parameter-name 0) param) (return (chain parameter-name 1)))))))
997
Common Lisp
.lisp
15
24.133333
89
0.266599
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
3f245a9c7fea51f3ab1fa6bc1e1984f1fe3dec080a8c0d41e475c30106e5889b
38,177
[ -1 ]
38,178
root.lisp
mohe2015_schule/js/root.lisp
(var __-p-s_-m-v_-r-e-g) (i "./state-machine.lisp" "replaceState") (i "./utils.lisp" "all" "one" "clearChildren") (defroute "/" (remove-class (all ".edit-button") "disabled") (replace-state "/wiki/Hauptseite"))
219
Common Lisp
.lisp
6
34.166667
50
0.635071
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
b602c1ea47b7065f45894e0caed6e4ef69ef3708d744d9169bd4254d232ddddc
38,178
[ -1 ]
38,179
editor.lisp
mohe2015_schule/js/editor.lisp
(var __-p-s_-m-v_-r-e-g) (i "./editor-lib.lisp") (i "./math.lisp" "revertMath") (i "./read-cookie.lisp" "readCookie") (i "./state-machine.lisp" "pushState") (i "./utils.lisp" "all" "one" "clearChildren") (i "./fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (on ("click" (one "#publish-changes") event) (setf (disabled (one "#publish-changes")) t) (let ((change-summary (value (one "#change-summary"))) (temp-dom (chain (one "article") (clone-node t))) (article-path (chain window location pathname (split "/") 2)) (formdata (new (-form-data)))) (revert-math temp-dom) (var categories (chain (all ".closable-badge-label" (one "#modal-settings")) (map (lambda (category) (chain category inner-text))))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain formdata (append "summary" change-summary)) (chain formdata (append "html" (inner-html temp-dom))) (loop for category in categories do (chain formdata (append "categories[]" category))) (chain (fetch (concatenate 'string "/api/wiki/" article-path) (create method "POST" body formdata)) (then check-status) (then (lambda (data) (hide-modal (one "#modal-publish-changes")) (push-state (concatenate 'string "/wiki/" article-path)))) (catch (lambda (error) (setf (disabled (one "#publish-changes")) nil) (handle-fetch-error error)))))) (export (defun show-editor () (remove-class (one "#editor") "d-none") (setf (content-editable (one "article")) t) (if (= (inner-html (one "article")) "") (setf (inner-html (one "article")) "<p></p>")) (add-class (one ".article-editor") "fullscreen") (chain document (exec-command "defaultParagraphSeparator" f "p")))) (export (defun hide-editor () (add-class (one "#editor") "d-none") (setf (content-editable (one "article")) f) (remove-class (one ".article-editor") "fullscreen")))
2,061
Common Lisp
.lisp
43
40.953488
138
0.606256
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
198b622e909c3970dcdec895b9b4a96c9a68b70638c20f38a3daa8d15a69ded6
38,179
[ -1 ]
38,180
login.lisp
mohe2015_schule/js/login.lisp
(var __-p-s_-m-v_-r-e-g) (i "./get-url-parameter.lisp" "getUrlParameter") (i "./read-cookie.lisp" "readCookie") (i "./state-machine.lisp" "replaceState") (i "./show-tab.lisp" "showTab") (i "./utils.lisp" "all" "one" "clearChildren") (i "./fetch.lisp" "checkStatus" "json" "html" "handleFetchError" "handleLoginError") (defroute "/login" (add-class (all ".edit-button") "disabled") (hide-modal (one "#modal-publish-changes")) (let ((url-username (get-url-parameter "username")) (url-password (get-url-parameter "password"))) (if (and (not (undefined url-username)) (not (undefined url-password))) (progn (setf (value (one "#inputName")) (decode-u-r-i-component url-username)) (setf (value (one "#inputPassword")) (decode-u-r-i-component url-password))) (if (not (undefined (chain window local-storage name))) (progn (replace-state "/wiki/Hauptseite") (return)))) (show-tab "#login") (setf (display (style (one ".login-hide"))) "none !important") (remove-class (one ".navbar-collapse") "show"))) (on ("submit" (one "#login-form") event) (chain event (prevent-default)) (let ((login-button (one "#login-button"))) (setf (disabled login-button) t) (setf (inner-html login-button) "<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span> Anmelden...") (login-post f))) (defun login-post (repeated) (let* ((form-element (one "#login-form")) (form-data (new (-form-data form-element))) (login-button (one "#login-button")) (input-name (one "#inputName"))) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/login" (create method "POST" body form-data)) (then check-status) (then (lambda (data) (setf (disabled login-button) f) (setf (inner-html login-button) "Anmelden") (setf (value (one "#inputPassword")) "") (setf (chain window local-storage name) (value input-name)) (if (and (not (null (chain window history state))) (not (undefined (chain window history state last-state))) (not (undefined (chain window history state last-url)))) (replace-state (chain window history state last-url) (chain window history state last-state)) (replace-state "/wiki/Hauptseite")))) (catch (lambda (error) (handle-login-error error repeated))))))
2,507
Common Lisp
.lisp
51
42.196078
146
0.620563
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
064e14dacab25db9c716dcbefd286ebb77cec22850521d4e1e69fb4e751babcc
38,180
[ -1 ]
38,181
logout.lisp
mohe2015_schule/js/logout.lisp
(var __-p-s_-m-v_-r-e-g) (i "./show-tab.lisp" "showTab") (i "./read-cookie.lisp" "readCookie") (i "./state-machine.lisp" "replaceState") (i "./utils.lisp" "all" "one" "clearChildren") (i "./fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (defroute "/logout" (add-class (all ".edit-button") "disabled") (show-tab "#loading") (let ((form-data (new (-form-data)))) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/logout" (create method "POST" body form-data)) (then check-status) (then (lambda (data) (chain window local-storage (remove-item "name")) (replace-state "/login"))) (catch handle-fetch-error))))
717
Common Lisp
.lisp
19
33.631579
72
0.62446
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
06936811cce1efa614258d44e16dbd1ad23ddf2b1841f875e6af53d098044790
38,181
[ -1 ]
38,182
fetch.lisp
mohe2015_schule/js/fetch.lisp
(var __-p-s_-m-v_-r-e-g) (i "./state-machine.lisp" "pushState") (i "./utils.lisp" "all" "one" "clearChildren") (i "./show-tab.lisp" "showTab") ;; TODO clean up (export (defun handle-fetch-error (error) ;; TODO switch (let ((status (chain error response status))) (if (= status 401) (progn (setf (value (one "#inputName")) (or (chain window local-storage name) "")) (chain window local-storage (remove-item "name")) (push-state "/login" (create last-url (chain window location href) last-state (chain window history state)))) (if (= status 403) (let ((error-message "Du hast nicht die benötigten Berechtigungen, um diese Aktion durchzuführen. Sag mir Bescheid, wenn du glaubst, dass dies ein Fehler ist.")) (alert error-message)) (let ((error-message (concatenate 'string "Unbekannter Fehler: " (chain error response status-text)))) (alert error-message))))))) ;; TODO (if (not (= text-status "abort")) (export (defun handle-fetch-error-show (error) (chain console (log (chain error))) ;; TODO switch (let ((status (chain error response status))) (if (= status 401) (progn (setf (value (one "#inputName")) (or (chain window local-storage name) "")) (chain window local-storage (remove-item "name")) (push-state "/login" (create last-url (chain window location href) last-state (chain window history state)))) (if (= status 403) (let ((error-message "Du hast nicht die benötigten Berechtigungen, um diese Aktion durchzuführen. Sag mir Bescheid, wenn du glaubst, dass dies ein Fehler ist.")) (setf (inner-text (one "#errorMessage")) error-message) (show-tab "#error")) (if (= (chain error response status) 404) (show-tab "#not-found") (let ((error-message (concatenate 'string "Unbekannter Fehler: " (chain error response status-text)))) (setf (inner-text (one "#errorMessage")) error-message) (show-tab "#error")))))))) (export (defun handle-login-error (error repeated) (let ((status (chain error response status))) (chain window local-storage (remove-item "name")) (if (= status 403) (progn (alert "Ungültige Zugangsdaten!") (chain (one "#login-button") (prop "disabled" f) (html "Anmelden"))) (if (= status 400) (if repeated (progn (alert "Ungültige Zugangsdaten!") (chain (one "#login-button") (prop "disabled" f) (html "Anmelden"))) (login-post t)) (handle-fetch-error error)))))) (export (defun check-status (response) (if (not response) (throw (new (-error "No data")))) (if (= (chain response status) 200) (chain -promise (resolve response)) (let ((error (new (-error (chain response status-text))))) (setf (chain error response) response) (throw error))))) (export (defun json (response) (chain response (json)))) (export (defun html (response) (chain response (text)))) (export (defun cache-then-network (url callback) (var network-data-received f) (var network-update (chain (fetch url) (then check-status) (then json) (then (lambda (data) (setf network-data-received t) (callback data))) (catch handle-fetch-error-show))) (chain caches (match url) (then check-status) (then json) (then (lambda (data) (if (not network-data-received) (callback data)))) (catch (lambda () network-update)) (catch handle-fetch-error-show))))
4,038
Common Lisp
.lisp
104
29.115385
160
0.561878
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
a0e8e11b6a2c8dcf00c6af4e1bd74c378446018b23a9f4727874f80e9731f6ea
38,182
[ -1 ]
38,183
index.lisp
mohe2015_schule/js/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "./contact/index.lisp" "handleContact") (i "./wiki/page.lisp" "handleWikiPage") (i "./search.lisp" "handleSearchQuery" "handleSearch") (i "./quiz.lisp" "handleQuizIdResults" "handleQuizIdPlayIndex" "handleQuizIdPlay" "handleQuizIdEdit" "handleQuizCreate") (i "./logout.lisp" "handleLogout") (i "./login.lisp" "handleLogin") (i "./root.lisp" "handle") (i "./history.lisp" "handleWikiPageHistoryIdChanges" "handleWikiPageHistoryId" "handleWikiNameHistory") (i "./wiki/page/edit.lisp" "handleWikiPageEdit") (i "./create.lisp" "handleWikiNameCreate") (i "./articles.lisp" "handleArticles") (i "./categories.lisp" "handleTagsRest") (i "./courses/index.lisp" "handleCourses") (i "./schedule/id.lisp" "handleScheduleGradeEdit" "handleScheduleGrade") (i "./schedules/new.lisp" "handleSchedulesNew") (i "./schedules/index.lisp" "handleSchedules") (i "./student-courses/index.lisp" "handleStudentCourses") (i "./settings/index.lisp" "handleSettings") (i "./math.lisp" "renderMath") (i "./image-viewer.lisp") (i "./substitution-schedule/index.lisp" "handleSubstitutionSchedule") (i "./state-machine.lisp" "updateState" "replaceState" "pushState") (i "./editor-lib.lisp" "isLocalUrl") (i "./utils.lisp" "all" "one" "clearChildren") (setf (chain window onerror) (lambda (message source lineno colno error) (alert (concatenate 'string "Es ist ein Fehler aufgetreten! Melde ihn bitte dem Entwickler! " message " source: " source " lineno: " lineno " colno: " colno " error: " error)))) (on ("click" (one "body") event :dynamic-selector "a") (if (chain event target is-Content-Editable) (progn (chain event (prevent-default)) (chain event (stop-propagation))) (let ((url (href (chain event target)))) (if (and url (is-local-url url)) (progn (chain event (prevent-default)) (push-state url) f) t)))) (setf (chain window onpopstate) (lambda (event) (if (chain window last-url) (let ((pathname (chain window last-url (split "/")))) (if (and (= (chain pathname length) 4) (= (chain pathname 1) "wiki") (or (= (chain pathname 3) "create") (= (chain pathname 3) "edit"))) (progn (if (confirm "Möchtest du die Änderung wirklich verwerfen?") (update-state)) (return))))) (update-state))) (setf (chain window onbeforeunload) (lambda () (let ((pathname (chain window location pathname (split "/")))) (if (and (= (chain pathname length) 4) (= (chain pathname 1) "wiki") (or (= (chain pathname 3) "create") (= (chain pathname 3) "edit"))) t)))) (setf (chain window onload) (lambda () (update-state)))
3,034
Common Lisp
.lisp
69
35.246377
87
0.589986
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
31e34531fefa293d10e11efdc1830e7f975eb3bd0c3c212056948585eca69a5d
38,183
[ -1 ]
38,184
utils.lisp
mohe2015_schule/js/utils.lisp
(var __-p-s_-m-v_-r-e-g) (setf (chain -Array prototype hide) (lambda () (chain this (for-each (lambda (element) (hide element)))) this)) (setf (chain -Array prototype remove) (lambda () (chain this (for-each (lambda (element) (remove element)))) this)) (setf (chain -Array prototype add-event-listener) (lambda (event func) (chain this (for-each (lambda (element) (chain element (add-event-listener event func))))) this)) ;; THIS IS HACKY AS HELL AND SHOULD PROBABLY AT LEAST BE IMPLEMENTED USING A SUBCLASS (chain -object (define-property (chain -Array prototype) "classList" (create get (lambda () (let ((result (chain this (map (lambda (e) (chain e class-list)))))) (setf (chain result remove) (lambda (clazz) (chain this (for-each (lambda (element) (chain element (remove clazz))))))) (setf (chain result add) (lambda (clazz) (chain this (for-each (lambda (element) (chain element (add clazz))))))) result))))) (export (defun one (selector base-element) (chain (or base-element document) (query-selector selector)))) (export (defun all (selector base-element) (chain -array (from (chain (or base-element document) (query-selector-all selector)))))) (export (defun clear-children (element) (while (chain element (has-child-nodes)) (chain element (remove-child (chain element last-child))))))
1,762
Common Lisp
.lisp
55
22.545455
105
0.542084
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
5ea3d411058c5947b48ff9cd646a70ee630feda1fc00fc0a474fef689d11aa42
38,184
[ -1 ]
38,185
template.lisp
mohe2015_schule/js/template.lisp
(i "./utils.lisp" "all" "one" "clearChildren") (var __-p-s_-m-v_-r-e-g) (export (defun get-template (id) (chain document (import-node (chain document (get-element-by-id id) content) t))))
197
Common Lisp
.lisp
6
30.333333
70
0.647368
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
6e4427fb117162fdd4b8b33ad75e596fb1fb065e8ca50ffd1dd37eab7de468a2
38,185
[ -1 ]
38,186
categories.lisp
mohe2015_schule/js/categories.lisp
(var __-p-s_-m-v_-r-e-g) (i "./show-tab.lisp" "showTab") (i "./read-cookie.lisp" "readCookie") (i "./utils.lisp" "all" "one" "clearChildren") (i "./template.lisp" "getTemplate") (on ("submit" (one "#form-settings") event) (chain event (prevent-default)) (let ((template (get-template "template-category"))) (setf (inner-html (one ".closable-badge-label" template)) (value (one "#new-category"))) (before (one "#new-category") template)) (setf (value (one "#new-category")) "")) (on ("click" (one "body") event :dynamic-selector ".close-tag") (chain event target (closest ".closable-badge") (remove))) (defroute "/tags/.rest" (show-tab "#loading") (chain console (log (chain rest (split "/")))) (chain $ (post "/api/tags" (create _csrf_token (read-cookie "_csrf_token") tags (chain rest (split "/"))) (lambda (data) (chain (one "#tags-list") (html "")) (if (not (null data)) (progn (chain data (sort (lambda (a b) (chain a (locale-compare b))))) (loop for page in data do (let ((templ (one (chain (one "#articles-entry") (html))))) (chain templ (query-selector "a") (text page)) (chain templ (query-selector "a") (attr "href" (concatenate 'string "/wiki/" page))) (chain (one "#tags-list") (append templ)))))) (show-tab "#tags"))) (fail (lambda (jq-xhr text-status error-thrown) (handle-error jq-xhr t)))))
1,589
Common Lisp
.lisp
32
39.8125
94
0.543464
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
13f775c80ebea5a98ae1a3a399d74ea1530e66d74438b891ee8b36c83064ba62
38,186
[ -1 ]
38,187
articles.lisp
mohe2015_schule/js/articles.lisp
(var __-p-s_-m-v_-r-e-g) (i "./show-tab.lisp" "showTab") (i "./utils.lisp" "all" "one" "clearChildren") (defroute "/articles" (show-tab "#loading") (get "/api/articles" t (chain data (sort (lambda (a b) (chain a (locale-compare b))))) (chain (one "#articles-list") (html "")) (loop for page in data do (let ((templ (one (chain (one "#articles-entry") (html))))) (chain templ (query-selector "a") (text page)) (chain templ (query-selector "a") (attr "href" (concatenate 'string "/wiki/" page))) (chain (one "#articles-list") (append templ)))) (show-tab "#articles")))
677
Common Lisp
.lisp
14
39.5
72
0.542424
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
64f64d63a14e684e9c8f0f210873daf3236cf720e2730f337e0832b25ea1c80c
38,187
[ -1 ]
38,188
sw.lisp
mohe2015_schule/js/sw.lisp
(var static-cache-name "static-cache-v1") (var dynamic-cache-name "dynamic-cache-v1") (var urls-to-cache ([] "/" "/popper.js" "/bootstrap.css" "/all.css" "/index.css" "/bootstrap.js" "/js/index.lisp" "/js/state-machine.lisp" "/js/editor-lib.lisp" "/js/utils.lisp" "/js/contact/index.lisp" "/js/wiki/page.lisp" "/js/search.lisp" "/js/quiz.lisp" "/js/logout.lisp" "/js/login.lisp" "/js/root.lisp" "/js/history.lisp" "/js/wiki/page/edit.lisp" "/js/create.lisp" "/js/articles.lisp" "/js/show-tab.lisp" "/js/categories.lisp" "/js/courses/index.lisp" "/js/schedule/id.lisp" "/js/schedules/new.lisp" "/js/schedules/index.lisp" "/js/settings/index.lisp" "/js/template.lisp" "/js/student-courses/index.lisp" "/js/math.lisp" "/js/image-viewer.lisp" "/js/fetch.lisp" "/js/substitution-schedule/index.lisp" "/js/file-upload.lisp" "/js/read-cookie.lisp" "/js/editor.lisp" "/js/get-url-parameter.lisp" "/webfonts/fa-solid-900.woff2" "/mathlive.js" "/favicon.ico")) (chain self (add-event-listener "install" (lambda (event) (chain self (skip-waiting)) (chain event (wait-until (chain caches (open static-cache-name) (then (lambda (cache) (chain cache (add-all urls-to-cache)))))))))) (defun network-and-cache (event cache-name) (chain event (respond-with (chain caches (open cache-name) (then (lambda (cache) (chain (fetch (chain event request)) (then (lambda (response) (when (= (chain event request method) "GET") (chain cache (put (chain event request) (chain response (clone))))) response))))))))) (defun cache-then-fallback (event cache-name) (chain event (respond-with (chain caches (open cache-name) (then (lambda (cache) (chain cache (match (chain event request)) (then (lambda (response) (or response (chain cache (match "/")))))))))))) (chain self (add-event-listener "fetch" (lambda (event) (let* ((request (chain event request)) (method (chain request method)) (url (new (-u-r-l (chain request url)))) (pathname (chain url pathname))) (if (chain pathname (starts-with "/api")) (network-and-cache event dynamic-cache-name) (cache-then-fallback event static-cache-name)))))) (chain self (add-event-listener "activate" (lambda (event) (chain event (wait-until (chain caches (keys) (then (lambda (cache-names) (chain -promise (all (chain cache-names (filter (lambda (cache-name) (if (= cache-name static-cache-name) (return f)) (if (= cache-name dynamic-cache-name) (return f)) t)) (map (lambda (cache-name) (var fun (chain caches delete)) (chain console (log cache-name)) (chain fun (call caches cache-name))))))))))))))) (on ("push" self event) (chain console (log event)) (let ((title "test") (options (create body "yay"))) (chain event (wait-until (chain self registration (show-notification title options))))))
4,521
Common Lisp
.lisp
114
22.763158
118
0.430521
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
adb42d110cbf859bc1ab0863eecd1af75b2ca51c5cf51e09c070253c8c64e0ce
38,188
[ -1 ]
38,189
quiz.lisp
mohe2015_schule/js/quiz.lisp
(var __-p-s_-m-v_-r-e-g) (i "./utils.lisp" "all" "one" "clearChildren") (defroute "/quiz/create" (show-tab "#loading") (post "/api/quiz/create" (create '_csrf_token (read-cookie "_csrf_token")) t (push-state (concatenate 'string "/quiz/" data "/edit")))) (defroute "/quiz/:id/edit" (show-tab "#edit-quiz")) (defroute "/quiz/:id/play" (get (concatenate 'string "/api/quiz/" id) t (setf (chain window correct-responses) 0) (setf (chain window wrong-responses) 0) (replace-state (concatenate 'string "/quiz/" id "/play/0") (create data data)))) (defroute "/quiz/:id/play/:index" (setf index (parse-int index)) (if (= (chain window history state data questions length) index) (progn (replace-state (concatenate 'string "/quiz/" id "/results")) (return))) (setf (chain window current-question) (elt (chain window history state data questions) index)) (if (= (chain window current-question type) "multiple-choice") (progn (show-tab "#multiple-choice-question-html") (chain (one ".question-html") (text (chain window current-question question))) (chain (one "#answers-html") (text "")) (dotimes (i (chain window current-question responses length)) (let ((answer (elt (chain window current-question responses) i)) (template (one (chain (one "#multiple-choice-answer-html") (html))))) (chain template (query-selector ".custom-control-label") (text (chain answer text))) (chain template (query-selector ".custom-control-label") (attr "for" i)) (chain template (query-selector ".custom-control-input") (attr "id" i)) (chain (one "#answers-html") (append template)))))) (if (= (chain window current-question type) "text") (progn (show-tab "#text-question-html") (chain (one ".question-html") (text (chain window current-question question)))))) (defroute "/quiz/:id/results" (show-tab "#quiz-results") (chain (one "#result") (text (concatenate 'string "Du hast " (chain window correct-responses) " Fragen richtig und " (chain window wrong-responses) " Fragen falsch beantwortet. Das sind " (chain (/ (* (chain window correct-responses) 100) (+ (chain window correct-responses) (chain window wrong-responses))) (to-fixed 1) (to-locale-string)) " %")))) (on ("click" (one ".multiple-choice-submit-html") event) (let ((everything-correct t) (i 0)) (loop for answer in (chain window current-question responses) do (chain (one (concatenate 'string "#" i)) (remove-class "is-valid")) (chain (one (concatenate 'string "#" i)) (remove-class "is-invalid")) (if (= (chain answer is-correct) (chain (one (concatenate 'string "#" i)) (prop "checked"))) (chain (one (concatenate 'string "#" i)) (add-class "is-valid")) (progn (chain (one (concatenate 'string "#" i)) (add-class "is-invalid")) (setf everything-correct f))) (incf i)) (if everything-correct (incf (chain window correct-responses)) (incf (chain window wrong-responses))) (chain (one ".multiple-choice-submit-html") (hide)) (chain (one ".next-question") (show)))) (on ("click" (one ".text-submit-html") event) (if (= (chain (one "#text-response") (val)) (chain window current-question answer)) (progn (incf (chain window correct-response)) (chain (one "#text-response") (add-class "is-valid"))) (progn (incf (chain window wrong-responses)) (chain (one "#text-response") (add-class "is-invalid")))) (chain (one ".text-submit-html") (hide)) (chain (one ".next-question") (show))) (on ("click" (one ".next-question") event) (chain (one ".next-question") (hide)) (chain (one ".text-submit-html") (show)) (chain (one ".multiple-choice-submit-html") (show)) (let ((pathname (chain window location pathname (split "/")))) (replace-state (concatenate 'string "/quiz/" (chain pathname 2) "/play/" (1+ (parse-int (chain pathname 4))))))) (on ("click" (one ".create-multiple-choice-question") event) (chain (one "#questions") (append (one (chain (one "#multiple-choice-question") (html)))))) (on ("click" (one ".create-text-question") event) (chain (one "#questions") (append (one (chain (one "#text-question") (html)))))) (on ("click" (one "body") event :dynamic-selector ".add-response-possibility") (chain (one this) (siblings ".responses") (append (one (chain (one "#multiple-choice-response-possibility") (html)))))) (on ("click" (one ".save-quiz") event) (let ((obj (new (-object))) (pathname (chain window location pathname (split "/")))) (setf (chain obj questions) (list)) (chain (one "#questions") (children) (each (lambda () (if (= (chain (one this) (attr "class")) "multiple-choice-question") (chain obj questions (push (multiple-choice-question (one this))))) (if (= (chain (one this) (attr "class")) "text-question") (chain obj questions (push (text-question (one this)))))))) (post (concatenate 'string "/api/quiz" (chain pathname 2)) (create _csrf_token (read-cookie "_csrf_token") data (chain -j-s-o-n (stringify obj))) t (chain window history (replace-state nil nil (concatenate 'string "/quiz/" (chain pathname 2) "/play")))))) (defun text-question (element) (create type "text" question (chain element (query-selector ".question") (val)) answer (chain element (query-selector ".answer") (val)))) (defun multiple-choice-question (element) (let ((obj (create type "multiple-choice" question (chain element (query-selector ".question") (val)) responses (list)))) (chain element (query-selector ".responses") (children) (each (lambda () (let ((is-correct (chain (one this) (query-selector ".multiple-choice-response-correct") (prop "checked"))) (response-text (chain (one this) (query-selector ".multiple-choice-response-text") (val)))) (chain obj responses (push (create text response-text is-correct is-correct))))))) obj))
9,018
Common Lisp
.lisp
156
34.692308
99
0.433303
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
9e4bf1379a36ba7fa5b594c6a7c547f0825cb15f87fbc33fdde369adda2a0f5e
38,189
[ -1 ]
38,190
image-viewer.lisp
mohe2015_schule/js/image-viewer.lisp
(var __-p-s_-m-v_-r-e-g) (i "./utils.lisp" "all" "one" "clearChildren") (on ("click" (one "body") event :dynamic-selector "article[contenteditable=false] img") (if (null (chain document fullscreen-element)) (chain event target (request-fullscreen)) (chain document (exit-fullscreen))))
303
Common Lisp
.lisp
6
46.666667
87
0.676871
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
66dbc5fcfb47f8550dc0062841da1138852f82f79c4ff8a050cfd0883b644753
38,190
[ -1 ]
38,191
create.lisp
mohe2015_schule/js/create.lisp
(var __-p-s_-m-v_-r-e-g) (i "/js/state-machine.lisp" "pushState") (i "/js/editor.lisp" "showEditor") (i "/js/show-tab.lisp" "showTab") (i "/js/utils.lisp" "all" "one" "clearChildren") (i "/js/state-machine.lisp" "enterState") (defroute "/wiki/:name/create" ;; TODO clean up - here are lots of useless lines of code (enter-state "handleWikiPageEdit") (add-class (all ".edit-button") "disabled") (add-class (one "#is-outdated-article") "d-none") (if (and (not (null (chain window history state))) (not (null (chain window history state content)))) (setf (inner-html (one "article")) (chain window history state content)) (setf (inner-html (one "article")) "")) (show-editor) (show-tab "#page")) (on ("click" (one "#create-article") event) (chain event (prevent-default)) (chain event (stop-propagation)) (let ((pathname (chain window location pathname (split "/")))) (push-state (concatenate 'string "/wiki/" (chain pathname 2) "/create") (chain window history state)) f))
1,047
Common Lisp
.lisp
24
39.458333
78
0.646712
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
356ea382a6e14b4c7c2043d17a0997f4f782f702ef6413bf64ea46b273cf3484
38,191
[ -1 ]
38,192
show-tab.lisp
mohe2015_schule/js/show-tab.lisp
(var __-p-s_-m-v_-r-e-g) (i "./utils.lisp" "all" "one" "clearChildren") (export (defun show-tab (id) ;; temp1.filter(function (tab) { return tab.id != "edit-quiz" }) (chain (all ".my-tab") (filter (lambda (tab) (not (= (chain tab id) id)))) (hide)) (show (one id))))
324
Common Lisp
.lisp
11
23.272727
67
0.503226
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
8533148abe96902d2043c66c201c7ff55b23594a8e98cfab6a0b32549cec64b7
38,192
[ -1 ]
38,193
read-cookie.lisp
mohe2015_schule/js/read-cookie.lisp
(i "./utils.lisp" "all" "one" "clearChildren") (export (defun read-cookie (name) (let ((name-eq (concatenate 'string name "=")) (ca (chain document cookie (split ";")))) (loop for c in ca do (if (chain c (trim) (starts-with name-eq)) (return (chain c (trim) (substring (chain name-eq length)))))))))
359
Common Lisp
.lisp
9
32.333333
74
0.555874
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
079c0efc5302967b06f86847652731c713792c479fda0fba8c966dd30313e5b4
38,193
[ -1 ]
38,194
history.lisp
mohe2015_schule/js/history.lisp
(var __-p-s_-m-v_-r-e-g) (i "./state-machine.lisp" "pushState") (i "./show-tab.lisp" "showTab") (i "./math.lisp" "renderMath") (i "./fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (i "./utils.lisp" "all" "one" "clearChildren") (i "./template.lisp" "getTemplate") (on ("click" (one "#show-history") event) (chain event (prevent-default)) (let ((pathname (chain window location pathname (split "/")))) (push-state (concatenate 'string "/wiki/" (chain pathname 2) "/history") (chain window history state)) f)) (defroute "/wiki/:name/history" (remove-class (all ".edit-button") "disabled") (show-tab "#loading") (chain (fetch (concatenate 'string "/api/history/" name)) (then check-status) (then json) (then (lambda (data) (setf (inner-html (one "#history-list")) "") (loop for page in data do (let ((template (get-template "history-item-template"))) (setf (inner-text (chain template (query-selector ".history-username"))) (chain page user)) (setf (inner-text (chain template (query-selector ".history-date"))) (new (-date (chain page created)))) (setf (inner-text (chain template (query-selector ".history-summary"))) (chain page summary)) (setf (inner-text (chain template (query-selector ".history-characters"))) (chain page size)) (setf (href (chain template (query-selector ".history-show"))) (concatenate 'string "/wiki/" name "/history/" (chain page id))) (setf (href (chain template (query-selector ".history-diff"))) (concatenate 'string "/wiki/" name "/history/" (chain page id) "/changes")) (chain (one "#history-list") (append template)))) (show-tab "#history"))))) (defroute "/wiki/:page/history/:id" (show-tab "#loading") (remove-class (all ".edit-button") "disabled") (cleanup) (setf (inner-text (one "#wiki-article-title")) (decode-u-r-i-component page)) (chain (fetch (concatenate 'string "/api/revision/" id)) (then check-status) (then json) (then (lambda (data) (setf (href (one "#currentVersionLink")) (concatenate 'string "/wiki/" page)) (remove-class (one "#is-outdated-article") "d-none") (setf (inner-html (one "#categories")) "") (loop for category in (chain data categories) do (let ((template (get-template "template-readonly-category"))) (setf (inner-html (one ".closable-badge" template)) category) (append (one "#categories") template))) (setf (inner-html (one "article")) (chain data content)) (chain window history (replace-state (create content data) nil nil)) (render-math) (show-tab "#page"))) (catch (lambda (error) (if (= (chain error response status) 404) (show-tab "#not-found") (handle-fetch-error error)))))) (defroute "/wiki/:page/history/:id/changes" (chain (all ".edit-button") (add-class "disabled")) (chain (one "#currentVersionLink") (attr "href" (concatenate 'string "/wiki/" page))) (chain (one "#is-outdated-article") (remove-class "d-none")) (cleanup) (var current-revision nil) (var previous-revision nil) (chain $ (get (concatenate 'string "/api/revision/" id) (lambda (data) (setf current-revision data) (chain $ (get (concatenate 'string "/api/previous-revision/" id) (lambda (data) (setf previous-revision data) (var diff-html (htmldiff (chain previous-revision content) (chain current-revision content))) (chain (one "article") (html diff-html)) (let* ((pt (chain previous-revision categories)) (ct (chain current-revision categories)) (both (chain pt (filter (lambda (x) (chain ct (includes x)))))) (removed (chain pt (filter (lambda (x) (not (chain ct (includes x))))))) (added (chain ct (filter (lambda (x) (not (chain pt (includes x)))))))) (chain (one "#categories") (html "")) (loop for category in both do (chain (one "#categories") (append (who-ps-html (:span :class "closable-badge bg-secondary" category))))) (loop for category in removed do (chain (one "#categories") (append (who-ps-html (:span :class "closable-badge bg-danger" category))))) (loop for category in added do (chain (one "#categories") (append (who-ps-html (:span :class "closable-badge bg-success" category))))) (show-tab "#page")))) (fail (lambda (jq-xhr text-status error-thrown) (if (= (chain jq-xhr status) 404) (show-tab "#not-found") (handle-error jq-xhr t))))))) (fail (lambda (jq-xhr text-status error-thrown) (if (= (chain jq-xhr status) 404) (show-tab "#not-found") (handle-error jq-xhr t))))))
6,185
Common Lisp
.lisp
117
35.324786
159
0.482349
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
19dce9ade046d8bc985727204e9f977fc9d4eac222c094aeaf75bb604784f47d
38,194
[ -1 ]
38,195
search.lisp
mohe2015_schule/js/search.lisp
(var __-p-s_-m-v_-r-e-g) (i "./show-tab.lisp" "showTab") (i "./utils.lisp" "all" "one" "clearChildren") (i "/js/template.lisp" "getTemplate") (i "/js/fetch.lisp" "checkStatus" "json" "handleFetchErrorShow" "cacheThenNetwork") (on ("input" (one "#search-query") event) (chain (one "#button-search") (click))) (defroute "/search" (add-class (all ".edit-button") "disabled") (show-tab "#search")) (defroute "/search/:query" (add-class (all ".edit-button") "disabled") (show-tab "#search") (setf (value (one "#search-query")) query)) (defun handle-response (data) (chain (one "#search-results-content") (html "")) (let ((results-contain-query f)) (if (not (null data)) (loop for page in data do (if (= (chain page title) query) (setf results-contain-query t) (let ((template (get-template "search-result-template"))) (setf (inner-text (one ".s-title" template)) (chain page title)) (setf (href template) (concatenate 'string "/wiki/" (chain page title))) (setf (inner-html (one ".search-result-summary" template)) (chain page summary)) (append (one "#search-results-content") template))))) (if results-contain-query (chain (one "#no-search-results") (hide)) (chain (one "#no-search-results") (show))) (chain (one "#search-results-loading") (stop) (hide)) (chain (one "#search-results") (stop) (show)))) (on ("click" (one "#button-search") event) (let ((query (value (one "#search-query")))) (setf (href (one "#search-create-article")) (concatenate 'string "/wiki/" query "/create")) (chain window history (replace-state nil nil (concatenate 'string "/search/" query))) (hide (one "#search-results-loading")) (show (one "#search-results")) (if (not (undefined (chain window search-xhr))) ;; TODO fixme (maybe websocket at later point?) (chain window search-xhr (abort))) (cache-then-network (concatenate 'string "/api/search/" query) handle-response)))
2,093
Common Lisp
.lisp
40
45.2
101
0.612115
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
5f2f18359ac47bb089a0368df3973da68223d8e3b7291840685544a47e6bc2b5
38,195
[ -1 ]
38,196
state-machine.lisp
mohe2015_schule/js/state-machine.lisp
(var __-p-s_-m-v_-r-e-g) (i "./utils.lisp" "all" "one" "clearChildren") (i "./template.lisp" "getTemplate") (i "./fetch.lisp" "checkStatus" "json" "handleFetchError") (i "./show-tab.lisp" "showTab") (export (defun update-state () (setf (chain window last-url) (chain window location pathname)) (if (undefined (chain window local-storage name)) (setf (inner-text (one "#logout")) "Abmelden") (setf (inner-text (one "#logout")) (concatenate 'string (chain window local-storage name) " abmelden"))) (if (and (not (= (chain window location pathname) "/login")) (undefined (chain window local-storage name))) (progn (chain window history (push-state (create last-url (chain window location href) last-state (chain window history state)) nil "/login")) (update-state))) (setf (style (one ".login-hide")) "") (loop for route in (chain window routes) do (when (route (chain window location pathname)) ;;(chain console (log (chain route name))) (return-from update-state))) (setf (inner-text (one "#errorMessage")) "Unbekannter Pfad!") (show-tab "#error"))) (export (defun push-state (url data) (debug "PUSH-STATE" url) (chain window history (push-state data nil url)) (update-state))) (export (defun replace-state (url data) (debug "REPLACE-STATE" url) (chain window history (replace-state data nil url)) (update-state))) (defun node (value) (setf (chain this value) value) (setf (chain this children) (array)) (setf (chain this parent) nil) (setf (chain this set-parent-node) (lambda (node) (setf (chain this parent) node))) (setf (chain this get-parent-node) (lambda () (chain this parent))) (setf (chain this add-child) (lambda (node) (chain node (set-parent-node this)) (setf (@ this 'children (chain this children length)) node))) (setf (chain this get-children) (lambda () (chain this children))) (setf (chain this remove-children) (lambda () (setf (chain this children) (array)))) this) (export (defparameter *STATE* (new (node "loading")))) (let ((handle-wiki-page-edit (new (node "handleWikiPageEdit"))) (handle-wiki-page (new (node "handleWikiPage"))) (settings (new (node "settings")))) (chain *STATE* (add-child handle-wiki-page)) (chain *STATE* (add-child (new (node "handleSettings")))) (chain *STATE* (add-child (new (node "history")))) (chain *STATE* (add-child (new (node "histories")))) (chain handle-wiki-page (add-child handle-wiki-page-edit)) (chain handle-wiki-page-edit (add-child (new (node "publish")))) (chain handle-wiki-page-edit (add-child settings)) (chain settings (add-child (new (node "add-tag"))))) (defun current-state-to-new-state-internal (old-state new-state) (if (= (chain old-state value) new-state) (return (values (array) old-state))) (loop for state in (chain old-state (get-children)) do (multiple-value-bind (transitions new-state-object) (current-state-to-new-state-internal state new-state) (if transitions (return (values (chain (array (concatenate 'string (chain state value) "Enter")) (concat transitions)) new-state-object)))))) (export (defun current-state-to-new-state (old-state new-state) (multiple-value-bind (transitions new-state-object) (current-state-to-new-state-internal old-state new-state) (if transitions (return (values transitions new-state-object)))) (if (chain old-state (get-parent-node)) (multiple-value-bind (transitions new-state-object) (current-state-to-new-state-internal (chain old-state (get-parent-node)) new-state) (return (values (chain (array (concatenate 'string (chain old-state value) "Exit")) (concat transitions)) new-state-object)))))) (export (async (defun enter-state (state) (let ((module (await (funcall import (chain import meta url))))) (multiple-value-bind (transitions new-state-object) (current-state-to-new-state *STATE* state) (loop for transition in transitions do (debug "TRANSITION " transition) (funcall (getprop window 'states transition))) (debug "STATE " new-state-object) (setf *STATE* new-state-object))))))
4,388
Common Lisp
.lisp
96
39.708333
144
0.653729
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
f0b0d46c229170113440c60d2b64bf94d8d155bb5f81fb3a30dcf1f0193fc7c0
38,196
[ -1 ]
38,197
editor-lib.lisp
mohe2015_schule/js/editor-lib.lisp
(var __-p-s_-m-v_-r-e-g) (i "./file-upload.lisp" "sendFile") (i "./categories.lisp") (i "./fetch.lisp" "cacheThenNetwork") (i "./utils.lisp" "all" "one" "clearChildren") (import-default "/mathlive.js" "MathLive") (defun save-range () (chain document (get-elements-by-tag-name "article") 0 (focus)) (setf (chain window saved-range) (chain window (get-selection) (get-range-at 0)))) (defun restore-range () (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain window (get-selection) (remove-all-ranges)) (chain window (get-selection) (add-range (chain window saved-range)))) (defmacro tool (id &body body) `(chain document (get-element-by-id ,id) (add-event-listener "click" (lambda (event) (chain event (prevent-default)) (chain event (stop-propagation)) (save-range) ,@body f)))) (defmacro stool (id) `(tool ,id (chain document (exec-command ,id f)))) (tool "format-p" (chain document (exec-command "formatBlock" f "<p>"))) (tool "format-h2" (chain document (exec-command "formatBlock" f "<h2>"))) (tool "format-h3" (chain document (exec-command "formatBlock" f "<h3>"))) (stool "superscript") (stool "subscript") (stool "insertUnorderedList") (stool "insertOrderedList") (stool "indent") (stool "outdent") (defun get-url (url) (new (-u-r-l url (chain window location origin)))) (export (defun is-local-url (url) (try (let ((url (get-url url))) (return (= (chain url origin) (chain window location origin)))) (:catch (error) (return f))))) (defun update-link (url) (if (is-local-url url) (let ((parsed-url (get-url url))) (if (chain window (get-selection) is-collapsed) (chain document (exec-command "insertHTML" f (concatenate 'string "<a href=\"" (chain parsed-url pathname) "\">" url "</a>"))) (chain document (exec-command "createLink" f (chain parsed-url pathname))))) (if (chain window (get-selection) is-collapsed) (chain document (exec-command "insertHTML" f (concatenate 'string "<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"" url "\">" url "</a>"))) (progn (chain document (exec-command "createLink" f url)) (let* ((selection (chain window (get-selection))) (link (chain selection focus-node parent-element (closest "a")))) (setf (chain link target) "_blank") (setf (chain link rel) "noopener noreferrer")))))) (tool "createLink" (on ("submit" (one "#form-create-link") event) ;; this doesn't remove the old listener (chain event (prevent-default)) (chain event (stop-propagation)) (hide-modal (one "#modal-create-link")) (restore-range) (update-link (value (one "#create-link")))) (show-modal (one "#modal-create-link"))) (var articles (array)) (cache-then-network "/api/articles" (lambda (data) (setf articles data))) (on ("input" (all ".link-input") event) (let* ((input (chain event target)) (value (chain input value (replace "/wiki/" ""))) (result (chain articles (filter (lambda (article) (not (= (chain article (to-lower-case) (index-of (chain value (to-lower-case)))) -1))))))) (chain console (log result)) (setf (chain input next-element-sibling inner-h-t-m-l) "") (if (> (chain result length) 0) (add-class (chain input next-element-sibling) "show") (remove-class (chain input next-element-sibling) "show")) (loop for article in result do (let ((element (chain document (create-element "div")))) (setf (chain element class-name) "dropdown-item") (setf (chain element inner-h-t-m-l) article) (chain element (add-event-listener "click" (lambda (event) (setf (chain input value) (concatenate 'string "/wiki/" (chain element inner-h-t-m-l))) (remove-class (chain input next-element-sibling) "show")))) (chain input next-element-sibling (append element)))) nil)) (on ("click" (one "body") event :dynamic-selector ".editLink") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (setf (value (one "#edit-link")) (href (chain target element))) (on ("submit" (one "#form-edit-link") event) (chain event (prevent-default)) (chain event (stop-propagation)) (hide-modal (one "#modal-edit-link")) (chain document (get-elements-by-tag-name "article") 0 (focus)) (setf (href (chain target element)) (value (one "#edit-link")))) (show-modal (one "#modal-edit-link")))) (on ("click" (one "body") event :dynamic-selector ".deleteLink") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (remove (chain target element)))) (on ("click" (one "body") event :dynamic-selector "article[contenteditable=true] a") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (chain event target))) (show-popover (create-popover-for target "<a href=\"#\" class=\"editLink\"><span class=\"fas fa-link\"></span></a> <a href=\"#\" class=\"deleteLink\"><span class=\"fas fa-unlink\"></span></a>")))) (tool "insertImage" (show-modal (one "#modal-image"))) (on ("click" (one "body") event :dynamic-selector "article[contenteditable=true] figure") (let ((target (chain event target))) (show-popover (create-popover-for target "<a href=\"#\" class=\"floatImageLeft\"><span class=\"fas fa-align-left\"></span></a> <a href=\"#\" class=\"floatImageRight\"><span class=\"fas fa-align-right\"></span></a> <a href=\"#\" class=\"resizeImage25\">25%</a> <a href=\"#\" class=\"resizeImage50\">50%</a> <a href=\"#\" class=\"resizeImage100\">100%</a> <a href=\"#\" class=\"deleteImage\"><span class=\"fas fa-trash\"></span></a>")))) (on ("click" (one "body") event :dynamic-selector ".floatImageLeft") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element class-list (remove "float-right")) (chain target element class-list (add "float-left")))) (on ("click" (one "body") event :dynamic-selector ".floatImageRight") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element class-list (remove "float-left")) (chain target element class-list (add "float-right")))) (on ("click" (one "body") event :dynamic-selector ".resizeImage25") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element class-list (remove "w-50")) (chain target element class-list (remove "w-100")) (chain target element class-list (add "w-25"))) f) (on ("click" (one "body") event :dynamic-selector ".resizeImage50") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element class-list (remove "w-25")) (chain target element class-list (remove "w-100")) (chain target element class-list (add "w-50")))) (on ("click" (one "body") event :dynamic-selector ".resizeImage100") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element class-list (remove "w-25")) (chain target element class-list (remove "w-50")) (chain target element class-list (add "w-100")))) (on ("click" (one "body") event :dynamic-selector ".deleteImage") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element (remove)))) (on ("click" (one "#update-image") event) (chain document (get-elements-by-tag-name "article") 0 (focus)) (if (value (one "#image-url")) (progn (hide-modal (one "#modal-image")) (chain document (exec-command "insertHTML" f (concatenate 'string "<img src=\"" (value (one "#image-url")) "\"></img>")))) (send-file (chain document (get-element-by-id "image-file") files 0)))) (tool "table" (show-modal (one "#modal-table"))) (on ("click" (one "#update-table") event) (hide-modal (one "#modal-table")) (chain document (get-elements-by-tag-name "article") 0 (focus)) (let* ((columns (parse-int (value (one "#table-columns")))) (rows (parse-int (value (one "#table-rows")))) (row-html (chain "<td></td>" (repeat columns))) (inner-table-html (chain (concatenate 'string "<tr>" row-html "</tr>") (repeat rows))) (table-html (concatenate 'string "<div class=\"table-responsive\"><table class=\"table table-bordered\">" inner-table-html "</table></div>"))) (chain document (exec-command "insertHTML" f table-html)))) ;; TODO TABLE resizing (maybe only on rightclick / longclick on mobile)? ;;(on ("click" (one "body") event :dynamic-selector "article[contenteditable=true] td") ;; (let ((target (chain event target))) ;; (show-popover (create-popover-for target "table data")))) '(tool "insertFormula" (on ("click" (one "#update-formula") event) (chain document (get-elements-by-tag-name "article") 0 (focus)) (let ((latex (chain window mathfield ($latex)))) (chain window mathfield ($revert-to-original-content)) (chain document (exec-command "insertHTML" f (concatenate 'string "<span class=\"formula\" contenteditable=\"false\">\\(" latex "\\)</span>"))) (loop for element in (chain document (get-elements-by-class-name "formula")) do (chain -math-live (render-math-in-element element)))) (hide-modal (one "#modal-formula"))) (show-modal (one "#modal-formula")) (setf (chain window mathfield) (chain -math-live (make-math-field (chain document (get-element-by-id "formula")) (create virtual-keyboard-mode "manual"))))) (on ("click" (one "#update-formula") event) (hide-modal (one "#modal-formula")) (chain document (get-elements-by-tag-name "article") 0 (focus)) (let ((latex (chain window mathfield ($latex)))) (chain window mathfield ($revert-to-original-content)) (chain document (exec-command "insertHTML" f (concatenate 'string "<span class=\"formula\" contenteditable=\"false\">\\(" latex "\\)</span>"))) (loop for element in (chain document (get-elements-by-class-name "formula")) do (chain -math-live (render-math-in-element element))))) (stool "undo") (stool "redo") (tool "settings" (show-modal (one "#modal-settings"))) (tool "finish" (on ("shown.bs.modal" (one "#modal-publish-changes") event) (focus (one "#change-summary"))) (show-modal (one "#modal-publish-changes"))) (defun random-int () (chain -math (floor (* (chain -math (random)) 10000000000000000)))) (defun create-popover-for (element content) (if (not (chain element id)) (setf (chain element id) (concatenate 'string "popover-target-" (random-int)))) (new (bootstrap.-Popover element (create html t template (concatenate 'string "<div data-target=\"#" (chain element id) "\" class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-header\"></h3><div class=\"popover-body\"></div></div>") content content trigger "manual")))) (defun get-popover (element) (chain bootstrap -Popover (get-Instance (chain element (closest ".popover"))))) (defun remove-old-popovers (event) (loop for popover in (one ".popover") do (let ((target (get-popover popover))) (if (undefined target) (progn (chain popover (remove)) (return-from remove-old-popovers))) (loop for target-parent in (chain (one (chain event target)) (parents)) do (if (= target-parent target) (return-from remove-old-popovers))) (if (= (chain event target) target) (return-from remove-old-popovers)) (show-popover (one target))))) (chain (one "body") (click remove-old-popovers)) (on ("click" (one "body") event :dynamic-selector "article[contenteditable=true] .formula") (let ((target (chain event target))) (show-popover (create-popover-for target "<a href=\"#\" class=\"editFormula\"><span class=\"fas fa-pen\"></span></a> <a href=\"#\" class=\"deleteFormula\"><span class=\"fas fa-trash\"></span></a>")))) (on ("click" (one "body") event :dynamic-selector ".deleteFormula") (chain event (prevent-default)) (chain event (stop-propagation)) (let ((target (get-popover (chain event target)))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (chain target element (remove)))) (on ("click" (one "body") event :dynamic-selector ".editFormula") (chain event (prevent-default)) (chain event (stop-propagation)) (let* ((target (get-popover (chain event target))) (content (chain -math-live (get-original-content (chain target element))))) (hide-popover target) (chain document (get-elements-by-tag-name "article") 0 (focus)) (setf (chain document (get-element-by-id "formula") inner-h-t-m-l) (concatenate 'string "\\( " content " \\)")) (setf (chain window mathfield) (chain -math-live (make-math-field (chain document (get-element-by-id "formula")) (create virtual-keyboard-mode "manual")))) (show-modal (one "#modal-formula")) (chain (one "#update-formula") (off "click") (click (lambda (event) (hide-modal (one "#modal-formula")) (chain document (get-elements-by-tag-name "article") 0 (focus)) (let ((latex (chain window mathfield ($latex)))) (chain window mathfield ($revert-to-original-content)) (setf (chain target element inner-h-t-m-l) (concatenate 'string "\\( " latex " \\)")) (loop for element in (chain document (get-elements-by-class-name "formula")) do (chain -math-live (render-math-in-element element)))))))))
15,837
Common Lisp
.lisp
318
41.36478
415
0.602481
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
5ad8693e149cac078721a228449676acc03a39d3b8d8090eb433910a762abc77
38,197
[ -1 ]
38,198
file-upload.lisp
mohe2015_schule/js/file-upload.lisp
(var __-p-s_-m-v_-r-e-g) (i "./read-cookie.lisp" "readCookie") (i "./utils.lisp" "all" "one" "clearChildren") (i "/js/fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (export (defun send-file (file) (setf (disabled (one "#update-image")) t) (let ((data (new (-form-data)))) (chain data (append "file" file)) (chain data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/upload" (create method "POST" body data)) (then check-status) (then html) (then (lambda (url) (setf (disabled (one "#update-image")) nil) (hide-modal (one "#modal-image")) (chain document (exec-command "insertHTML" f (concatenate 'string "<figure class=\"figure\"><img src=\"/api/file/" url "\" class=\"figure-img img-fluid rounded\" alt=\"...\"><figcaption class=\"figure-caption\">A caption for the above image.</figcaption></figure>"))))) (catch (lambda (error) (setf (disabled (one "#update-image")) nil) (hide-modal (one "#modal-image")) (alert "Fehler beim Upload!")))))))
1,299
Common Lisp
.lisp
36
26.277778
167
0.514286
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
7dc21af22d91c2ca7181760c532e0c0b8897c89d15c3018ac5fd1b50029f20cc
38,198
[ -1 ]
38,199
id.lisp
mohe2015_schule/js/schedule/id.lisp
(var __-p-s_-m-v_-r-e-g) (i "/js/show-tab.lisp" "showTab") (i "/js/fetch.lisp" "checkStatus" "json" "html" "handleFetchError" "cacheThenNetwork") (i "/js/utils.lisp" "all" "one" "clearChildren") (i "/js/template.lisp" "getTemplate") (i "/js/read-cookie.lisp" "readCookie") (i "/js/state-machine.lisp" "pushState") (on ("click" (one "#schedule-edit-button") event) (chain event (prevent-default)) (chain event (stop-propagation)) (let ((grade (chain window location pathname (split "/") 2))) (push-state (concatenate 'string "/schedule/" grade "/edit")))) (on ("click" (one "#schedule-show-button") event) (chain event (prevent-default)) (chain event (stop-propagation)) (let ((grade (chain window location pathname (split "/") 2))) (push-state (concatenate 'string "/schedule/" grade)))) (defun load-courses () (cache-then-network "/api/courses" (lambda (data) (let ((course-select (one ".course-select"))) ;; TODO implement for multiple (clear-children course-select) (loop for course in data do (let ((option (chain document (create-element "option"))) (text (concatenate 'string (chain course subject) " " (chain course type) " " (chain course teacher name)))) (setf (chain option value) (chain course course-id)) (setf (chain option inner-text) text) (chain course-select (append-child option)))))))) (defparameter *WEEK-MODULO* (array "" " (ungerade)" " (gerade)")) (defroute "/schedule/:grade" (show-tab "#loading") (hide (one "#schedule-show-button")) (show (one "#schedule-edit-button")) (hide (all ".add-course")) (cache-then-network (concatenate 'string "/api/schedule/" grade) (lambda (data) (remove (all ".schedule-data")) (loop for element in (chain data data) do (let* ((cell1 (getprop (one "#schedule-table") 'children (chain element weekday))) (cell2 (chain cell1 (query-selector "tbody"))) (cell (getprop cell2 'children (- (chain element hour) 1) 'children 1)) (template (get-template "schedule-data-static-cell-template"))) (setf (inner-text (one ".data" template)) (concatenate 'string (chain element course subject) " " (chain element course type) " " (chain element course teacher name) " " (chain element room) " " (getprop *WEEK-MODULO* (chain element week-modulo)))) (chain cell (prepend template)))) (show-tab "#schedule")))) (defroute "/schedule/:grade/edit" (show-tab "#loading") (show (one "#schedule-show-button")) (hide (one "#schedule-edit-button")) (show (all ".add-course")) (load-courses) (cache-then-network (concatenate 'string "/api/schedule/" grade "/all") (lambda (data) (remove (all ".schedule-data")) (loop for element in (chain data data) do (let* ((cell1 (getprop (one "#schedule-table") 'children (chain element weekday))) (cell2 (chain cell1 (query-selector "tbody"))) (cell (getprop cell2 'children (- (chain element hour) 1) 'children 1)) (template (get-template "schedule-data-cell-template"))) (setf (inner-text (one ".data" template)) (concatenate 'string (chain element course subject) " " (chain element course type) " " (chain element course teacher name) " " (chain element room) " " (getprop *WEEK-MODULO* (chain element week-modulo)))) (chain (one ".button-delete-schedule-data" template) (set-attribute "data-id" (chain element id))) (chain cell (prepend template)))) (show-tab "#schedule")))) (on ("submit" (one "#form-schedule-data") event) (chain event (prevent-default)) (let* ((day (chain (one "#schedule-data-weekday") value)) (hour (chain (one "#schedule-data-hour") value)) (cell1 (getprop (one "#schedule-table") 'children day)) (cell2 (chain cell1 (query-selector "tbody"))) (cell (getprop cell2 'children (- hour 1) 'children 1)) (template (get-template "schedule-data-cell-template")) (course (chain (one ".course-select" (one "#form-schedule-data")) selected-options 0 inner-text)) (room (chain (one "#room") value)) (form-element (chain document (query-selector "#form-schedule-data"))) (form-data (new (-form-data form-element))) (grade (chain location pathname (split "/") 2))) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch (concatenate 'string "/api/schedule/" grade "/add") (create method "POST" body form-data)) (then check-status) (then json) (then (lambda (data) (setf (chain template (query-selector ".data") inner-text) (concatenate 'string course " " room (getprop *WEEK-MODULO* (value (one "#week-modulo"))))) (chain cell (prepend template)) (hide-modal (one "#modal-schedule-data")))) (catch handle-fetch-error)))) (on ("click" (all ".schedule-tab-link") event) (chain event (prevent-default)) (chain event (stop-propagation)) (chain window history (replace-state null null (href (chain event target)))) f) (when (chain document location hash) (chain (new (bootstrap.-Tab (one (concatenate 'string "a[href=\"" (chain document location hash) "\"]")))) (show))) (on ("click" (one "body") event :dynamic-selector ".add-course") (chain console (log event)) (let* ((y (chain event target (closest "tr") row-index)) (x-element (chain event target (closest "div"))) (x (chain -array (from (chain x-element parent-node children)) (index-of x-element)))) (setf (chain (one "#schedule-data-weekday") value) x) (setf (chain (one "#schedule-data-hour") value) y) (show-modal (one "#modal-schedule-data")))) (on ("click" (one "body") event :dynamic-selector ".button-delete-schedule-data") (chain console (log event)) (let* ((id (chain event target (closest ".button-delete-schedule-data") (get-attribute "data-id"))) (form-data (new (-form-data))) (grade (chain location pathname (split "/") 2))) (chain form-data (append "id" id)) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (if (confirm "Möchtest du den Eintrag wirklich löschen? Mit dem Veröffentlichen garantierst du, dass du nicht die Rechte anderer verletzt und bist damit einverstanden, unter der Creative Commons Namensnennung - Nicht-kommerziell - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz zu veröffentlichen.") (chain (fetch (concatenate 'string "/api/schedule/" grade "/delete") (create method "POST" body form-data)) (then check-status) (then (lambda (data) (chain event target (closest ".schedule-data") (remove)))) (catch handle-fetch-error)))))
7,499
Common Lisp
.lisp
127
47.543307
321
0.587412
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
d9bec190f0cd5ed99b0ee25f236fcb356c90ea0b7775649c7cdc6b04122ff84b
38,199
[ -1 ]
38,200
index.lisp
mohe2015_schule/js/substitution-schedule/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "/js/show-tab.lisp" "showTab") (i "/js/fetch.lisp" "checkStatus" "json" "html" "handleFetchError" "cacheThenNetwork") (i "/js/utils.lisp" "all" "one" "clearChildren") (i "/js/template.lisp" "getTemplate") (i "/js/read-cookie.lisp" "readCookie") (i "/js/state-machine.lisp" "pushState") (defun group-by (xs key) (chain xs (reduce (lambda (rv x) (chain (setf (getprop rv (getprop x key)) (or (getprop rv (getprop x key)) (array))) (push x)) rv) (create)))) (defun substitution-to-string (substitution) (concatenate 'string (chain substitution hour) "." (if (and (chain substitution new-room) (not (equal (chain substitution old-room) (chain substitution new-room)))) (concatenate 'string " | " (chain substitution old-room) " -> " (chain substitution new-room)) "") (if (and (chain substitution new-subject) (not (equal (chain substitution old-subject) (chain substitution new-subject)))) (concatenate 'string " | " (chain substitution old-subject) " -> " (chain substitution new-subject)) "") (if (and (chain substitution new-teacher) (not (equal (chain substitution old-teacher) (chain substitution new-teacher)))) (concatenate 'string " | " (chain substitution old-teacher) " -> " (chain substitution new-teacher)) "") (if (chain substitution notes) (concatenate 'string " | " (chain substitution notes)) ""))) (defun urlBase64ToUint8Array (base64String) (let* ((padding (chain "=" (repeat (% (- 4 (% base64String.length 4)) 4)))) (base64 (chain (+ base64String padding) (replace (regex "/\\-/g") "+") (replace (regex "/_/g") "/"))) (rawData (chain window (atob base64))) (outputArray (new (-Uint8-Array (chain rawData length))))) (loop for i from 0 to (- (chain rawData length) 1) do (setf (getprop outputArray i) (chain rawData (char-Code-At i)))) outputArray)) (defun update-subscription-on-server (subscription) (let ((formdata (new (-form-data)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain formdata (append "subscription" (if subscription (chain -J-S-O-N (stringify subscription)) subscription))) (chain (fetch "/api/push-subscription" (create method "POST" body formdata)) (then (lambda (response) (chain console (log response)))) (catch (lambda (error) (chain console (log error))))))) (defun unsubscribe-user () (chain registration push-manager (get-subscription) (then (lambda (subscription) (if subscription (chain subscription (unsubscribe))))) (catch (lambda (error) (chain console (log error)))) (then (lambda () (update-subscription-on-server nil) (setf is-subscribed nil) (update-button registration))))) (defun update-button (registration) (chain registration push-manager (get-subscription) (then (lambda (subscription) (update-subscription-on-server subscription) (setf (chain window is-subscribed) (not (null subscription))) (if is-subscribed (setf (inner-text (one "#settings-enable-notifications")) "Benachrichtigungen deaktivieren") (setf (inner-text (one "#settings-enable-notifications")) "Benachrichtigungen aktivieren")) (remove-class (one "#settings-enable-notifications") "disabled"))) (catch (lambda (error) (chain console (log error)))))) (on ("load" window event) (chain navigator service-worker (register "/sw.lisp") (then (lambda (registration) (setf (chain window registration) registration) (update-button registration))) (catch (lambda (error) (chain console (log error)))))) (on ("click" (one "#settings-enable-notifications") event) (chain event (prevent-default)) (chain event (stop-propagation)) (add-class (one "#settings-enable-notifications") "disabled") (if is-subscribed (unsubscribe-user) (chain registration push-manager (subscribe (create user-visible-only t application-server-key (urlBase64ToUint8Array "BIdu79bj4cxbo-OebKwbp0wfrUAQ7MKUkGfxH_YG2W60n2knhpYFqp_64oyrV4pq8sY6wjdWuWvRnxj_TkVQqZ4="))) (then (lambda (push-registration) (chain console (log push-registration)) (update-subscription-on-server push-registration) (setf (chain window is-subscribed) t) (update-button registration))) (catch (lambda (error) (chain console (log error)) (update-button registration)))))) (defroute "/substitution-schedule" (show-tab "#loading") (cache-then-network "/api/substitutions" (lambda (data) (loop :for (k v) :of (chain data schedules) :do (let ((template (get-template "template-substitution-schedule"))) (setf (inner-text (one ".substitution-schedule-date" template)) (chain (new (-date (* k 1000))) (to-locale-date-string "de-DE"))) (if (chain v substitutions) (loop :for (clazz substitutions) :of (group-by (chain v substitutions) "class") :do (let ((class-template (get-template "template-substitution-for-class"))) (setf (inner-text (one ".template-class" class-template)) clazz) (loop for substitution in substitutions do (let ((substitution-template (get-template "template-substitution"))) (setf (inner-text (one "li" substitution-template)) (substitution-to-string substitution)) (append (one "ul" class-template) substitution-template))) (append template class-template)))) (append (one "#substitution-schedule-content") template))) (show-tab "#substitution-schedule"))))
5,936
Common Lisp
.lisp
139
35.633094
150
0.640401
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
c7c830070715a4969605250b9b061616dcfdbd84be3ad97a5e26934fb040fe83
38,200
[ -1 ]
38,201
page.lisp
mohe2015_schule/js/wiki/page.lisp
(var __-p-s_-m-v_-r-e-g) (i "../template.lisp" "getTemplate") (i "../show-tab.lisp" "showTab") (i "../math.lisp" "renderMath") (i "../image-viewer.lisp") (i "../fetch.lisp" "checkStatus" "json" "handleFetchErrorShow" "cacheThenNetwork") (i "../utils.lisp" "all" "one" "clearChildren") (i "../state-machine.lisp" "enterState") (defun update-page (data) (when (chain data categories) (remove (all ".closable-badge" (one "#categories"))) (loop for category in (chain data categories) do (let ((template (get-template "template-readonly-category"))) (setf (inner-html (one ".closable-badge" template)) category) (append (one "#categories") template)))) (setf (inner-html (one "article")) (chain data content)) (show-tab "#page")) (defroute "/wiki/:page" (enter-state "handleWikiPage") (setf (inner-text (one "#wiki-article-title")) (decode-u-r-i-component page)) (show-tab "#loading") (cache-then-network (concatenate 'string "/api/wiki/" page) update-page)) (defstate handle-wiki-page-enter (remove-class (all ".edit-button") "disabled")) (defstate handle-wiki-page-exit (add-class (all ".edit-button") "disabled"))
1,176
Common Lisp
.lisp
26
41.807692
82
0.667832
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
94269a918367264face2052f6f1ad40accc774c3f2026af1d14a0b5cf9380ca8
38,201
[ -1 ]
38,202
edit.lisp
mohe2015_schule/js/wiki/page/edit.lisp
(var __-p-s_-m-v_-r-e-g) (i "/js/show-tab.lisp" "showTab") (i "/js/math.lisp" "renderMath") (i "/js/editor.lisp" "showEditor" "hideEditor") (i "/js/utils.lisp" "all" "one" "clearChildren") (i "/js/fetch.lisp" "checkStatus" "json" "handleFetchErrorShow" "cacheThenNetwork") (i "/js/template.lisp" "getTemplate") (i "/js/state-machine.lisp" "enterState" "pushState") (on ("click" (all ".edit-button") event) (chain event (prevent-default)) (chain event (stop-propagation)) (let ((pathname (chain window location pathname (split "/")))) (push-state (concatenate 'string "/wiki/" (chain pathname 2) "/edit") (chain window history state))) f) (defun init-editor (data) ;;(chain window history (replace-state data nil nil)) (when (chain data categories) (remove (all ".closable-badge" (one "#form-settings"))) (loop for category in (chain data categories) do (let ((template (get-template "template-category"))) (setf (inner-html (one ".closable-badge-label" template)) category) (before (one "#new-category") template)))) (setf (inner-html (one "article")) (chain data content)) (show-editor) (show-tab "#page")) (defroute "/wiki/:page/edit" (enter-state "handleWikiPageEdit") (setf (inner-text (one "#wiki-article-title")) (decode-u-r-i-component page)) (show-tab "#loading") (cache-then-network (concatenate 'string "/api/wiki/" page) init-editor)) (defstate handle-wiki-page-edit-enter (add-class (all ".edit-button") "disabled")) (defstate handle-wiki-page-edit-exit (remove-class (all ".edit-button") "disabled") (hide-editor))
1,620
Common Lisp
.lisp
35
42.657143
106
0.676172
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
e5c52b3395ea91ed554c02cb8782c906904d6ab708ea0a9dd8de8e51a6a0b084
38,202
[ -1 ]
38,203
index.lisp
mohe2015_schule/js/settings/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "/js/show-tab.lisp" "showTab") (i "/js/read-cookie.lisp" "readCookie") (i "/js/fetch.lisp" "cacheThenNetwork" "checkStatus" "json" "html" "handleFetchError") (i "/js/template.lisp" "getTemplate") (i "/js/utils.lisp" "all" "one" "clearChildren") (i "/js/state-machine.lisp" "enterState" "pushState") (defun load-student-courses () (chain (fetch "/api/student-courses") (then check-status) (then json) (then (lambda (data) (loop for student-course in data do (setf (chain document (get-element-by-id (concatenate 'string "student-course-" (chain student-course course-id))) checked) t)))))) (defun load-courses () (chain (fetch "/api/courses") (then check-status) (then json) (then (lambda (data) (let ((courses-list (chain document (get-element-by-id "settings-list-courses")))) (setf (chain courses-list inner-h-t-m-l) "") (loop for page in data do (let ((template (get-template "settings-student-course-html")) (id (concatenate 'string "student-course-" (chain page course-id)))) (setf (chain template (query-selector "label") inner-text) (concatenate 'string (chain page subject) " " (chain page teacher name))) (chain template (query-selector "label") (set-attribute "for" id)) (setf (chain template (query-selector "input") id) id) (chain courses-list (append template))))) (load-student-courses) (show-tab "#tab-settings"))) (catch handle-fetch-error))) (defun load-teachers () (let ((select (chain document (query-selector "#settings-teachers-select")))) (setf (chain select inner-h-t-m-l) "") (chain (fetch "/api/teachers") (then check-status) (then json) (then (lambda (data) (loop for teacher in data do (let ((element (chain document (create-element "option")))) (setf (chain element inner-text) (chain teacher name)) (setf (chain element value) (chain teacher id)) (chain select (append-child element)))))) (catch handle-fetch-error)))) (defun load-settings () (let ((grade-select (one "#settings-select-grade"))) (cache-then-network "/api/settings" (lambda (data) (if data (setf (chain grade-select value) (chain data id))) (load-courses))))) (defun load-schedules () (cache-then-network "/api/schedules" (lambda (data) (let ((grade-select (one "#settings-select-grade"))) (clear-children grade-select) (let ((default-option (chain document (create-element "option")))) (setf (chain default-option disabled) t) (setf (chain default-option selected) t) (setf (chain default-option value) "") (setf (chain default-option inner-text) "Jahrgang ausw√§hlen...") (chain grade-select (append-child default-option))) (loop for grade in data do (let ((option (chain document (create-element "option"))) (text (chain grade grade))) (setf (chain option value) (chain grade id)) (setf (chain option inner-text) text) (chain grade-select (append-child option)))) (load-settings))))) (defun render () (show-tab "#loading") (load-schedules) (load-teachers)) (defroute "/settings" (enter-state "handleSettings") (render)) (defstate handle-settings-enter (add-class (all ".edit-button") "disabled")) (defstate handle-settings-exit (hide-modal (one "#modal-settings-create-grade")) (remove-class (all ".edit-button") "disabled")) (on ("click" (one "#settings-add-grade") event) (chain event (prevent-default)) (chain event (stop-propagation)) (show-modal (one "#modal-settings-create-grade")) f) (on ("click" (one "#settings-add-course") event) (chain event (prevent-default)) (chain event (stop-propagation)) (show-modal (one "#modal-settings-create-course")) f) (on ("click" (one "#settings-edit-schedule") event) (chain event (prevent-default)) (let* ((select (chain document (get-element-by-id "settings-select-grade"))) (grade (getprop select 'options (chain select selected-index) 'text))) (push-state (concatenate 'string "/schedule/" grade "/edit")))) (on ("click" (one "#settings-show-schedule") event) (chain event (prevent-default)) (let* ((select (chain document (get-element-by-id "settings-select-grade"))) (grade (getprop select 'options (chain select selected-index) 'text))) (push-state (concatenate 'string "/schedule/" grade)))) (on ("submit" (one "#form-settings-create-grade") event) (chain event (prevent-default)) (let* ((formelement (chain document (query-selector "#form-settings-create-grade"))) (formdata (new (-form-data formelement)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/schedules" (create method "POST" body formdata)) (then check-status) (then (lambda (data) (hide-modal (one "#modal-settings-create-grade")) (render))) (catch handle-fetch-error))) f) (on ("change" (one "#settings-select-grade") event) (let* ((formelement (chain document (query-selector "#settings-form-select-grade"))) (formdata (new (-form-data formelement)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/settings" (create method "POST" body formdata)) (then check-status) (then (lambda (data) (render))) (catch handle-fetch-error))) f) ;; TODO form cancel should abort (on ("submit" (one "#form-settings-create-course") event) (chain event (prevent-default)) (setf (disabled (one "button[type=submit" (one "#form-settings-create-course"))) t) (let* ((formelement (chain document (query-selector "#form-settings-create-course"))) (formdata (new (-form-data formelement)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/courses" (create method "POST" body formdata)) (then check-status) (then (lambda (data) (hide-modal (one "#modal-settings-create-course")) (render))) (catch handle-fetch-error) (finally (lambda (error) (setf (disabled (one "button[type=submit" (one "#form-settings-create-course"))) f))))) f) (on ("click" (one "#button-create-teacher") event) (show-modal (one "#modal-settings-create-teacher"))) (on ("submit" (one "#form-settings-create-teacher") event) (chain event (prevent-default)) (let* ((formelement (one "#form-settings-create-teacher")) (formdata (new (-form-data formelement)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/teachers" (create method "POST" body formdata)) (then check-status) (then json) (then (lambda (data) (hide-modal (one "#modal-settings-create-teacher")) (load-teachers))) (catch handle-fetch-error))) f) (on ("change" (one "body") event) (if (not (chain event target (closest ".student-course-checkbox"))) (return)) (let* ((formdata (new (-form-data)))) (chain console (log (chain event target))) (chain formdata (append "student-course" (chain (chain event target id) (substring 15)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (if (chain event target checked) (chain (fetch "/api/student-courses" (create method "POST" body formdata)) (then check-status) (catch handle-fetch-error)) (chain (fetch "/api/student-courses" (create method "DELETE" body formdata)) (then check-status) (catch handle-fetch-error)))) f)
8,212
Common Lisp
.lisp
177
37.983051
147
0.609683
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
b747dd5e93c3685ee12f19d5bcb32b6110d25f4c4ca79e950b54b5a7f2539714
38,203
[ -1 ]
38,204
index.lisp
mohe2015_schule/js/student-courses/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "../show-tab.lisp" "showTab") (i "../read-cookie.lisp" "readCookie") (i "../fetch.lisp" "cacheThenNetwork" "checkStatus" "json" "html" "handleFetchError") (i "../template.lisp" "getTemplate") (i "../utils.lisp" "all" "one" "clearChildren") (defun render () (show-tab "#loading") (chain (fetch "/api/student-courses") (then check-status) (then json) (then (lambda (data) (if (null data) (setf data ([]))) (let ((courses-list (chain document (get-element-by-id "student-courses-list")))) (setf (chain courses-list inner-h-t-m-l) "") (loop for course in data do (let ((template (get-template "student-courses-list-html"))) (setf (chain template (query-selector ".student-courses-list-subject") inner-text) (concatenate 'string (chain course course subject) " " (chain course course type) " " (chain course course teacher name))) (chain template (query-selector ".button-student-course-delete") (set-attribute "data-id-student-course" (chain course course course-id))) (chain document (get-element-by-id "student-courses-list") (append template))))))) (catch handle-fetch-error)) (show-tab "#list-student-courses")) (defroute "/student-courses" (render) (cache-then-network "/api/courses" (lambda (data) (let ((course-select (one "#student-course"))) (clear-children course-select) (loop for course in data do (let ((option (chain document (create-element "option"))) (text (concatenate 'string (chain course subject) " " (chain course type) " " (chain course teacher name)))) (setf (chain option value) (chain course course-id)) (setf (chain option inner-text) text) (chain course-select (append-child option))))))) (on ("click" (one "#add-student-course") event) (chain event (prevent-default)) (show-modal (one "#modal-student-courses"))) (on ("submit" (one "#form-student-courses") event) (chain event (prevent-default)) (let* ((form-element (one "#form-student-courses")) (form-data (new (-form-data form-element)))) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/student-courses" (create method "POST" body form-data)) (then check-status) (then (lambda (data) (hide-modal (one "#modal-student-courses")) (render))) (catch handle-fetch-error))))) (on ("click" (one "body") event :dynamic-selector ".button-student-course-delete") (let* ((form-data (new (-form-data)))) (chain form-data (append "student-course" (chain (one this) (data "id-student-course")))) (chain form-data (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/student-courses" (create method "DELETE" body form-data)) (then check-status) (then (lambda (data) (render))) (catch handle-fetch-error))))
3,490
Common Lisp
.lisp
70
36.985714
83
0.543351
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
dfa51e2eff9f6c0e852ea706ca57c8883f164ab41b3945fff97cf25972b2079b
38,204
[ -1 ]
38,205
index.lisp
mohe2015_schule/js/courses/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "../show-tab.lisp" "showTab") (i "../read-cookie.lisp" "readCookie") (i "../fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (i "../template.lisp" "getTemplate") (i "../utils.lisp" "all" "one" "clearChildren") (defroute "/courses" (show-tab "#list-courses") (chain (fetch "/api/courses") (then check-status) (then json) (then (lambda (data) (if (null data) (setf data ([]))) (let ((courses-list (chain document (get-element-by-id "courses-list")))) (setf (chain courses-list inner-h-t-m-l) "") (loop for page in data do (let ((template (get-template "courses-list-html"))) (setf (chain template (query-selector ".courses-list-subject") inner-text) (chain page subject)) (chain document (get-element-by-id "courses-list") (append template))))))) (catch handle-fetch-error)))
969
Common Lisp
.lisp
22
35.954545
79
0.573996
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
2501d2357de90c3b9a0ff7da6334d75af76370eaf0e1c39707549040a35c7fad
38,205
[ -1 ]
38,206
index.lisp
mohe2015_schule/js/schedules/index.lisp
(var __-p-s_-m-v_-r-e-g) (i "../show-tab.lisp" "showTab") (i "../read-cookie.lisp" "readCookie") (i "../fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (i "../template.lisp" "getTemplate") (i "../utils.lisp" "all" "one" "clearChildren") (defroute "/schedules" (show-tab "#list-schedules") (chain (fetch "/api/schedules") (then check-status) (then json) (then (lambda (data) (if (null data) (setf data ([]))) (let ((courses-list (chain document (get-element-by-id "schedules-list")))) (setf (chain courses-list inner-h-t-m-l) "") (loop for page in data do (let ((template (get-template "schedules-list-html"))) (chain console (log (chain page name))) (setf (chain template (query-selector ".schedules-list-grade") inner-text) (chain page grade)) (setf (chain template (query-selector ".schedules-list-grade") href) (concatenate 'string "/schedule/" (chain page grade) "/edit")) (chain document (get-element-by-id "schedules-list") (append template))))))) (catch handle-fetch-error)))
1,257
Common Lisp
.lisp
27
35.851852
81
0.550489
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
eb74af38d9a3d098ef700e18292a1fa2062d2df47960da1cff7c3ff1f7649725
38,206
[ -1 ]
38,207
new.lisp
mohe2015_schule/js/schedules/new.lisp
(var __-p-s_-m-v_-r-e-g) (i "../show-tab.lisp" "showTab") (i "../read-cookie.lisp" "readCookie") (i "../fetch.lisp" "checkStatus" "json" "html" "handleFetchError") (i "../state-machine.lisp" "pushState") (i "../utils.lisp" "all" "one" "clearChildren") (defroute "/schedules/new" (show-tab "#create-schedule-tab")) (on ("submit" (one "#create-schedule-form") event) (let* ((formelement (one "#create-schedule-form")) (formdata (new (-form-data formelement)))) (chain formdata (append "_csrf_token" (read-cookie "_csrf_token"))) (chain (fetch "/api/schedules" (create method "POST" body formdata)) (then check-status) (then json) (then (lambda (data) (push-state "/schedules") (setf (chain (one "#schedule-grade") value) ""))) (catch handle-fetch-error))) f)
842
Common Lisp
.lisp
20
36.85
74
0.611722
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
1b72c114ce80a5b03a57c6e07413c64a4eb90065d097bdd6e43e511acaeeb1ab
38,207
[ -1 ]
38,208
default-handler.lisp
mohe2015_schule/src/default-handler.lisp
(in-package :schule.web) (defparameter *static-files* (make-hash-table :test #'equal)) (loop for file in (directory (concatenate 'string (namestring *application-root*) "/static/**/*.*")) do (setf (gethash file *static-files*) file)) (defroute ("/.*" :regexp t :method :get) () (basic-headers) (let ((path (merge-pathnames (parse-namestring (subseq (request-path-info *request*) 1)) *static-directory*))) (if (gethash path *static-files*) (with-cache-vector (read-file-into-byte-vector (gethash path *static-files*)) (setf (getf (response-headers *response*) :content-type) (get-safe-mime-type path)) path) (test))))
691
Common Lisp
.lisp
13
46.461538
112
0.641481
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
ff119552c80a023a69055b00d7611d68692ddfbd70c4d0adf1b29619113648d0
38,208
[ -1 ]
38,209
vertretungsplan.lisp
mohe2015_schule/src/vertretungsplan.lisp
(defpackage schule.vertretungsplan (:use :cl :schule.pdf :schule.libc :local-time :str :schule.web) (:export :get-schedule :parse-vertretungsplan :substitution-schedules :update)) (in-package :schule.vertretungsplan) (defclass substitution-schedules () ((schedules :initform (make-hash-table) :accessor substitution-schedules))) (defun update-substitution (substitution date action) (format t "~a ~a ~a~%" action date substitution)) (defun compare-substitutions (a b) (when (not (equal (substitution-class a) (substitution-class b))) (return-from compare-substitutions nil)) (when (not (= (substitution-hour a) (substitution-hour b))) (return-from compare-substitutions nil)) (when (not (equal (substitution-course a) (substitution-course b))) (return-from compare-substitutions nil)) (when (not (equal (substitution-old-teacher a) (substitution-old-teacher b))) (return-from compare-substitutions nil)) (when (not (equal (substitution-old-room a) (substitution-old-room b))) (return-from compare-substitutions nil)) (when (not (equal (substitution-old-subject a) (substitution-old-subject b))) (return-from compare-substitutions nil)) t) (defun substitution-equal-not-same (a b) (when (compare-substitutions a b) (when (not (equal (substitution-new-teacher a) (substitution-new-teacher b))) (return-from substitution-equal-not-same t)) (when (not (equal (substitution-new-room a) (substitution-new-room b))) (return-from substitution-equal-not-same t)) (when (not (equal (substitution-new-subject a) (substitution-new-subject b))) (return-from substitution-equal-not-same t)) (when (not (equal (substitution-notes a) (substitution-notes b))) (return-from substitution-equal-not-same t))) nil) ;; TODO ignore ones from the past (defmethod update (substitution-schedules vertretungsplan) (loop for k being each hash-key of (substitution-schedules substitution-schedules) using (hash-value v) do (if (timestamp< (vertretungsplan-date v) (today)) (remhash k (substitution-schedules substitution-schedules)))) (let ((existing-schedule (gethash (timestamp-to-unix (vertretungsplan-date vertretungsplan)) (substitution-schedules substitution-schedules)))) (if existing-schedule (if (timestamp< (vertretungsplan-updated existing-schedule) (vertretungsplan-updated vertretungsplan)) (let* ((old (vertretungsplan-substitutions existing-schedule)) (new (vertretungsplan-substitutions vertretungsplan)) (updated (intersection old new :test #'substitution-equal-not-same)) (removed (set-difference old new :test #'compare-substitutions)) (added (set-difference new old :test #'compare-substitutions))) (loop for substitution in updated do (update-substitution substitution (vertretungsplan-date vertretungsplan) 'UPDATED)) (loop for substitution in removed do (update-substitution substitution (vertretungsplan-date vertretungsplan) 'REMOVED)) (loop for substitution in added do (update-substitution substitution (vertretungsplan-date vertretungsplan) 'ADDED)) (setf (gethash (timestamp-to-unix (vertretungsplan-date vertretungsplan)) (substitution-schedules substitution-schedules)) vertretungsplan) (log:info "updated")) (log:info "old update")) (progn (setf (gethash (timestamp-to-unix (vertretungsplan-date vertretungsplan)) (substitution-schedules substitution-schedules)) vertretungsplan) (loop for substitution in (vertretungsplan-substitutions vertretungsplan) do (update-substitution substitution (vertretungsplan-date vertretungsplan) 'ADDED)))))) (defun get-schedule (url) (uiop:with-temporary-file (:pathname temp-path :keep t) (serapeum:write-stream-into-file (dex:get url :want-stream t :headers '(("User-Agent" . "Vertretungsplan-App Moritz Hedtke <[email protected]>")) :basic-auth (cons (uiop:getenv "SUBSTITUTION_SCHEDULE_USERNAME") (uiop:getenv "SUBSTITUTION_SCHEDULE_PASSWORD"))) temp-path :if-does-not-exist :create :if-exists :supersede))) ;; TOOD FIXME class is missing (defclass substitution () ((class :initarg :class :accessor substitution-class) (hour :initarg :hour :accessor substitution-hour) (course :initarg :course :accessor substitution-course) (old-teacher :initarg :old-teacher :accessor substitution-old-teacher) (new-teacher :initarg :new-teacher :accessor substitution-new-teacher) (old-room :initarg :old-room :accessor substitution-old-room) (new-room :initarg :new-room :accessor substitution-new-room) (old-subject :initarg :old-subject :accessor substitution-old-subject) (new-subject :initarg :new-subject :accessor substitution-new-subject) (notes :initarg :notes :accessor substitution-notes))) (defmethod print-object ((obj substitution) out) (format out "~a ~a ~a ~a ~a ~a ~a ~a ~a ~a" (substitution-class obj) (substitution-hour obj) (substitution-course obj) (substitution-old-teacher obj) (substitution-new-teacher obj) (substitution-old-room obj) (substitution-new-room obj) (substitution-old-subject obj) (substitution-new-subject obj) (substitution-notes obj))) (defun parse-substitution (class substitution-list) (let* ((position (position "==>" substitution-list :test 'equal)) (left (subseq substitution-list 0 position)) (right (subseq substitution-list (1+ position))) (s (make-instance 'substitution))) (setf (substitution-class s) class) (setf (substitution-hour s) (parse-integer (nth 0 left))) (setf (substitution-old-teacher s) (nth 1 left)) (setf (substitution-course s) (nth 2 left)) (setf (substitution-old-subject s) (nth 3 left)) (setf (substitution-old-room s) (nth 4 left)) (cond ((or (= 4 (length right)) (= 5 (length right))) (setf (substitution-new-teacher s) (nth 0 right)) (if (= 0 (length (substitution-new-teacher s))) (setf (substitution-new-teacher s) "?")) (unless (equal (nth 1 right) (substitution-course s)) (error "course not found")) (setf (substitution-new-subject s) (nth 2 right)) (setf (substitution-new-room s) (nth 3 right)) (if (= 5 (length right)) (setf (substitution-notes s) (nth 4 right)) (setf (substitution-notes s) nil))) ((or (= 1 (length right)) (= 2 (length right))) (setf (substitution-new-teacher s) nil) (setf (substitution-new-room s) nil) (setf (substitution-new-subject s) nil) (if (equal "-----" (nth 0 right)) (setf (substitution-notes s) "") (if (equal "?????" (nth 0 right)) (setf (substitution-notes s) "?????") (error "wtf2"))) (when (= 2 (length right)) (setf (substitution-notes s) (concatenate 'string (substitution-notes s) " " (nth 1 right))))) (t (error "fail"))) s)) (defclass vertretungsplan () ((date :accessor vertretungsplan-date) (updated-at :accessor vertretungsplan-updated) (substitutions :initform '() :accessor vertretungsplan-substitutions))) (defun parse-vertretungsplan (extractor &optional (vertretungsplan (make-instance 'vertretungsplan))) (unless (read-new-page extractor) (return-from parse-vertretungsplan vertretungsplan)) (read-newline extractor) (setf (vertretungsplan-updated vertretungsplan) (local-time:unix-to-timestamp (strptime (replace-all "Mrz" "Mär" (read-line-part extractor)) "%a, %d. %b %Y %H:%M Uhr"))) ;(unless (equal "" (read-line-part extractor)) ; (error "fail")) (read-newline extractor) (read-line-part extractor) ; date-code and school (read-newline extractor) (let ((element (read-line-part extractor)) (last-state nil) (class nil)) (loop (cond ((or (equal element "Vertretungsplan für") (equal element "Ersatzraumplan für")) (read-newline extractor) (let ((date (replace-all "Mrz" "Mär" (read-line-part extractor)))) (setf (vertretungsplan-date vertretungsplan) (local-time:unix-to-timestamp (strptime date "%A, %d. %b %Y")))) (read-newline extractor) (unless (current-line extractor) (return-from parse-vertretungsplan vertretungsplan)) (setf element (read-line-part extractor)) (setf last-state :for)) ((equal (trim element) "Aufsicht: v. d. Unterricht:") (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state nil)) ((starts-with? "1. Pause:" (trim element)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state nil)) ((starts-with? "2. Pause:" (trim element)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state nil)) ((starts-with? "Bus:" (trim element)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state nil)) ((starts-with? "fehlende Lehrer:" (trim element)) (loop for elem = (read-line-part extractor) while elem do (progn)) ;; (format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :missing-teachers)) ((starts-with? "fehlende Klassen:" (trim element)) (loop for elem = (read-line-part extractor) while elem do (progn)) ;;(format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :classes)) ((starts-with? "fehlende Räume:" (trim element)) (loop for elem = (read-line-part extractor) while elem do (progn)) ;;(format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :missing-rooms)) ;; belongs to missing teachers ((and (eq last-state :missing-teachers) (starts-with? "(-) " (trim element))) (loop for elem = (read-line-part extractor) while elem do (progn)) ;; (format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :missing-teachers)) ;; belongs to missing classes ((and (eq last-state :classes) (starts-with? "(-) " (trim element))) (loop for elem = (read-line-part extractor) while elem do (progn)) ;; (format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :classes)) ;; belongs to missing rooms ((and (eq last-state :missing-rooms) (starts-with? "(-) " (trim element))) (loop for elem = (read-line-part extractor) while elem do (progn)) ;; (format t "~a~%" elem)) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :missing-rooms)) ;; :schedule ((and (or (eq last-state :schedule) (eq last-state :for) (eq last-state :missing-teachers) (eq last-state :classes) (eq last-state :missing-rooms)) (= 0 (line-length extractor))) ;; substituion schedule starts (setf class element) ;;(format t "clazz ~a~%" element) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :schedule)) ((or (eq last-state :reinigung) (starts-with? "Reinigung:" (trim element))) (read-newline extractor) (setf element (read-line-part extractor)) (setf last-state :reinigung)) ;; normal schedule part ((eq last-state :schedule) (let ((substitution (cons element (loop for elem = (read-line-part extractor) while elem collect elem)))) (push (parse-substitution class substitution) (vertretungsplan-substitutions vertretungsplan))) (unless (read-newline extractor) (return-from parse-vertretungsplan (parse-vertretungsplan extractor vertretungsplan))) (setf element (read-line-part extractor)) (setf last-state :schedule)) ((not element) (error "unexpected end")) (t #|(format t "~a~%" element)|# (break))))) vertretungsplan)
12,780
Common Lisp
.lisp
262
40.69084
188
0.649632
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
d0486e4dd53baf05af9c3d78efadeea6d3aa0c32adc19d48dda8ed30046d2fb9
38,209
[ -1 ]
38,210
db.lisp
mohe2015_schule/src/db.lisp
(in-package :schule.db) (defun connection-settings (&optional (db :maindb)) (cdr (assoc db (config :databases)))) (defun db (&optional (db :maindb)) (apply #'connect-cached (connection-settings db))) (defmacro with-connection (conn &body body) `(let ((*connection* ,conn)) ,@body)) (defclass schedule () ((grade :col-type (:varchar 64) :initarg :grade :accessor schedule-grade)) (:metaclass dao-table-class) (:unique-keys grade)) (defclass user () ((name :col-type (:varchar 64) :initarg :name :accessor user-name) (group :col-type (:varchar 64) :initarg :group :inflate (compose #'make-keyword #'string-upcase) :deflate #'string-downcase :accessor user-group) (hash :col-type (:varchar 512) :initarg :hash :accessor user-hash) (grade :col-type (or schedule :null) :initarg :grade :accessor user-grade)) (:metaclass dao-table-class)) (defclass wiki-article () ((title :col-type (:varchar 128) :initarg :title :accessor wiki-article-title)) (:metaclass dao-table-class)) (defclass wiki-article-revision () ((author :col-type user :initarg :author :accessor wiki-article-revision-author) (article :col-type wiki-article :initarg :article :accessor wiki-article-revision-article) (summary :col-type (:varchar 256) :initarg :summary :accessor wiki-article-revision-summary) (content :col-type (:text) :initarg :content :accessor wiki-article-revision-content)) (:metaclass dao-table-class)) (defclass wiki-article-revision-category () ((revision :col-type wiki-article-revision :initarg :revision :accessor wiki-article-revision-category-revision) (category :col-type (:varchar 256) :initarg :category :accessor wiki-article-revision-category-category)) (:metaclass dao-table-class)) (defclass my-session () ((session-cookie :col-type (:varchar 512) :initarg :session-cookie :accessor my-session-cookie) (csrf-token :col-type (:varchar 512) :initarg :csrf-token :accessor my-session-csrf-token) (user :col-type (or user :null) :initarg :user :accessor my-session-user)) (:metaclass dao-table-class)) (defclass quiz () () (:metaclass dao-table-class)) (defclass quiz-revision () ((author :col-type user :initarg :author :accessor quiz-revision-author) (quiz :col-type quiz :initarg :quiz :accessor quiz-revision-quiz) (content :col-type (:text) :initarg :content :accessor quiz-revision-content)) (:metaclass dao-table-class)) (defclass teacher () () (:metaclass dao-table-class)) (defclass teacher-revision () ((author :col-type user :initarg :author :accessor teacher-revision-author) (teacher :col-type teacher :initarg :teacher :accessor teacher-revision-teacher) (name :col-type (:varchar 128) :initarg :name :accessor teacher-revision-name) (initial :col-type (:varchar 64) :initarg :initial :accessor teacher-revision-initial)) (:metaclass dao-table-class)) (defclass schedule-revision () ((author :col-type user :initarg :author :accessor schedule-revision-author) (schedule :col-type schedule :initarg :schedule :accessor schedule-revision-schedule)) (:metaclass dao-table-class)) (defclass course () () (:metaclass dao-table-class)) (defclass schedule-data () ((weekday :col-type (:integer) :initarg :weekday :accessor schedule-data-weekday) (hour :col-type (:integer) :initarg :hour :accessor schedule-data-hour) (week-modulo :col-type (:integer) :integer :week-modulo :accessor schedule-data-week-modulo) (course :col-type course :initarg :course :accessor schedule-data-course) (room :col-type (:varchar 32) :initarg :room :accessor schedule-data-room)) (:metaclass dao-table-class)) (defclass schedule-revision-data () ((schedule-revision :col-type schedule-revision :initarg :schedule-revision :accessor schedule-revision-data-schedule-revision) (schedule-data :col-type schedule-data :initarg :schedule-data :accessor schedule-revision-data-schedule-data)) (:metaclass dao-table-class)) (defclass course-revision () ((author :col-type user :initarg :author :accessor course-revision-author) (course :col-type course :initarg :course :accessor course-revision-course) (teacher :col-type teacher :initarg :teacher :accessor course-revision-teacher) (type :col-type (:varchar 4) :initarg :type :accessor course-revision-type) (subject :col-type (:varchar 64) :initarg :subject :accessor course-revision-subject) (is-tutorial :col-type :boolean :initarg :is-tutorial :accessor course-revision-is-tutorial) (grade :col-type schedule :initarg :class :accessor course-revision-grade) (topic :col-type (:varchar 512) :initarg :topic :accessor course-revision-topic)) (:metaclass dao-table-class)) (defclass student-course () ((student :col-type user :initarg :student :accessor student-course-student) (course :col-type course :initarg :course :accessor student-course-course)) (:metaclass dao-table-class) (:unique-keys (student course))) (defclass web-push () ((user :col-type user :initarg :user :accessor web-push-user) (p256dh :col-type (:varchar 128) :initarg :p256dh :accessor web-push-p256dh) (auth :col-type (:varchar 32) :initarg :auth :accessor web-push-auth) (endpoint :col-type (:varchar 1024) :initarg :endpoint :accessor web-push-endpoint)) (:metaclass dao-table-class) (:unique-keys (user p256dh auth endpoint))) (defun check-table (table) (ensure-table-exists table) (migrate-table table)) (defun setup-db () (with-connection (db) (check-table 'user) (check-table 'wiki-article) (check-table 'wiki-article-revision) (check-table 'my-session) (check-table 'quiz) (check-table 'quiz-revision) (check-table 'wiki-article-revision-category) (check-table 'teacher) (check-table 'teacher-revision) (check-table 'course) (check-table 'course-revision) (check-table 'schedule) (check-table 'schedule-revision) (check-table 'schedule-data) (check-table 'web-push) (check-table 'student-course))) (defun do-generate-migrations () (with-connection (db) (generate-migrations (asdf/system:system-source-directory :schule)))) (defun do-migrate () (with-connection (db) (migrate (asdf/system:system-source-directory :schule)))) (defun do-migration-status () (with-connection (db) (migration-status (asdf/system:system-source-directory :schule))))
6,365
Common Lisp
.lisp
128
46.28125
148
0.73358
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
338f0aef8d64bdeb17c7f6f2c26407c160b9512745838e7cd590f0e2aa5a294a
38,210
[ -1 ]
38,211
student-courses.lisp
mohe2015_schule/src/student-courses.lisp
(in-package :schule.web) (my-defroute :get "/api/student-courses" (:admin :user) () "application/json" (if (user-grade user) (progn (describe user) (let* ((query (dbi.driver:prepare *connection* "SELECT student_course.* FROM student_course, course, course_revision WHERE student_course.course_id = course.id AND course_revision.course_id = course.id AND student_course.student_id = ? AND course_revision.grade_id = ?;")) (result (dbi.driver:execute query (object-id user) (object-id (user-grade user))))) (encode-json-to-string (list-to-array (mapcar #'(lambda (r) `((student-id . ,(getf r :|student_id|)) (course-id . ,(getf r :|course_id|)))) (dbi.driver:fetch-all result)))))) "[]")) (my-defroute :post "/api/student-courses" (:admin :user) (|student-course|) "text/html" (let* ((query (dbi.driver:prepare *connection* "INSERT OR IGNORE INTO student_course (student_id, course_id) VALUES (?, ?);")) (result (dbi.driver:execute query (object-id user) |student-course|))) "")) (my-defroute :delete "/api/student-courses" (:admin :user) (|student-course|) "text/html" (delete-by-values 'student-course :student user :course-id (parse-integer |student-course|)) "")
1,363
Common Lisp
.lisp
22
51.954545
279
0.608371
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
92e4ca8112767693c32c838081618a3ea61b4282a7a6e27ff180906108af727c
38,211
[ -1 ]
38,212
package.lisp
mohe2015_schule/src/package.lisp
(defpackage schule.argon2 (:use :cl :cffi :ironclad) (:export :hash :verify)) (defpackage schule.sanitize (:use :cl :sanitize) (:export :*sanitize-schule*)) (defpackage schule.tsquery-converter (:use :cl :str) (:export :tsquery-convert)) (defpackage schule.parenscript (:use :cl :parenscript :ppcre :ironclad) (:export :file-js-gen :js-files)) (defpackage schule.config (:use :cl) (:import-from :envy :config-env-var :defconfig) (:export :config :*application-root* :*static-directory* :*template-directory* :*database-path* :*javascript-directory* :appenv :developmentp :productionp)) (defpackage schule.db (:use :cl :mito) (:import-from :schule.config :config) (:import-from :cl-dbi :connect-cached) (:import-from #:alexandria #:make-keyword #:compose) (:export :connection-settings :do-generate-migrations :do-migrate :do-migration-status :db :with-connection :teacher :teacher-revision :teacher-revision-author :teacher-revision-teacher :teacher-revision-name :teacher-revision-initial :course :course-revision :course-revision-course :course-revision-author :course-revision-teacher :course-revision-type :course-revision-subject :course-revision-is-tutorial :course-revision-grade :course-revision-topic :schedule-revision-data :user :user-grade :wiki-article :wiki-article-revision :my-session :quiz :quiz-revision :user-name :user-group :user-hash :wiki-article-title :wiki-article-revision-author :wiki-article-revision-article :wiki-article-revision-summary :wiki-article-revision-content :my-session-cookie :my-session-csrf-token :my-session-user :quiz-revision-author :quiz-revision-quiz :quiz-revision-content :wiki-article-revision-category :wiki-article-revision-category-revision :wiki-article-revision-category-category :schedule :schedule-grade :schedule-revision :schedule-revision-author :schedule-revision-schedule :schedule-data :schedule-data-schedule-revision :schedule-data-weekday :schedule-data-hour :schedule-data-week-modulo :schedule-data-course :schedule-data-room :student-course :student-course-student :student-course-course :web-push :web-push-user :web-push-p256dh :web-push-auth :web-push-endpoint :setup-db)) (defpackage schule.web (:use :cl :caveman2 :schule.config :schule.db :schule.sanitize :schule.tsquery-converter :schule.parenscript :schule.web-push :mito :sxql :json :sxql.sql-type :ironclad :sanitize :schule.argon2 :alexandria :cl-who :cl-fad :cl-base64 :cffi) (:shadowing-import-from :ironclad :xor) (:shadowing-import-from :cl-fad :copy-file) (:shadowing-import-from :cl-fad :copy-stream) (:export :*web* :schedule-tab :my-defroute :update-substitution-schedule))
3,593
Common Lisp
.lisp
122
20.434426
76
0.587879
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
b40bc18339e41f07913a80220c76c5ee59108720627691a5e980d8c3b9e4d2a2
38,212
[ -1 ]
38,213
libc.lisp
mohe2015_schule/src/libc.lisp
(defpackage schule.libc (:use :cl :cffi) (:export :strptime)) (in-package :schule.libc) (define-foreign-library libc (:unix (:or "libc.so.6" "libc.so")) (:t (:default "libc"))) (use-foreign-library libc) (defcstruct tm (tm-sec :int) (tm-min :int) (tm-hour :int) (tm-mday :int) (tm-mon :int) (tm-year :int) (tm-wday :int) (tm-yday :int) (tm-isdst :int)) ;;; http://man7.org/linux/man-pages/man3/strptime.3.html (defcfun ("strptime" strptime%) :string (string :string) (format :string) (time-struct (:pointer (:struct tm)))) (defcfun mktime :uint32 (time-struct (:pointer (:struct tm)))) ;; https://stackoverflow.com/questions/6256179/how-can-i-find-the-value-of-lc-xxx-locale-integr-constants-so-that-i-can-use-the/6561967#6561967 ;; 1561355700 ;; date 1561676400 (defcenum lc_symbol (:lc-all 6)) (defcfun setlocale :string (category lc_symbol) (locale :string)) (setlocale 6 "de_DE.UTF-8") (defun strptime (string format) (with-foreign-strings ((c-string string) (c-format format)) (with-foreign-object (time '(:pointer (:struct tm))) (with-foreign-slots ((tm-sec tm-min tm-hour tm-mday tm-mon tm-year tm-wday tm-yday tm-isdst) time (:struct tm)) (setf tm-sec 0) (setf tm-min 0) (setf tm-hour 0) (setf tm-mday 0) (setf tm-mon 0) (setf tm-year 0) (setf tm-wday 0) (setf tm-yday 0) (setf tm-isdst -1) (let ((ret (strptime% c-string c-format time))) (unless ret (error "failed to parse date"))) (setf tm-isdst -1) (mktime time)))))
1,626
Common Lisp
.lisp
53
25.981132
143
0.632287
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
1e3cb98875635019f881fe41dd62e10783e647d8a9c3d3c3be17cdd27f078347
38,213
[ -1 ]
38,214
argon2.lisp
mohe2015_schule/src/argon2.lisp
(in-package :schule.argon2) (define-foreign-library libargon2 (:unix (:or "libargon2.so.1" "libargon2.so")) (:t (:default "libargon2"))) (use-foreign-library libargon2) (defctype size :unsigned-int) (defcenum argon2_errorcodes (:argon2_ok 0) (:argon2_output_ptr_null -1) (:argon2_output_too_short -2) (:argon2_output_too_long -3) (:argon2_pwd_too_short -4) (:argon2_pwd_too_long -5) (:argon2_salt_too_short -6) (:argon2_salt_too_long -7) (:argon2_ad_too_short -8) (:argon2_ad_too_long -9) (:argon2_secret_too_short -10) (:argon2_secret_too_long -11) (:argon2_time_too_small -12) (:argon2_time_too_large -13) (:argon2_memory_too_little -14) (:argon2_memory_too_much -15) (:argon2_lanes_too_few -16) (:argon2_lanes_too_many -17) (:argon2_pwd_ptr_mismatch -18) (:argon2_salt_ptr_mismatch -19) (:argon2_secret_ptr_mismatch -20) (:argon2_ad_ptr_mismatch -21) (:argon2_memory_allocation_error -22) (:argon2_free_memory_cbk_null -23) (:argon2_allocate_memory_cbk_null -24) (:argon2_incorrect_parameter -25) (:argon2_incorrect_type -26) (:argon2_out_ptr_mismatch -27) (:argon2_threads_too_few -28) (:argon2_threads_too_many -29) (:argon2_missing_args -30) (:argon2_encoding_fail -31) (:argon2_decoding_fail -32) (:argon2_thread_fail -33) (:argon2_decoding_length_fail -34) (:argon2_verify_mismatch -35)) (defcenum argon2_type (:argon2_d 0) (:argon2_i 1) (:argon2_id 2)) (defcfun "argon2_encodedlen" size (t-cost :uint32) (m-cost :uint32) (parallelism :uint32) (saltlen size) (hashlen size) (type argon2_type)) (defcfun "argon2id_hash_encoded" argon2_errorcodes (t-cost :uint32) (m-cost :uint32) (parallelism :uint32) (pwd :pointer) (pwdlen size) (salt :pointer) (saltlen size) (hashlen size) (encoded :pointer) (encodedlen size)) (defcfun "argon2id_verify" argon2_errorcodes (encoded :pointer) (pwd :pointer) (pwdlen size)) (defparameter *hashlen* 32) (defparameter *saltlen* 16) (defun hash (password) (with-foreign-array (salt (random-data *saltlen*) `(:array :uint8 ,*saltlen*)) (with-foreign-string ((pwd pwdlen) password) (let ((t-cost 2) (m-cost (ash 1 16)) (parallelism 1)) (with-foreign-pointer (encoded (argon2-encodedlen t-cost m-cost parallelism *saltlen* *hashlen* :argon2_id) encodedlen) (assert (eq :argon2_ok (argon2id-hash-encoded t-cost m-cost parallelism pwd pwdlen salt *saltlen* *hashlen* encoded encodedlen))) (foreign-string-to-lisp encoded)))))) (defun verify (password hash) (with-foreign-string ((pwd pwdlen) password) (with-foreign-string (encoded hash) (eq :argon2_ok (argon2id-verify encoded pwd pwdlen)))))
2,718
Common Lisp
.lisp
83
29.457831
139
0.695006
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
e931afe88026615f21b624671fedbe2ffceef182a4991266fe936803a45e0d1d
38,214
[ -1 ]
38,215
index.lisp
mohe2015_schule/src/index.lisp
(in-package :schule.web) (defun get-html () `(:html :lang "en" (:head (:meta :charset "utf-8") (:meta :name "viewport" :content "width=device-width, initial-scale=1, shrink-to-fit=no") (:link :rel "stylesheet" :href "/bootstrap.css") (:link :rel "stylesheet" :href "/all.css") (:link :rel "stylesheet" :href "/index.css") (:title "Spickipedia")) (:body (:template :id "multiple-choice-answer-html" ,(checkbox-input "Check this custom" "customCheck1" "name")) (:template :id "teachers-list-html" (:li :class "teachers-list-name")) (:template :id "courses-list-html" (:li :class "courses-list-subject")) (:template :id "schedules-list-html" (:li (:a :class "schedules-list-grade norefresh"))) (:template :id "multiple-choice-question" (:div :class "multiple-choice-question" (:form ,(text-input "Frage eingeben" "random-id-1" "question" :classes "question") (:div :class "responses") (:button :type "button" :class "btn btn-primary mb-1 add-response-possibility" "Antwortmöglichkeit hinzufügen")) (:hr))) (:template :id "text-question" (:div :class "text-question" (:form ,(text-input "Frage eingeben" "random-id-2" "question" :classes "question") ,(text-input "Antwort eingeben" "random-id-3" "answer" :classes "answer")) (:hr))) (:template :id "multiple-choice-response-possibility" (:div :class "input-group mb-3" (:div :class "input-group-prepend" (:div :class "input-group-text" (:input :class "multiple-choice-response-correct" :type "checkbox" :aria-label "Checkbox for following text input"))) (:input :type "text" :class "form-control multiple-choice-response-text" :aria-label "Text input with checkbox"))) (:template :id "search-result-template" (:a :class "list-group-item list-group-item-action" (:div (:div (:h5 :class "mt-0 s-title" "Media heading") (:div :class "search-result-summary word-wrap"))))) (:template :id "history-item-template" " " (:div :class "list-group-item list-group-item-action" (:div :class "d-flex w-100 justify-content-between" (:h5 :class "mb-1 history-username" "Moritz Hedtke") (:small :class "history-date" "vor 3 Tagen")) (:p :class "mb-1 history-summary" "Ein paar wichtige Infos hinzugefügt") (:small (:span :class "history-characters" "50.322") " Zeichen" (:span :class "text-success d-none" "+ 50 Zeichen")) (:div :class "btn-group w-100" :role "group" :aria-label "Basic example" (:a :type "button" :class "btn btn-outline-dark history-show" (:i :class "fas fa-eye")) (:a :type "button" :class "btn btn-outline-dark history-diff" (:i :class "fas fa-columns"))))) (:template :id "articles-entry" (:li (:a :class "" :href "#" "Hauptseite"))) (:template :id "template-category" (:span :class "closable-badge bg-secondary" (:span :class "closable-badge-label") (:button :type "button" :class "close close-tag" :aria-label "Close" (:span :aria-hidden "true" "&times;")))) (:template :id "template-readonly-category" (:span :class "closable-badge bg-secondary")) (:nav :class "navbar navbar-expand-md navbar-light bg-light" (:a :class "navbar-brand " :href "/wiki/Hauptseite" "Spickipedia ") (:div :class "login-hide" (:a :class "btn d-inline d-md-none edit-button" (:i :class "fas fa-pen")) #|(:a :class "btn d-inline d-md-none search-button " :href "/search") (:i :class "fas fa-search")|# (:button :class "navbar-toggler" :type "button" :data-toggle "collapse" :data-target "#navbarSupportedContent" :aria-controls "navbarSupportedContent" :aria-expanded "false" :aria-label "Toggle navigation" (:span :class "navbar-toggler-icon"))) (:div :class "collapse navbar-collapse" :id "navbarSupportedContent" (:ul :class "navbar-nav mr-auto" #|(:li :class "nav-item d-none d-md-block") (:a :class "nav-link search-button " :href "/search" "Suchen")|# (:li :class "nav-item d-none d-md-block" (:a :class "nav-link edit-button" :href "" "Bearbeiten")) (:li :class "nav-item" (:a :class "nav-link" :href "/settings" "Einstellungen")) (:li :class "nav-item" (:a :class "nav-link" :href "/contact" "Kontakt")) (:li :class "nav-item" (:a :class "nav-link" :href "/logout" :id "logout" "Abmelden")))))) (:div ,(tab "edit-quiz" `(:h1 :class "text-center" "Quiz ändern") `(:div :id "questions") `(:button :type "button" :class "btn btn-primary mb-1 create-multiple-choice-question" "Multiple-Choice-Frage hinzufügen") `(:button :type "button" :class "btn btn-primary mb-1 create-text-question" "Frage mit Textantwort hinzufügen") `(:button :type "button" :class "btn btn-primary mb-1 save-quiz" "Speichern")) ,(contact-html) ,(tab "articles" `(:h1 :class "text-center" "Alle Artikel") `(:ul :id "articles-list")) ,(tab "tags" `(:h1 :class "text-center" "Tags") `(:ul :id "tags-list")) ,(tab "create-schedule-tab" `(:form :method "POST" :action "/api/schedules" :id "create-schedule-form" ,(text-input "Jahrgang" "schedule-grade" "grade") ,(submit-button "Stundenplan erstellen"))) ,@(html-settings) ,@(template-substitution-schedule) ,(tab "multiple-choice-question-html" `(:h2 :class "text-center question-html" "Dies ist eine Testfrage?") `(:div :class "row justify-content-center" (:div :class "col col-sm-10 col-md-6" (:div :id "answers-html") (:button :type "button" :class "btn btn-primary mt-1 multiple-choice-submit-html" "Absenden") (:button :type "button" :class "btn btn-primary mt-1 next-question d-none" "Nächste Frage")))) ,(tab "quiz-results" `(:h1 :class "text-center" "Ergebnisse") `(:p :id "result")) ,(tab "list-teachers" `(:h2 :class "text-center" "Lehrer" (:a :href "/teachers/new" :type "button" :class "btn btn-primary norefresh" "+")) `(:ul :id "teachers-list")) ,@(html-user-courses) ,@(html-schedule) ,(tab "list-schedules" `(:h2 :class "text-center" "Stundenpläne" (:a :href "/schedules/new" :type "button" :class "btn btn-primary norefresh" "+")) `(:ul :id "schedules-list")) ,(tab "text-question-html" `(:h2 :class "text-center question-html" "Dies ist eine Testfrage?") `(:div :class "row justify-content-center" (:div :class "col col-sm-10 col-md-6" (:div :id "answers-html" " " (:input :type "text" :class "form-control" :id "text-response")) (:button :type "button" :class "btn btn-primary mt-1 text-submit-html" "Absenden") (:button :type "button" :class "btn btn-primary mt-1 next-question d-none" "Nächste Frage")))) (:div :class "container my-tab position-absolute col-sm-6 offset-sm-3 col-md-4 offset-md-4 text-center d-none" :id "login" (:h1 "Anmelden") (:form :id "login-form" ,(text-input "Name" "inputName" "username" :required t :autofocus t :autocomplete "username" :no-label? t) (:div :class "form-group" (:input :type "password" :id "inputPassword" :name "password" :class "form-control" :placeholder "Passwort" :required "" :autocomplete "current-password")) ,(submit-button "Anmelden" :id "login-button"))) ,(tab "page" `(:div :class "alert alert-warning mt-1 d-none" :id "is-outdated-article" :role "alert" " Dies zeigt den Artikel zu einem bestimmten Zeitpunkt und ist somit nicht unbedingt aktuell! " (:a :href "#" :id "currentVersionLink" :class "alert-link " "Zur aktuellen Version")) `(:h1 :class "text-center" :id "wiki-article-title" "title") `(:div :class "article-editor" (:div :id "editor" :class "d-none" (:a :href "#" :id "format-p" (:span :class "fas fa-paragraph")) " " (:a :href "#" :id "format-h2" (:span :class "fas fa-heading")) " " (:a :href "#" :id "format-h3" (:span :class "fas fa-heading")) " " (:a :href "#" :id "superscript" (:span :class "fas fa-superscript")) " " (:a :href "#" :id "subscript" (:span :class "fas fa-subscript")) " " (:a :href "#" :id "insertUnorderedList" (:span :class "fas fa-list-ul")) " " (:a :href "#" :id "insertOrderedList" (:span :class "fas fa-list-ol")) " " (:a :href "#" :id "indent" (:span :class "fas fa-indent")) " " (:a :href "#" :id "outdent" (:span :class "fas fa-outdent")) " " (:a :href "#" :id "createLink" (:span :class "fas fa-link")) " " (:a :href "#" :id "insertImage" (:span :class "fas fa-image")) " " (:a :href "#" :id "table" (:span :class "fas fa-table")) " " (:a :href "#" :id "undo" (:span :class "fas fa-undo")) " " (:a :href "#" :id "redo" (:span :class "fas fa-redo")) " " (:a :href "#" :id "settings" (:span :class "fas fa-cog")) " " (:a :href "#" :id "finish" (:span :class "fas fa-check"))) (:article)) `(:div :id "categories") `(:div (:button :id "show-history" :type "button" :class "btn btn-outline-primary" "Änderungsverlauf")) `(:small "Dieses Werk ist lizenziert unter einer " ,(license))) ,(tab "not-found" `(:div :class "alert alert-danger" :role "alert" " Der Artikel konnte nicht gefunden werden. Möchtest du ihn " (:a :id "create-article" :href "#" :class "alert-link" "erstellen") "?")) ,(tab "history" `(:h1 :class "text-center" "Änderungsverlauf") `(:div :class "list-group" :id "history-list")) ,(tab "search" `(:div :class "input-group mb-3" (:input :type "text" :class "form-control" :id "search-query" :placeholder "Suchbegriff") (:div :class "input-group-append" (:button :class "btn btn-outline-secondary" :type "button" :id "button-search" (:i :class "fas fa-search")))) `(:div (:div :style "left: 50%; margin-left: -1rem;" :class "position-absolute d-none" :id "search-results-loading" (:div :class "spinner-border" :role "status" (:span :class "sr-only" "Loading..."))) (:div :class "d-none" :id "search-results" (:div :class "text-center d-none" :id "no-search-results" (:div :class "alert alert-warning" :role "alert" " Es konnte kein Artikel mit genau diesem Titel gefunden werden. Möchtest du ihn " (:a :id "search-create-article" :href "#" :class "alert-link " "erstellen") "?")) (:div :class "list-group" :id "search-results-content")))) (:div :class "my-tab position-absolute" :style "top: 50%; left: 50%; margin-left: -1rem; margin-top: -1rem;" :id "loading" (:div :class "spinner-border" :role "status" (:span :class "sr-only" "Loading..."))) ,(tab "error" `(:div :class "alert alert-danger" :role "alert" (:span :id "errorMessage") " " (:a :href "#" :id "refresh" :class "alert-link" "Erneut versuchen"))) ,(modal "publish-changes" "Änderungen veröffentlichen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Bearbeitung fortsetzen") (:button :type "button" :class "btn btn-primary" :id "publish-changes" "Änderungen veröffentlichen")) `((:div :class "form-group" " " (:label "Änderungszusammenfassung:") (:br) (:textarea :class "form-control" :id "change-summary" :rows "3")) ,(license-disclaimer))) ,(modal "wiki-link" "Spickipedia-Link einfügen" `((:button :type "button" :class "btn btn-primary" "Änderungen veröffentlichen")) `(,(text-input "Anzeigetext" "article-link-text" "link-text") ,(text-input "Spickipedia-Artikel" "article-link-title" "link-title"))) ,(modal "settings" "Kategorien" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Fertig")) `(,(text-input "Kategorie..." "new-category" "category" :no-label? t))) ,(modal "create-link" "Link erstellen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") ,(submit-button "Ok")) `((:div :class "form-group" :style "position: relative; display: inline-block;" (:input :type "text" :id "create-link" :class "form-control link-input" :autocomplete "off") (:div :class "dropdown-menu" :style "position: absolute; top: 100%; left: 0px; z-index: 100; width: 100%;")))) ,(modal "edit-link" "Link ändern" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") ,(submit-button "Ok")) `((:div :class "form-group" :style "position: relative; display: inline-block;" (:input :type "text" :id "edit-link" :class "form-control link-input" :autocomplete "off") (:div :class "dropdown-menu" :style "position: absolute; top: 100%; left: 0px; z-index: 100; width: 100%;")))) ,(modal "table" "Tabelle" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "button" :class "btn btn-primary" :id "update-table" "Ok")) `((:div :class "form-group" (:label :for "table-columns" "Spalten:") (:input :type "number" :id "table-columns" :class "form-control")) (:div :class "form-group" (:label :for "table-rows" "Zeilen:") " " (:input :type "number" :id "table-rows" :class "form-control")))) ,(modal "image" "Bild" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "button" :class "btn btn-primary" :id "update-image" "Ok")) `((:div :class "form-group" (:label :for "image-file" "Bild auswählen:") (:input :type "file" :accept "image/*" :class "form-control-file" :id "image-file")) (:div :class "form-group" (:label :for "image-url" "Bild-URL:") (:input :type "url" :id "image-url" :class "form-control")))) ,(modal "formula" "Formel" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "button" :class "btn btn-primary" :id "update-formula" "Ok")) `((:div :class "form-group" (:div :class "alert alert-warning" :role "alert" "Formeln editieren funktioniert nur in Google Chrome zuverlässig!") (:span :id "formula" "e=mc^2")))) (:script :src "/popper.js") (:script :src "/bootstrap.js") (:script :type "module" :src "/js/index.lisp") (:link :rel "stylesheet" :href "/mathlive.core.css") (:link :rel "stylesheet" :href "/mathlive.css")))) #| (:script :src "/visual-diff.js") |#
16,515
Common Lisp
.lisp
294
43.840136
127
0.5468
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
306aae88f7dd13784fc6d57716f9ee2ada5c29eef0792ab3ad11cc4f311424fe
38,215
[ -1 ]
38,216
show-dependencies.lisp
mohe2015_schule/src/show-dependencies.lisp
(defun get-graph () `((:parenscript-file "js/read-cookie" :depends-on ("js/utils")) (:parenscript-file "js/editor" :depends-on ("js/editor-lib" "js/math" "js/read-cookie" "js/state-machine" "js/utils" "js/fetch")) (:parenscript-file "js/fetch" :depends-on ("js/state-machine" "js/utils" "js/show-tab")) (:parenscript-file "js/categories" :depends-on ("js/show-tab" "js/read-cookie" "js/utils" "js/template")) (:parenscript-file "js/file-upload" :depends-on ("js/read-cookie" "js/utils")) (:parenscript-file "js/wiki/page" :depends-on ("js/template" "js/show-tab" "js/math" "js/image-viewer" "js/fetch" "js/utils" "js/state-machine")) (:parenscript-file "js/search" :depends-on ("js/show-tab" "js/utils" "js/template" "js/fetch")) (:parenscript-file "js/quiz" :depends-on ("js/utils")) (:parenscript-file "js/logout" :depends-on ("js/show-tab" "js/read-cookie" "js/state-machine" "js/utils" "js/fetch")) (:parenscript-file "js/login" :depends-on ("js/get-url-parameter" "js/read-cookie" "js/state-machine" "js/show-tab" "js/utils" "js/fetch")) (:parenscript-file "js/root" :depends-on ("js/state-machine" "js/utils")) (:parenscript-file "js/history" :depends-on ("js/state-machine" "js/show-tab" "js/cleanup" "js/math" "js/fetch" "js/utils" "js/template")) (:parenscript-file "js/wiki/page/edit" :depends-on ("js/cleanup" "js/show-tab" "js/math" "js/editor" "js/utils" "js/fetch" "js/template" "js/state-machine")) (:parenscript-file "js/create" :depends-on ("js/state-machine" "js/editor" "js/show-tab" "js/utils" "js/state-machine")) (:parenscript-file "js/articles" :depends-on ("js/show-tab" "js/utils")) (:parenscript-file "js/show-tab" :depends-on ("js/utils")) (:parenscript-file "js/courses/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/schedule/id" :depends-on ("js/show-tab" "js/cleanup" "js/fetch" "js/utils" "js/template" "js/read-cookie" "js/state-machine")) (:parenscript-file "js/schedules/new" :depends-on ("js/show-tab" "js/cleanup" "js/read-cookie" "js/fetch" "js/state-machine" "js/utils")) (:parenscript-file "js/schedules/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/student-courses/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/settings/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils" "js/state-machine")) (:parenscript-file "js/template" :depends-on ("js/utils")) (:parenscript-file "js/cleanup" :depends-on ("js/editor" "js/utils")) (:parenscript-file "js/math" :depends-on ("js/utils")) (:parenscript-file "js/image-viewer" :depends-on ("js/utils")) (:parenscript-file "js/substitution-schedule/index" :depends-on ("js/show-tab" "js/cleanup" "js/fetch" "js/utils" "js/template" "js/read-cookie" "js/state-machine")) (:parenscript-file "js/contact/index" :depends-on ("js/show-tab")) (:parenscript-file "js/state-machine" :depends-on ("js/utils" "js/template" "js/cleanup" "js/fetch" "js/show-tab")) (:parenscript-file "js/editor-lib" :depends-on ("js/file-upload" "js/categories" "js/fetch" "js/utils")) (:parenscript-file "js/utils") (:parenscript-file "js/index" :depends-on ("js/contact/index" "js/wiki/page" "js/search" "js/quiz" "js/logout" "js/login" "js/root" "js/history" "js/wiki/page/edit" "js/create" "js/articles" "js/categories" "js/courses/index" "js/schedule/id" "js/schedules/new" "js/schedules/index" "js/student-courses/index" "js/settings/index" "js/math" "js/image-viewer" "js/substitution-schedule/index" "js/state-machine" "js/editor-lib" "js/utils")))) (with-open-file (stream "test.dot" :direction :output :if-exists :supersede) (format stream "digraph {~%") (loop for file in (get-graph) do (loop for dependency in (nth 3 file) do (format stream "~s -> ~s;~%" (nth 1 file) dependency))) (format stream "}")) ;; dot -Tpng ~/test.dot > output.png ;; sccmap -v ~/test.dot > test.dot ;; dot -Tpng test.dot > output.png
4,152
Common Lisp
.lisp
42
94.285714
444
0.67251
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
651fab53e816374b91c1cc5cd809eea685f4663deb84c501eb6cee2caf0636e9
38,216
[ -1 ]
38,217
schedule.lisp
mohe2015_schule/src/schedule.lisp
(in-package :schule.web) (my-defroute :post "/api/teachers" (:admin :user) (|name| |initial|) "text/html" (dbi:with-transaction *connection* (let* ((teacher (create-dao 'teacher)) (revision (create-dao 'teacher-revision :author user :teacher teacher :name |name| :initial |initial|))) (format nil "~a" (object-id teacher))))) (my-defroute :get "/api/teachers" (:admin :user) () "application/json" (let* ((teachers (select-dao 'teacher)) (teacher-revisions (mapcar #'(lambda (teacher) (first (select-dao 'teacher-revision (where (:= :teacher teacher)) (order-by (:desc :id)) (limit 1)))) teachers))) (encode-json-to-string (list-to-array teacher-revisions)))) (my-defroute :post "/api/courses" (:admin :user) (|subject| |type| |teacher| |is-tutorial| |topic|) "text/html" (dbi:with-transaction *connection* (let* ((course (create-dao 'course)) (revision (create-dao 'course-revision :author user :course course :name |subject| :initial |type| :type |type| :subject |subject| :teacher (find-dao 'teacher :id (parse-integer |teacher|)) :is-tutorial (equal "on" |is-tutorial|) :class (user-grade user) :topic |topic|))) (format nil "~a" (object-id course))))) (my-defroute :get "/api/courses" (:admin :user) () "application/json" (if (user-grade user) (let* ((courses (select-dao 'course)) (course-revisions (mapcar #'(lambda (course) (first (select-dao 'course-revision (where (:and (:= :course course) (:= :grade (user-grade user)))) (order-by (:desc :id)) (limit 1)))) courses))) (encode-json-to-string (list-to-array (remove nil course-revisions)))) (encode-json-to-string #()))) (my-defroute :post "/api/schedules" (:admin :user) (|grade|) "text/html" (dbi:with-transaction *connection* (let* ((schedule (create-dao 'schedule :grade |grade|)) (revision (create-dao 'schedule-revision :author user :schedule schedule))) (format nil "~a" (object-id schedule))))) (my-defroute :get "/api/schedules" (:admin :user) () "application/json" (let* ((schedules (select-dao 'schedule))) (encode-json-to-string (list-to-array schedules)))) (defmethod encode-json ((o teacher-revision) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (with-object (stream) (encode-object-member 'id (object-id o) stream) (encode-object-member 'name (teacher-revision-name o) stream))) (defmethod encode-json ((o teacher) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (encode-json (first (select-dao 'teacher-revision (where (:= :teacher o)) (order-by (:desc :id)) (limit 1))) stream)) (defmethod encode-json ((o course-revision) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (with-object (stream) (encode-object-member 'course-id (object-id (course-revision-course o)) stream) (encode-object-member 'teacher (course-revision-teacher o) stream) (encode-object-member 'type (course-revision-type o) stream) (encode-object-member 'subject (course-revision-subject o) stream) (encode-object-member 'is-tutorial (course-revision-is-tutorial o) stream) (encode-object-member 'grade (course-revision-grade o) stream) (encode-object-member 'topic (course-revision-topic o) stream))) (defmethod encode-json ((o course) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (encode-json (first (select-dao 'course-revision (where (:= :course o)) (order-by (:desc :id)) (limit 1))) stream)) (defmethod encode-json ((o schedule-data) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (with-object (stream) (encode-object-member 'id (object-id o) stream) (encode-object-member 'weekday (schedule-data-weekday o) stream) (encode-object-member 'hour (schedule-data-hour o) stream) (encode-object-member 'week-modulo (schedule-data-week-modulo o) stream) (encode-object-member 'course (schedule-data-course o) stream) (encode-object-member 'room (schedule-data-room o) stream))) (defmethod encode-json ((o student-course) &optional (stream *json-output*)) "Write the JSON representation (Object) of the postmodern DAO CLOS object O to STREAM (or to *JSON-OUTPUT*)." (with-object (stream) (encode-object-member 'course (student-course-course o) stream) (encode-object-member 'student (student-course-student o) stream))) (my-defroute :get "/api/schedule/:grade/all" (:admin :user) (grade) "application/json" (let* ((schedule (find-dao 'schedule :grade grade))) (if schedule (let* ((revision (select-dao 'schedule-revision (where (:= :schedule schedule)) (order-by (:desc :id)) (limit 1))) (result (select-dao 'schedule-data (inner-join :schedule_revision_data :on (:= :schedule_revision_data.schedule_data_id :schedule_data.id)) (where (:= :schedule_revision_data.schedule_revision_id (object-id (car revision))))))) (encode-json-plist-to-string `(:revision ,(car revision) :data ,(list-to-array result)))) "{}"))) (my-defroute :get "/api/schedule/:grade" (:admin :user) (grade) "application/json" (let* ((schedule (find-dao 'schedule :grade grade))) (if schedule (let* ((revision (select-dao 'schedule-revision (where (:= :schedule schedule)) (order-by (:desc :id)) (limit 1))) (result (select-dao 'schedule-data (inner-join :student_course :on (:= :schedule_data.course_id :student_course.course_id)) (inner-join :schedule_revision_data :on (:= :schedule_revision_data.schedule_data_id :schedule_data.id)) (where (:and (:= :schedule_revision_data.schedule_revision_id (object-id (car revision))) (:= :student_course.student_id (object-id user))))))) (encode-json-plist-to-string `(:revision ,(car revision) :data ,(list-to-array result)))) "{}"))) (my-defroute :post "/api/schedule/:grade/add" (:admin :user) (grade |weekday| |hour| |week-modulo| |course| |room|) "application/json" (dbi:with-transaction *connection* (let* ((schedule (find-dao 'schedule :grade grade)) (last-revision (first (select-dao 'schedule-revision (where (:= :schedule schedule)) (order-by (:desc :id)) (limit 1)))) (revision (create-dao 'schedule-revision :author user :schedule schedule)) (data (create-dao 'schedule-data :schedule-revision revision :weekday |weekday| :hour |hour| :week-modulo |week-modulo| :course (find-dao 'course :id |course|) :room |room|)) (revision-data (create-dao 'schedule-revision-data :schedule-revision revision :schedule-data data)) (result (retrieve-by-sql (insert-into 'schedule_revision_data (:schedule_revision_id :schedule_data_id) (select ((:raw (object-id revision)) :schedule_data_id) (from :schedule_revision_data) (where (:= :schedule_revision_id (object-id last-revision)))))))) (format nil "~a" (object-id data))))) (my-defroute :post "/api/schedule/:grade/delete" (:admin :user) (|id|) "application/json" (dbi:with-transaction *connection* (let* ((schedule (user-grade user)) (last-revision (car (select-dao 'schedule-revision (where (:= :schedule schedule)) (order-by (:desc :id)) (limit 1)))) (revision (create-dao 'schedule-revision :author user :schedule schedule))) (mito:retrieve-by-sql (insert-into 'schedule_revision_data (:schedule_revision_id :schedule_data_id) (select ((:raw (object-id revision)) :schedule_data_id) (from :schedule_revision_data) (where (:and (:= :schedule_revision_id (object-id last-revision)) (:not (:= (parse-integer |id|) :schedule_data_id)))))))))) (defmacro test () `(progn (setf (html-mode) :html5) (with-html-output-to-string (jo nil :prologue t :indent t) ,(get-html))))
9,088
Common Lisp
.lisp
155
48.445161
170
0.614625
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
77c4ffdbe8b5265a70a34129e838c0f85e1a3a2024ecad275a16a7d9db249e6f
38,217
[ -1 ]
38,218
web-push.lisp
mohe2015_schule/src/web-push.lisp
(defpackage schule.web-push (:use :cl :cffi) (:export send-push)) (in-package :schule.web-push) (define-foreign-library libwebpush (:unix (:or "libwebpush.so.1" "libwebpush.so")) (:t (:default "libwebpush"))) (use-foreign-library libwebpush) (defcfun "send_notification" :uint32 (p256dh :pointer) (auth :pointer) (endpoint :pointer) (private_key_file :pointer) (content :pointer)) (defun send-push (p256dh auth endpoint private-key-file content) (with-foreign-strings ((p256dh-c p256dh) (auth-c auth) (endpoint-c endpoint) (private-key-file-c private-key-file) (content-c content)) (send-notification p256dh-c auth-c endpoint-c private-key-file-c content-c)))
788
Common Lisp
.lisp
21
30.428571
81
0.642202
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
a60bd8c3de654108f3b2f41f286835df5f8e4fb5bf8da7f811526b6e7cc93448
38,218
[ -1 ]
38,219
main.lisp
mohe2015_schule/src/main.lisp
(in-package :cl-user) (defpackage schule (:use :cl :cl-fsnotify :cl-fad) (:import-from :schule.config :config) (:import-from :clack :clackup) (:export :start :stop :development)) (in-package :schule) (defvar *appfile-path* (asdf/system:system-relative-pathname :schule #P"app.lisp")) (defvar *handler* nil) (defun start (&optional (debug nil)) ;;(unless *handler* ;;(schule.web:update-substitution-schedule)) (mito:connect-toplevel :sqlite3 :database-name (asdf/system:system-relative-pathname :schule #P"schule.db")) (when *handler* (restart-case (error "Server is already running.") (restart-server nil :report "Restart the server" (stop)))) (setf *handler* (clackup *appfile-path* :server :fcgi :debug debug))) (defun stop () (prog1 (clack.handler:stop *handler*) (setf *handler* nil))) (defun mapc-directory-tree (fn directory &key (depth-first-p t)) (dolist (entry (list-directory directory)) (unless depth-first-p (funcall fn entry)) (when (directory-pathname-p entry) (mapc-directory-tree fn entry)) (when depth-first-p (funcall fn entry)))) (defun development () (start t) (let ((top-level *standard-output*)) (bordeaux-threads:make-thread (lambda () (format top-level "Started compilation thread!~%") (open-fsnotify) (mapc-directory-tree (lambda (x) (if (not (pathname-name x)) (add-watch x))) (asdf/system:system-source-directory :schule)) (loop while t do (if (get-events) (progn (format top-level "Got a code update!~%") (handler-case (asdf/operate:load-system :schule :force t) (error nil (format top-level "Failed compiling!~%")))) (sleep 1)))))))
1,795
Common Lisp
.lisp
43
35.325581
110
0.643349
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
e394ac2818ca3c968527648d2607997f919a56f97414bbec4c1f86ba4837b555
38,219
[ -1 ]
38,220
parenscript.lisp
mohe2015_schule/src/parenscript.lisp
(in-package :schule.parenscript) (defparameter *js-target-version* "1.8.5") (defpsmacro defroute (route &body body) `(progn (export (defun ,(make-symbol (concatenate 'string "handle-" (subseq (regex-replace-all "/[:\\.]?" route "-") 1))) (path) (var results nil) (when (var results (chain (new (-reg-exp ,(concatenate 'string "^" (regex-replace-all "\\.[^/]*" (regex-replace-all ":[^/]*" route "([^/]*)") "(.*)") "$"))) (exec path))) ,@(loop for variable in (all-matches-as-strings "[:.][^/]*" route) for i from 1 collect `(defparameter ,(make-symbol (string-upcase (subseq variable 1))) (chain results ,i))) ,@body (return t)) (return f))) (chain (setf (chain window routes) (or (chain window routes) ([]))) (push ,(make-symbol (concatenate 'string "handle-" (subseq (regex-replace-all "/[:\\.]?" route "-") 1))))))) (defpsmacro defstate (state &body body) `(progn (export (defun ,state () ,@body)) (setf (chain window states) (or (chain window states) (new (-object)))) (setf (@ window 'states ,state) ,state))) (defpsmacro i (file &rest contents) `(import ,file ,@contents)) ;; TODO remove (defun file-js-gen (file) (in-package :schule.parenscript) (handler-bind ((simple-warning #'(lambda (e) (if (equal "Returning from unknown block ~A" (simple-condition-format-control e)) (muffle-warning))))) (defparameter *ps-gensym-counter* 0) (ps-compile-file file))) (defpsmacro on ((event-name element-s event-variable &key dynamic-selector) &body body) `(chain ,element-s (add-event-listener ,event-name (lambda (,event-variable) ,(if dynamic-selector `(if (not (chain event target (closest ,dynamic-selector))) (return))) ,@body)))) (defpsmacro inner-text (element) `(chain ,element inner-text)) (defpsmacro class-list (element) `(chain ,element class-list)) (defpsmacro array-remove (array element) `(chain ,array (remove ,element))) (defpsmacro add (array element) `(chain ,array (add ,element))) (defpsmacro remove-class (element class) `(array-remove (class-list ,element) ,class)) (defpsmacro add-class (element class) `(add (class-list ,element) ,class)) (defpsmacro content-editable (element) `(chain ,element content-editable)) (defpsmacro style (element) `(chain ,element style)) (defpsmacro display (element) `(chain ,element display)) (defpsmacro show-popover (element) `(chain ,element (show))) (defpsmacro hide-popover (element) `(chain ,element (hide))) (defpsmacro show (element) `(remove-class ,element "d-none")) (defpsmacro hide (element) `(add-class ,element "d-none")) (defpsmacro show-modal (element) `(let ((old-modal (chain bootstrap -Modal (get-Instance ,element)))) (if old-modal (chain old-modal (show)) (chain (new (bootstrap.-Modal ,element)) (show))))) ;; TODO FIXME double evaluation (defpsmacro hide-modal (element) `(let ((old-modal (chain bootstrap -Modal (get-Instance ,element)))) (if old-modal (chain old-modal (hide)) (chain (new (bootstrap.-Modal ,element)) (hide))))) (defpsmacro value (element) `(chain ,element value)) (defpsmacro disabled (element) `(chain ,element disabled)) (defpsmacro remove (element) `(chain ,element (remove))) (defpsmacro href (element) `(chain ,element href)) (defpsmacro focus (element) `(chain ,element (focus))) (defpsmacro before (element new-element) `(chain ,element (before ,new-element))) (defpsmacro append (element new-element) `(chain ,element (append ,new-element))) (defpsmacro debug (&rest message) `(chain console (log "DEBUG: " ,@message))) (defpsmacro info (&rest message) `(chain console (log "INFO: " ,@message))) (defpsmacro warning (&rest message) `(chain console (log "WARNING: " ,@message))) (defpsmacro error (&rest message) `(chain console (log "ERROR: " ,@message)))
4,070
Common Lisp
.lisp
98
36.326531
179
0.646701
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
25ac22ddfdf76741f16c5362f04f187a4d437f6c7ef3a4953485c9a1e465ecdf
38,220
[ -1 ]
38,221
config.lisp
mohe2015_schule/src/config.lisp
(in-package :schule.config) (setf (config-env-var) "APP_ENV") (defparameter *application-root* (asdf/system:system-source-directory :schule)) (defparameter *static-directory* (merge-pathnames #P"static/" *application-root*)) (defparameter *template-directory* (merge-pathnames #P"templates/" *application-root*)) (defparameter *javascript-directory* (merge-pathnames #P"js/" *application-root*)) (defvar *database-path* (asdf/system:system-relative-pathname :schule #P"schule.db")) (defconfig :common `(:databases ((:maindb :sqlite3 :database-name ,*database-path*)))) (defconfig |development| 'nil) (defconfig |production| 'nil) (defconfig |test| 'nil) (defun config (&optional key) (envy:config "SCHULE.CONFIG" key)) (defun appenv () (uiop/os:getenv (config-env-var "SCHULE.CONFIG"))) (defun developmentp () (string= (appenv) "development")) (defun productionp () (string= (appenv) "production"))
927
Common Lisp
.lisp
21
41.809524
71
0.73991
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
11f5dafed88008f763400f20422939a814187564c61e1c5db3bf235cf4a2c9ff
38,221
[ -1 ]
38,222
pdf.lisp
mohe2015_schule/src/pdf.lisp
(defpackage schule.pdf (:use :cl :pdf :deflate :flexi-streams :queues :log4cl) (:export :parse :read-line-part :read-newline :line-length :current-line :extractor-lines :read-new-page)) (in-package :schule.pdf) (defclass pdf-text-extractor (fare-mop:SIMPLE-PRINT-OBJECT-MIXIN) ((pages :initarg :pages :initform (make-queue :simple-queue) :accessor extractor-pages) (lines :initarg :lines :initform (make-queue :simple-queue) :accessor extractor-lines) (current-line :initarg :current-line :initform (make-queue :simple-queue) :accessor current-line) (current-part :initarg :current-part :initform (make-queue :simple-queue) :accessor current-part) (last-number-p :initarg :last-number-p :initform nil :accessor extractor-last-number-p)) (:documentation "Stores extracted text to read and process it.")) (defun queue-to-string (queue) "Convert a character queue to a string." (let ((string (make-array 0 :element-type 'character :fill-pointer 0 :adjustable t))) (queues:map-queue (lambda (test) (vector-push-extend test string)) queue) string)) (defmethod write-line-part-char ((extractor pdf-text-extractor) char) "Add character to part of line." ;;(log:trace char) (qpush (current-part extractor) char)) (defmethod new-part ((extractor pdf-text-extractor)) "New part of line in extracted text." (log:trace "") (qpush (current-line extractor) (queue-to-string (current-part extractor))) (setf (current-part extractor) (make-queue :simple-queue))) (defmethod new-line ((extractor pdf-text-extractor)) "New line in extracted text." (log:trace "") (new-part extractor) (qpush (extractor-lines extractor) (current-line extractor)) (setf (current-line extractor) (make-queue :simple-queue))) (defmethod new-page ((extractor pdf-text-extractor)) "New page in extracted text." (log:trace "") (qpush (extractor-pages extractor) (extractor-lines extractor)) (setf (extractor-lines extractor) (make-queue :simple-queue))) (defmethod read-line-part ((extractor pdf-text-extractor)) "Get part of line from extracted text." (qpop (current-line extractor))) (defmethod line-length ((extractor pdf-text-extractor)) (qsize (current-line extractor))) (defun qsize? (queue) (if queue (qsize queue) 0)) (defmethod read-newline ((extractor pdf-text-extractor)) "Expect a newline in extracted text." (unless (= 0 (qsize? (current-part extractor))) (error "The current part still contains characters")) (unless (= 0 (qsize? (current-line extractor))) (error "The current line still contains parts.")) (setf (current-line extractor) (qpop (extractor-lines extractor)))) (defmethod read-new-page ((extractor pdf-text-extractor)) "Expect a new page in extracted text." (unless (= 0 (qsize? (current-part extractor))) (error "The current part still contains characters")) (unless (= 0 (qsize? (current-line extractor))) (error "The current line still contains parts.")) (unless (= 0 (qsize? (extractor-lines extractor))) (error "The current page still contains lines.")) (setf (extractor-lines extractor) (qpop (extractor-pages extractor)))) (defun decompress-string (string) "Decompress a zlib string." (octets-to-string (let ((in (make-in-memory-input-stream (string-to-octets string)))) (with-output-to-sequence (out) (inflate-zlib-stream in out))))) (defun get-decompressed (data) "Get decompressed part of pdf file (pdf spec)." (let* ((pdf (read-pdf-file data)) (contents (map 'list 'content (objects pdf))) (streams (remove-if-not (lambda (x) (typep x 'pdf-stream)) contents)) (jo (remove-if-not (lambda (x) (equal "/FlateDecode" (cdr (assoc "/Filter" (dict-values x) :test #'equal)))) streams)) (strings (mapcar 'content jo)) (strings2 (mapcar 'car strings)) (decompressed (mapcar 'decompress-string strings2)) (removed-fonts (remove-if-not (lambda (x) (str:starts-with? "q 0.12 0 0 0.12 0 0 cm" x)) decompressed))) removed-fonts)) (defun read-until (test &optional (stream *standard-input*)) "Reads string from stream until test is true." (unless (peek-char nil stream nil nil) (return-from read-until nil)) (with-output-to-string (out) (loop for c = (peek-char nil stream nil nil) while (and c (not (funcall test c))) do (write-char (read-char stream) out)))) (defun whitespace-char-p (x) (or (char= #\space x) (not (graphic-char-p x)))) (defun boundary-char-p (x) (or (whitespace-char-p x) (char= #\[ x))) (defun escaped-to-char (string) "Converts escaped characters from pdf files (spec) into normal characters." (if (= (length string) 2) (char string 1) (char string 0))) ;; 22 continue (defmethod draw-text-object ((extractor pdf-text-extractor) text) "Writes the text from the text object (pdf spec) into the text extractor." (log:trace text) (loop for x across text do (if (typep x 'string) (progn (setf (extractor-last-number-p extractor) nil) (write-line-part-char extractor (escaped-to-char (subseq x 1 (- (length x) 1))))) (progn (setf (extractor-last-number-p extractor) t) (when (< x -100) (new-part extractor)))))) ;; (log:config :trace) ;; (log:config :daily "file.txt") (defmethod parse-page ((extractor pdf-text-extractor) in) (let ((stack '())) (loop (if (eq (peek-char nil in nil nil) #\[) (let ((*pdf-input-stream* in)) (push (read-object in) stack)) (let ((e (read-until 'boundary-char-p in))) (cond ((equal e "q") (log:trace "q - push graphics")) ((equal e "Q") (log:trace "Q - pop graphics")) ((equal e "BT") (log:trace "BT - begin text")) ((equal e "ET") (log:trace "ET - end text") (new-line extractor)) ((equal e "Tf") (log:trace "Tf - font and size") (setf stack '())) ((equal e "Tm") (log:trace "Tm - text matrix") (setf stack '())) ((equal e "cm") (log:trace "cm - CTM") (setf stack '())) ((equal e "RG") (log:trace "RG - stroking color") (setf stack '())) ((equal e "rg") (log:trace "rg - non stroking color") (setf stack '())) ((equal e "TJ") (log:trace "TJ - draw text object") (draw-text-object extractor (car stack)) (setf stack '())) ((equal e "TL") (log:trace "TL - set text leading") (setf stack '())) ((equal e "T*") (log:trace "T* - newline") (new-line extractor)) ((equal e "Td") (log:trace "Td - newline " (car stack)) (if (equal "0" (car stack)) (if (extractor-last-number-p extractor) (new-part extractor)) (new-line extractor)) (setf stack '())) ((equal e "w") (log:trace "w - line width") (setf stack '())) ((equal e "J") (log:trace "J - line cap style") (setf stack '())) ((equal e "j") (log:trace "j - line join style") (setf stack '())) ((equal e "m") (log:trace "m - move to") (setf stack '())) ((equal e "l") (log:trace "l - straight line") (setf stack '())) ((equal e "re") (log:trace "re - rectangle") (setf stack '())) ((equal e "gs") (log:trace "gs - graphics state operator")) ((equal e "S") (log:trace "S - stroke path")) ((eq e nil) (return-from parse-page extractor)) ((eq (elt e 0) #\/)) ; literal name (t (push e stack))) (when (whitespace-char-p (peek-char nil in nil nil)) (unless (read-char in nil) (return-from parse-page extractor)))))))) (defun parse (data) "Parse a pdf file into a text extractor object. This can be used to read the text of an existing pdf file." (let ((extractor (make-instance 'pdf-text-extractor))) (loop for page in (get-decompressed data) do (with-input-from-string (in page) (parse-page extractor in) (new-page extractor))) extractor))
8,621
Common Lisp
.lisp
211
33.227488
127
0.598593
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
608ce2d92da7570b82eb9b79534e7558e7701960fa17997cedd5c4d2cc3dad3d
38,222
[ -1 ]
38,223
fix-code.lisp
mohe2015_schule/src/fix-code.lisp
;; sed -r -i 's/[(]chain (.*) [(]modal "hide"[)][)]/(hide-modal \1)/g' *.lisp (ql:quickload :trivia) (use-package :trivia) (match '(chain (one "#test") (modal "hide")) ((list 'chain a (list 'modal "hide")) (list 'hide-modal a))) (defun fix-code (code) (let ((result (match code ((list 'chain a (list 'modal "hide")) (list 'hide-modal a)) ((cons x y) (cons (fix-code x) (fix-code y)))))) (if result result code))) (fix-code '(if t (chain (one "#test") (modal "hide")) (progn))) (defun fix-file (file) (let ((*print-case* :downcase) (result (with-open-file (in file) (loop for sexp = (read in nil) while sexp collect (fix-code sexp))))) (with-open-file (out file :direction :output :if-exists :supersede) (loop for sexp in result do (write sexp :stream out))))) (loop for file in (directory "schule/**/*.lisp") do (fix-file file))
965
Common Lisp
.lisp
23
35.043478
86
0.559829
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
faabf283f1c2424c22bee4362fec32dd5197274432d15526bd2af049e396e577
38,223
[ -1 ]
38,224
tsquery-converter.lisp
mohe2015_schule/src/tsquery-converter.lisp
(in-package :schule.tsquery-converter) (defun handle-quoted (query) (concat "(" (join " <-> " (split " " query)) ")")) (defun handle-unquoted (query) (concat "(" (join " & " (split " " query)) ")")) (defun tsquery-convert-part (query add-wildcard) (setf query (split #\" query)) (if add-wildcard (setf (car (last query)) (concat (car (last query)) ":*"))) (setf query (loop for e in query for x from 1 if (oddp x) do (setf e (handle-unquoted e)) else do (setf e (handle-quoted e)) collect e)) (setf query (remove "()" query :test #'string=)) (setf query (join " & " query)) query) (defun tsquery-convert (query) (if (oddp (count #\" query)) (setf query (concatenate 'string query "\""))) (setf query (split "OR" query)) (setf query (loop for e in query collect (tsquery-convert-part (trim e) (= 1 (length query))))) (setf query (join " | " query)) query)
1,009
Common Lisp
.lisp
26
31.884615
79
0.561798
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
cdd8dae0b860fac0dcdda286d805aea0722be0002729a275a5eced4e3be45990
38,224
[ -1 ]
38,225
sanitize.lisp
mohe2015_schule/src/sanitize.lisp
(in-package :schule.sanitize) (define-sanitize-mode *sanitize-schule* :elements ("h1" "h2" "h3" "h4" "h5" "h6" "p" "strike" "sub" "b" "u" "i" "sup" "table" "tbody" "tr" "td" "ul" "a" "br" "ol" "li" "img" "iframe" "span" "figure" "figcaption") :add-attributes (("a" ("rel" . "noopener noreferrer"))) :attributes ((:all "class") ("h1" "align" "style") ("h2" "align" "style") ("h3" "align" "style") ("h4" "align" "style") ("h5" "align" "style") ("h6" "align" "style") ("a" "href" "target") ("p" "align" "style") ("img" "src" "style") ("iframe" "src" "width" "height")) :protocols (("a" ("href" :ftp :http :https :mailto :relative)) ("img" ("src" :http :https :relative)) ("iframe" ("src" :http :https :relative))))
793
Common Lisp
.lisp
22
31.409091
88
0.53455
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
16b2b34e3557cd1d64964daac2a273b7439e88e63d83ac838e66e0a43cc795b1
38,225
[ -1 ]
38,226
session.lisp
mohe2015_schule/src/session.lisp
(in-package :cl-user) (defpackage schule.session (:use :cl)) (in-package :schule.session) (defmethod session-verify ((request request)) (let ((*connection* (dbi:connect-cached :sqlite3 :database-name *database-path*)) (session-identifier (cookie-in (session-cookie-name *acceptor*) request))) (if session-identifier (find-dao 'my-session :session-cookie session-identifier) nil))) (defmethod session-cookie-value ((my-session my-session)) (and my-session (my-session-cookie my-session))) (defun start-my-session () "Returns the current SESSION object. If there is no current session, creates one and updates the corresponding data structures. In this case the function will also send a session cookie to the browser." (let ((session (session *request*))) (when session (return-from start-my-session session)) (setf session (create-dao 'my-session :session-cookie (random-base64) :csrf-token (random-base64)) (session *request*) session) (set-cookie (session-cookie-name *acceptor*) :value (my-session-cookie session) :path "/" :http-only t :max-age (* 60 60 24 365)) (set-cookie "_csrf_token" :value (my-session-csrf-token session) :path "/" :max-age (* 60 60 24 365)) (session-created *acceptor* session) (setq *session* session))) (defun regenerate-session (session) "Regenerates the cookie value. This should be used when a user logs in according to the application to prevent against session fixation attacks. The cookie value being dependent on ID, USER-AGENT, REMOTE-ADDR, START, and *SESSION-SECRET*, the only value we can change is START to regenerate a new value. Since we're generating a new cookie, it makes sense to have the session being restarted, in time. That said, because of this fact, calling this function twice in the same second will regenerate twice the same value." (setf (my-session-cookie *session*) (random-base64)) (setf (my-session-csrf-token *session*) (random-base64)) (save-dao *session*) (set-cookie (session-cookie-name *acceptor*) :value (my-session-cookie session) :path "/" :http-only t :max-age (* 60 60 24 365)) (set-cookie "_csrf_token" :value (my-session-csrf-token session) :path "/" :max-age (* 60 60 24 365)))
2,311
Common Lisp
.lisp
48
43.875
79
0.712007
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
365a85745d6853acd20e67bf8bb32090cb7aab7bfda5a83d95153ccfbc877154
38,226
[ -1 ]
38,227
settings.lisp
mohe2015_schule/src/settings.lisp
(in-package :schule.web) (my-defroute :post "/api/settings" (:admin :user) (|grade|) "text/html" (setf (user-grade user) (find-dao 'schedule :id (parse-integer |grade|))) (save-dao user) "") (my-defroute :get "/api/settings" (:admin :user) nil "text/html" (encode-json-to-string (user-grade user)))
304
Common Lisp
.lisp
6
48.833333
74
0.682432
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
32e1d48ba5f774fcf6e25523b9569d5eb076a3797c0371a9ab9889de1dae5e07
38,227
[ -1 ]
38,228
web.lisp
mohe2015_schule/src/web.lisp
(in-package :schule.web) (declaim (optimize (debug 3))) (defclass <web> (<app>) ()) (defvar *web* (make-instance '<web>)) (clear-routing-rules *web*) (defmacro with-user (&body body) `(if (gethash :user *session*) (let ((user (find-dao 'user :id (gethash :user *session*)))) ,@body) (throw-code 401))) (defun random-base64 () (usb8-array-to-base64-string (random-data 64))) (defmacro with-group (groups &body body) `(if (member (user-group user) ,groups) (progn ,@body) (throw-code 403))) (defparameter *version* "1") (defun valid-csrf () (string= (my-session-csrf-token *session*) (assoc "csrf_token" (request-query-parameters *request*)))) (defun hash-contents (content) (byte-array-to-hex-string (digest-sequence :sha256 (ascii-string-to-byte-array content)))) (defun hash-contents-vector (content) (byte-array-to-hex-string (digest-sequence :sha256 content))) (defun cache () (setf (getf (response-headers *response*) :cache-control) "public, max-age=0") (setf (getf (response-headers *response*) :vary) "Accept-Encoding")) (defun cache-forever () (setf (getf (response-headers *response*) :cache-control) "max-age=31556926") (setf (getf (response-headers *response*) :vary) "Accept-Encoding") (setf (getf (response-headers *response*) :etag) *version*)) (defmacro with-cache-forever (&body body) `(progn (cache-forever) (if (equal (gethash "if-none-match" (request-headers *request*)) *version*) (throw-code 304) (progn ,@body)))) (defmacro with-cache (key &body body) `(progn (cache) (let* ((key-hash (hash-contents ,key))) (if (equal (gethash "if-none-match" (request-headers *request*)) (concatenate 'string "W/\"" key-hash "\"")) (throw-code 304) (progn (setf (getf (response-headers *response*) :etag) (concatenate 'string "W/\"" key-hash "\"")) (progn ,@body)))))) (defmacro with-cache-vector (key &body body) `(progn (cache) (let* ((key-hash (hash-contents-vector ,key))) (if (equal (gethash "if-none-match" (request-headers *request*)) (concatenate 'string "W/\"" key-hash "\"")) (throw-code 304) (progn (setf (getf (response-headers *response*) :etag) (concatenate 'string "W/\"" key-hash "\"")) (progn ,@body)))))) (defun basic-headers () (setf (getf (response-headers *response*) :x-frame-options) "DENY") (setf (getf (response-headers *response*) :content-security-policy) "default-src 'none'; script-src 'self'; img-src * data: ; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self'; frame-src www.youtube.com youtube.com; frame-ancestors 'none';") (setf (getf (response-headers *response*) :x-xss-protection) "1; mode=block") (setf (getf (response-headers *response*) :x-content-type-options) "nosniff") (setf (getf (response-headers *response*) :referrer-policy) "no-referrer")) (defmacro my-defroute (method path permissions params content-type &body body) `(defroute (,path :method ,method) (&key ,@params) (basic-headers) (setf (getf (response-headers *response*) :content-type) ,content-type) (with-connection (db) ,(if permissions `(with-user (with-group ',permissions ,@body)) `(progn ,@body))))) (my-defroute :get "/api/wiki/:title" (:admin :user :anonymous) (title) "application/json" (let* ((article (find-dao 'wiki-article :title title))) (if (not article) (throw-code 404)) (let ((revision (select-dao 'wiki-article-revision (where (:= :article article)) (order-by (:desc :id)) (limit 1)))) (if (not revision) (throw-code 404)) (encode-json-to-string `((content . ,(clean (wiki-article-revision-content (car revision)) *sanitize-schule*)) (categories . ,(mapcar #'(lambda (v) (wiki-article-revision-category-category v)) (retrieve-dao 'wiki-article-revision-category :revision (car revision))))))))) (my-defroute :get "/api/revision/:id" (:admin :user) (id) "application/json" (let* ((revision (find-dao 'wiki-article-revision :id (parse-integer id)))) (if (not revision) (throw-code 404)) (encode-json-to-string `((content . ,(clean (wiki-article-revision-content revision) *sanitize-schule*)) (categories . ,(list-to-array (mapcar #'(lambda (v) (wiki-article-revision-category-category v)) (retrieve-dao 'wiki-article-revision-category :revision revision)))))))) (defun list-to-array (list) (make-array (length list) :initial-contents list)) (my-defroute :get "/api/previous-revision/:the-id" (:admin :user) (the-id) "application/json" (let* ((id (parse-integer the-id)) (query (dbi.driver:prepare *connection* "SELECT id FROM wiki_article_revision WHERE article_id = (SELECT article_id FROM wiki_article_revision WHERE id = ?) and id < ? ORDER BY id DESC LIMIT 1;")) (result (dbi.driver:execute query id id)) (previous-id (getf (dbi.driver:fetch result) :|id|))) (if previous-id (let ((revision (find-dao 'wiki-article-revision :id previous-id))) (encode-json-to-string `((content . ,(clean (wiki-article-revision-content revision) *sanitize-schule*)) (categories . ,(list-to-array (mapcar #'(lambda (v) (wiki-article-revision-category-category v)) (retrieve-dao 'wiki-article-revision-category :revision revision))))))) "{\"content\":\"\", \"categories\": []}"))) (my-defroute :post "/api/wiki/:title" (:admin :user) (title |summary| |html| _parsed) "text/html" (dbi:with-transaction *connection* (let* ((article (find-dao 'wiki-article :title title)) (categories (cdr (assoc "categories" _parsed :test #'string=)))) (if (not article) (setf article (create-dao 'wiki-article :title title))) (let ((revision (create-dao 'wiki-article-revision :article article :author user :summary |summary| :content |html|))) (loop for category in categories do (create-dao 'wiki-article-revision-category :revision revision :category (first category)))) nil))) (my-defroute :post "/api/quiz/create" (:admin :user) nil "text/html" (format nil "~a" (object-id (create-dao 'quiz :creator user)))) (my-defroute :post "/api/quiz/:the-quiz-id" (:admin :user) (the-quiz-id |data|) "text/html" (let* ((quiz-id (parse-integer the-quiz-id))) (format nil "~a" (object-id (create-dao 'quiz-revision :quiz (find-dao 'quiz :id quiz-id) :content |data| :author user))))) (my-defroute :get "/api/quiz/:the-id" (:admin :user) (the-id) "application/json" (let* ((quiz-id (parse-integer the-id)) (revision (select-dao 'quiz-revision (where (:= :quiz (find-dao 'quiz :id quiz-id))) (order-by (:desc :id)) (limit 1)))) (quiz-revision-content (car revision)))) (my-defroute :get "/api/history/:title" (:admin :user) (title) "application/json" (let* ((article (find-dao 'wiki-article :title title))) (if article (encode-json-to-string (mapcar #'(lambda (r) `((id . ,(object-id r)) (user . ,(user-name (wiki-article-revision-author r))) (summary . ,(wiki-article-revision-summary r)) (created . ,(local-time:format-timestring nil (object-created-at r))) (size . ,(length (wiki-article-revision-content r))))) (select-dao 'wiki-article-revision (where (:= :article article)) (order-by (:desc :created-at))))) (throw-code 404)))) (my-defroute :get "/api/search/:query" (:admin :user :anonymous) (query) "application/json" (let* ((searchquery (tsquery-convert query)) (query (dbi.driver:prepare *connection* "SELECT a.title, ts_rank_cd((setweight(to_tsvector(a.title), 'A') || setweight(to_tsvector((SELECT content FROM wiki_article_revision WHERE article_id = a.id ORDER BY id DESC LIMIT 1)), 'D')), query) AS rank, ts_headline(a.title || (SELECT content FROM wiki_article_revision WHERE article_id = a.id ORDER BY id DESC LIMIT 1), to_tsquery(?)) FROM wiki_article AS A, to_tsquery(?) query WHERE query @@ (setweight(to_tsvector(a.title), 'A') || setweight(to_tsvector((SELECT content FROM wiki_article_revision WHERE article_id = a.id ORDER BY id DESC LIMIT 1)), 'D')) ORDER BY rank DESC;")) (result (dbi.driver:execute query searchquery searchquery))) (encode-json-to-string (mapcar #'(lambda (r) `((title . ,(getf r :|title|)) (rank . ,(getf r :|rank|)) (summary . ,(getf r :|ts_headline|)))) (dbi.driver:fetch-all result))))) (my-defroute :get "/api/articles" (:admin :user :anonymous) () "application/json" (let* ((articles (select-dao 'wiki-article))) (encode-json-to-string (mapcar 'wiki-article-title articles)))) (my-defroute :post "/api/upload" (:admin :user) (|file|) "text/html" (let* ((oldfile (nth 0 |file|)) (filehash (byte-array-to-hex-string (digest-stream :sha512 oldfile))) (newpath (merge-pathnames (concatenate 'string "uploads/" filehash) *application-root*))) (uiop:copy-file (pathname oldfile) newpath) filehash)) (my-defroute :post "/api/login" nil (|username| |password|) "text/html" (let* ((user (find-dao 'user :name |username|))) (if (and user (verify |password| (user-hash user))) (progn (setf (gethash :user *session*) (object-id user)) nil) (throw-code 403)))) (my-defroute :post "/api/logout" (:admin :user :anonymous) () "text/html" (setf (gethash :user *session*) nil) nil) (my-defroute :get "/api/killswitch" nil nil "text/html" (uiop:quit)) (defun starts-with-p (str1 str2) "Determine whether `str1` starts with `str2`" (let ((p (search str2 str1))) (and p (= 0 p)))) (defun get-safe-mime-type (file) (let ((mime-type (trivial-mimes:mime file))) (if (or (starts-with-p mime-type "image/") (starts-with-p mime-type "font/") (equal mime-type "text/css") (equal mime-type "application/javascript")) mime-type (progn (format t "Forbidden mime-type: ~a~%" mime-type) "text/plain")))) (defun valid-hex (string) (reduce #'(lambda (a b) (and a b)) (map 'list #'(lambda (c) (digit-char-p c 16)) string))) (my-defroute :get "/api/file/:name" (:admin :user :anonymous) (name) (if (valid-hex name) (get-safe-mime-type (merge-pathnames (concatenate 'string "uploads/" name))) "text/plain") (if (valid-hex name) (with-cache-forever (merge-pathnames (concatenate 'string "uploads/" name))))) (defparameter *javascript-files* (make-hash-table :test #'equal)) (loop for file in (directory (concatenate 'string (namestring *application-root*) "/js/**/*.lisp")) do (setf (gethash file *javascript-files*) (file-js-gen file))) (defroute ("/js/*" :method :get) (&key splat) (basic-headers) (setf (getf (response-headers *response*) :content-type) "application/javascript") (let ((path (merge-pathnames (first splat) *javascript-directory*))) (with-cache (gethash path *javascript-files*) (gethash path *javascript-files*)))) (my-defroute :get "/sw.lisp" nil nil "application/javascript" (with-cache (read-file-into-string (merge-pathnames "js/sw.lisp" *application-root*)) (file-js-gen (concatenate 'string (namestring *application-root*) "js/sw.lisp")))) (my-defroute :post "/api/tags" (:admin :user) (_parsed) "application/json" (let* ((tags (cdr (assoc "tags" _parsed :test #'string=))) (result (retrieve-by-sql (select (:revision_id (:count :*)) (from :wiki_article_revision_category) (where (:in :category tags)) (group-by :revision_id))))) (encode-json-to-string (loop for revision in result when (= (getf revision :count) (length tags)) collect (wiki-article-title (wiki-article-revision-article (find-dao 'wiki-article-revision :id (getf revision :revision-id)))))))) (my-defroute :post "/api/push-subscription" (:admin :user) (|subscription|) "application/json" (let* ((alist (decode-json-from-string |subscription|)) (endpoint (cdr (assoc :endpoint alist))) (p256dh (cdr (assoc :p-256-dh (cdr (assoc :keys alist))))) (auth (cdr (assoc :auth (cdr (assoc :keys alist)))))) (when (and endpoint auth p256dh) (dbi:with-transaction *connection* (delete-by-values 'web-push :user user :endpoint endpoint :auth auth :p256dh p256dh) (create-dao 'web-push :user user :endpoint endpoint :auth auth :p256dh p256dh)) (send-push p256dh auth endpoint (namestring (asdf:system-relative-pathname :schule #p"../rust-web-push/private.pem")) "Es funktioniert!")))) (my-defroute :get "/api/substitutions" (:admin :user) () "application/json" (bt:with-lock-held (*lock*) (encode-json-to-string *VSS*))) (defparameter *VSS* (make-instance 'schule.vertretungsplan:substitution-schedules)) (defvar *lock* (bt:make-lock)) (defun update-substitution-schedule () (loop for file in (uiop:directory-files "/home/moritz/wiki/vs/") do ;;(format t "~%~a~%" file) (schule.vertretungsplan:update *VSS* (schule.vertretungsplan:parse-vertretungsplan (schule.pdf:parse file)))) (let ((top-level *standard-output*)) (bt:make-thread (lambda () (loop (log:info "Updating substitution schedule") (handler-case (let ((substitution-schedule (schule.vertretungsplan:parse-vertretungsplan (schule.pdf:parse (schule.vertretungsplan:get-schedule "http://aesgb.de/_downloads/pws/vs.pdf"))))) (bt:with-lock-held (*lock*) (schule.vertretungsplan:update *VSS* substitution-schedule))) (error (c) (trivial-backtrace:print-backtrace c) (log:error c))) (handler-case (let ((substitution-schedule (schule.vertretungsplan:parse-vertretungsplan (schule.pdf:parse (schule.vertretungsplan:get-schedule "http://aesgb.de/_downloads/pws/vs1.pdf"))))) (bt:with-lock-held (*lock*) (schule.vertretungsplan:update *VSS* substitution-schedule))) (error (c) (trivial-backtrace:print-backtrace c) (log:error c))) (sleep 60))))))
14,908
Common Lisp
.lisp
284
44.411972
616
0.621586
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
42574f31edbf2c9a037f12442fb53a169293e2b1706e321cbf174b52c37c748b
38,228
[ -1 ]
38,229
helpers.lisp
mohe2015_schule/src/html/helpers.lisp
(in-package :schule.web) (defun modal (base-id title footer body) `(:div :class "modal fade" :id ,(concatenate 'string "modal-" base-id) :tabindex "-1" :role "dialog" :aria-hidden "true" (:div :class "modal-dialog modal-dialog-centered" :role "document" (:div :class "modal-content" (:form :method "POST" :id ,(concatenate 'string "form-" base-id) (:div :class "modal-header" (:h5 :class "modal-title" ,title) (:button :type "button" :class "close" :data-dismiss "modal" :aria-label "Close" " " (:span :aria-hidden "true" "×"))) (:div :class "modal-body" ,@body) (:div :class "modal-footer" ,@footer)))))) (defun license () `(:a :target "_blank" :rel "license noopener noreferrer" :href "https://creativecommons.org/licenses/by-nc-sa/4.0/deed.de" "Creative Commons Namensnennung - Nicht-kommerziell - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz")) (defun teacher-select (id) `(:div :class "form-group" (:label "LehrerIn") (:select :class "custom-select teacher-select" :id ,id :name "teacher" (:option "Wird geladen...")))) (defun course-select () `(:div :class "form-group" (:select :class "custom-select course-select" :name "course"))) (defun license-disclaimer () `(:small "Mit dem Veröffentlichen garantierst du, dass du nicht die Rechte anderer verletzt und bist damit einverstanden, unter der " ,(license) " zu veröffentlichen.")) (defun text-input (label id name &key no-label? classes required autofocus autocomplete) `(:div :class "form-group" ,(if no-label? nil `(:label ,label)) (:input :type "text" :class ,(concatenate 'string "form-control " classes) :placeholder ,label :name ,name :id ,id :required ,required :autofocus ,autofocus :autocomplete ,autocomplete))) (defun checkbox-input (label id name) `(:div :class "custom-control custom-checkbox" (:input :type "checkbox" :class "custom-control-input" :name ,name :id ,id) (:label :class "custom-control-label" :for ,id ,label))) (defun submit-button (label &key id) `(:button :type "submit" :class "btn btn-primary" :id ,id ,label)) (defun tab (id &rest content) `(:div :class "container-fluid my-tab position-absolute d-none" :id ,id ,@content))
2,327
Common Lisp
.lisp
38
55.184211
244
0.661397
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
2a297720760e7d350e564120c391f7f9edf19e58815522f006d8a4160ff10bdf
38,229
[ -1 ]
38,230
index.lisp
mohe2015_schule/src/html/schedule/index.lisp
(in-package :schule.web) (defun schedule-tab (day) `(:div :class "tab-pane fade" :id ,day :role "tabpanel" :aria-labeledby ,(concatenate 'string day "-tab") (:table :class "table table-hover table-bordered table-dark table-sm" (:thead (:tr (:th :scope "col" "#") (:th :scope "col" ""))) (:tbody (loop for i from 1 to 11 do (htm (:tr (:td :class "min" (str i)) (:td (:button :type "button" :class "add-course btn btn-sm btn-outline-primary w-100" (:span :class "fa fa-plus")))))))))) (defun html-schedule () `((:template :id "schedule-data-cell-template" (:div :class "mb-3 mt-3 schedule-data test" (:span :class "data" "Mathe LK Keller B201") (:div :class "nowrap" (:button :type "button" :class "btn btn-sm btn-outline-primary button-delete-schedule-data" (:span :class "fa fa-trash"))))) (:template :id "schedule-data-static-cell-template" (:div :class "mb-3 mt-3 schedule-data test" (:span :class "data" "Mathe LK Keller B201"))) ,(tab "schedule" `(:ul :id "schedule-tabs" :class "nav nav-tabs" :role "tablist" (:li :class "nav-item" (:a :class "nav-link schedule-tab-link" :id "monday-tab" :data-toggle "tab" :href "#monday" :role "tab" :aria-controls "monday" :aria-selected "true" "Montag")) (:li :class "nav-item" (:a :class "nav-link schedule-tab-link" :id "tuesday-tab" :data-toggle "tab" :href "#tuesday" :role "tab" :aria-controls "tuesday" :aria-selected "false" "Dienstag")) (:li :class "nav-item" (:a :class "nav-link schedule-tab-link" :id "wednesday-tab" :data-toggle "tab" :href "#wednesday" :role "tab" :aria-controls "wednesday" :aria-selected "false" "Mittwoch")) (:li :class "nav-item" (:a :class "nav-link schedule-tab-link" :id "thursday-tab" :data-toggle "tab" :href "#thursday" :role "tab" :aria-controls "thursday" :aria-selected "false" "Donnerstag")) (:li :class "nav-item" (:a :class "nav-link schedule-tab-link" :id "friday-tab" :data-toggle "tab" :href "#friday" :role "tab" :aria-controls "friday" :aria-selected "false" "Freitag")) (:li :class "nav-item" (:a :class "nav-link" :id "schedule-show-button" :href "" "Anzeigen")) (:li :class "nav-item" (:a :class "nav-link" :id "schedule-edit-button" :href "edit" "Bearbeiten"))) `(:div :class "tab-content" :id "schedule-table" ,(schedule-tab "monday") ,(schedule-tab "tuesday") ,(schedule-tab "wednesday") ,(schedule-tab "thursday") ,(schedule-tab "friday"))) ,(modal "schedule-data" "Unterrichtsstunde" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") ,(submit-button "Ok")) `((:input :type "hidden" :id "schedule-data-weekday" :name "weekday" :value "monday") (:input :type "hidden" :id "schedule-data-hour" :name "hour" :value "1") (:div :class "form-group" (:label :for "week-modulo" "Regelmäßigkeit") (:select :class "custom-select" :id "week-modulo" :name "week-modulo" (:option :selected "selected" :value "0" "Jede Woche") (:option :value "1" "Ungerade Woche") (:option :value "2" "Gerade Woche"))) ,(course-select) ,(text-input "Raum" "room" "room") ,(license-disclaimer)))))
3,876
Common Lisp
.lisp
73
40.178082
99
0.531892
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
fa96034d96eff98ae07e487998dde5e518110519d9e2935e4e55ebd589f87864
38,230
[ -1 ]
38,231
index.lisp
mohe2015_schule/src/html/substitution-schedule/index.lisp
(in-package :schule.web) (defun template-substitution-schedule () `(,(tab "substitution-schedule" `(:a :id "settings-enable-notifications" :type "button" :class "btn btn-primary norefresh disabled" "Benachrichtigungen aktivieren") `(:div :id "substitution-schedule-content")) (:template :id "template-substitution-schedule" (:h1 :class "substitution-schedule-date text-center" "10.12.2001")) (:template :id "template-substitution-for-class" (:h2 :class "template-class text-center" "Q34") (:ul)) (:template :id "template-substitution" (:li "Test ist frei!!!"))))
635
Common Lisp
.lisp
15
36.533333
138
0.66559
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
a3ace119079b7e449675446e914f19878eedcbd1c6b0f0a1840e6d6b65766732
38,231
[ -1 ]
38,232
index.lisp
mohe2015_schule/src/html/contact/index.lisp
(in-package :schule.web) (defun contact-html () (tab "tab-contact" `(:h2 :class "text-center" "Kontakt") `(:address (:strong "Moritz Hedtke") (:br) "Email: " (:a :href "mailto:[email protected]" :target "_blank" "[email protected]") (:br) "Telegram: " (:a :href "https://t.me/devmohe" :target "_blank" "@devmohe") (:br) "Instagram: " (:a :href "https://www.instagram.com/dev.mohe/" :target "_blank" "@dev.mohe") (:br) "Github: " (:a :href "https://github.com/mohe2015" :target "_blank" "@mohe2015") (:br) "WhatsApp: ..." (:br) "... oder pers√∂nlich")))
649
Common Lisp
.lisp
12
46.416667
115
0.558176
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
6f12baf1c8fe0cdec9a395ab27a9af1171bae4c8d5653c10e60a513a4e1ec0eb
38,232
[ -1 ]
38,233
index.lisp
mohe2015_schule/src/html/settings/index.lisp
(in-package :schule.web) (defun html-settings () `((:template :id "settings-student-course-html" (:div :class "custom-control custom-checkbox" (:input :type "checkbox" :class "custom-control-input student-course-checkbox" :id "settings-course-n") (:label :class "custom-control-label" :for "settings-course-n" ""))) ,(tab "tab-settings" `(:h2 :class "text-center" "Einstellungen") `(:h3 :class "text-center" "Dein Jahrgang") `(:form :id "settings-form-select-grade" (:select :class "custom-select" :id "settings-select-grade" :name "grade")) `(:a :id "settings-add-grade" :type "button" :class "btn btn-primary norefresh" "Jahrgang hinzufügen") `(:h3 :class "text-center" "Deine Kurse") `(:div :id "settings-list-courses" (:label (:input :type "checkbox" :name "test") "Test1") (:br)) `(:a :id "settings-add-course" :type "button" :class "btn btn-primary norefresh" "Kurs erstellen") `(:a :id "settings-edit-schedule" :type "button" :class "btn btn-primary norefresh" "Stundenplan ändern") `(:a :id "settings-show-schedule" :type "button" :class "btn btn-primary norefresh" "Studenplan anzeigen")) ,(modal "settings-create-grade" "Jahrgang hinzufügen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "submit" :class "btn btn-primary" :id "settings-button-create-grade" "Hinzufügen")) `((:div :class "form-group" (:label :for "settings-input-grade" "Jahrgang:") " " (:input :type "text" :id "settings-input-grade" :name "grade")) ,(license-disclaimer))) ,(modal "settings-create-course" "Kurs erstellen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "submit" :class "btn btn-primary" "Kurs erstellen")) `((:div :class "form-group" (:label "Fach") (:input :type "text" :class "form-control" :placeholder "Fach" :name "subject" :id "course-subject")) (:div :class "form-group" (:label "Typ") (:select :class "custom-select" :name "type" :id "course-type" (:option :selected "true" "GK") (:option "LK"))) ,(teacher-select "settings-teachers-select") (:button :type "button" :class "btn btn-primary" :id "button-create-teacher" "LehrerIn erstellen") (:div :class "custom-control custom-checkbox" (:input :type "checkbox" :class "custom-control-input" :name "is-tutorial" :id "settings-is-tutorial") (:label :class "custom-control-label" :for "settings-is-tutorial" "Tutorium?")) (:div :class "form-group" (:label "Thema") (:input :type "text" :class "form-control" :placeholder "Thema" :name "topic" :id "course-topic")) ,(license-disclaimer))) ,(modal "settings-create-teacher" "LehrerIn hinzufügen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "submit" :class "btn btn-primary" "Hinzufügen")) `(,(text-input "Name" "teacher-name" "name") ,(text-input "Initialien" "teacher-initial" "initial")))))
3,349
Common Lisp
.lisp
57
49.245614
113
0.607742
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
7ed355ffdcd7956eb23ba902447398e3fa69c85a9d7f94ff04d4c34574138e49
38,233
[ -1 ]
38,234
index.lisp
mohe2015_schule/src/html/user-courses/index.lisp
(in-package :schule.web) (defun html-user-courses () `((:template :id "student-courses-list-html" (:li (:a :type "button" :class "btn btn-primary button-student-course-delete" "-") (:span :class "student-courses-list-subject"))) ,(tab "list-student-courses" `(:h2 :class "text-center" "Deine Kurse" (:a :id "add-student-course" :type "button" :class "btn btn-primary norefresh" "+")) `(:ul :id "student-courses-list")) ,(modal "student-courses" "Kurs hinzufügen" `((:button :type "button" :class "btn btn-secondary" :data-dismiss "modal" "Abbrechen") (:button :type "submit" :class "btn btn-primary" :id "student-courses-add" "Hinzufügen")) `((:div :class "form-group" (:label :for "course" "Kurs:") " " (:select :class "custom-select" :id "student-course" :name "student-course"))))))
939
Common Lisp
.lisp
20
38.3
82
0.581878
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
79a062e21adcc07d6b67c1a7dda3dbf2f9e73f0a2bfce7bd546275ff64a676cd
38,234
[ -1 ]
38,235
schule.lisp
mohe2015_schule/tests/schule.lisp
(in-package :cl-user) (defpackage schule-test (:use :cl :schule :prove)) (in-package :schule-test) ;; (prove:run :schule-test) (plan nil) (finalize)
154
Common Lisp
.lisp
7
20.285714
28
0.715278
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
eb3dedcd67f831cb602d3e0cc553b8632983497aae696dd3b20487609f605926
38,235
[ -1 ]
38,236
schule.asd
mohe2015_schule/schule.asd
(defsystem "schule" :version "0.1.0" :author "Moritz Hedtke" :license "" :defsystem-depends-on (:paren-files) :depends-on (:clack :lack :caveman2 :envy :cl-ppcre :uiop :cl-fsnotify :fare-mop :mito :cl-json :sanitize :ironclad :cl-fad :cl-base64 :str :parenscript :lack :lack-middleware-csrf :trivial-mimes :deflate :cl-pdf-parser :flexi-streams :queues.simple-queue :cffi :dexador :group-by :log4cl :serapeum :bt-semaphore :trivial-backtrace :cl-who) :components ;; TODO FIXME fix all dependencies as otherwise there are compilation failures ((:module "." :components ( (:file "src/web-push") (:file "src/package" :depends-on ("src/web-push")) ;; TODO split up into the single packages or google how you should do it (:file "src/argon2") (:file "src/html/helpers" :depends-on ("src/package")) (:file "src/html/user-courses/index" :depends-on ("src/package" "src/html/helpers")) (:file "src/html/contact/index" :depends-on ("src/package" "src/html/helpers")) (:file "src/html/settings/index" :depends-on ("src/package" "src/html/helpers")) (:file "src/html/schedule/index" :depends-on ("src/package" "src/html/helpers")) (:file "src/html/substitution-schedule/index" :depends-on ("src/package" "src/html/helpers")) (:file "src/index" :depends-on ("src/package" "src/html/helpers" "src/html/user-courses/index" "src/html/settings/index" "src/html/schedule/index" "src/html/substitution-schedule/index")) (:file "src/config") (:file "src/sanitize" :depends-on ("src/package")) (:file "src/parenscript" :depends-on ("src/package")) (:parenscript-file "js/read-cookie" :depends-on ("js/utils")) (:parenscript-file "js/editor" :depends-on ("js/editor-lib" "js/math" "js/read-cookie" "js/state-machine" "js/utils" "js/fetch")) (:parenscript-file "js/fetch" :depends-on ("js/utils" "js/show-tab")) (:parenscript-file "js/categories" :depends-on ("js/show-tab" "js/read-cookie" "js/utils" "js/template")) (:parenscript-file "js/file-upload" :depends-on ("js/read-cookie" "js/utils")) (:parenscript-file "js/wiki/page" :depends-on ("js/template" "js/show-tab" "js/math" "js/image-viewer" "js/fetch" "js/utils" "js/state-machine")) (:parenscript-file "js/search" :depends-on ("js/show-tab" "js/utils" "js/template" "js/fetch")) (:parenscript-file "js/quiz" :depends-on ("js/utils")) (:parenscript-file "js/logout" :depends-on ("js/show-tab" "js/read-cookie" "js/state-machine" "js/utils" "js/fetch")) (:parenscript-file "js/get-url-parameter" :depends-on ("js/utils")) (:parenscript-file "js/login" :depends-on ("js/get-url-parameter" "js/read-cookie" "js/state-machine" "js/show-tab" "js/utils" "js/fetch")) (:parenscript-file "js/root" :depends-on ("js/state-machine" "js/utils")) (:parenscript-file "js/history" :depends-on ("js/state-machine" "js/show-tab" "js/math" "js/fetch" "js/utils" "js/template")) (:parenscript-file "js/wiki/page/edit" :depends-on ("js/show-tab" "js/math" "js/editor" "js/utils" "js/fetch" "js/template" "js/state-machine")) (:parenscript-file "js/create" :depends-on ("js/state-machine" "js/editor" "js/show-tab" "js/utils" "js/state-machine")) (:parenscript-file "js/articles" :depends-on ("js/show-tab" "js/utils")) (:parenscript-file "js/show-tab" :depends-on ("js/utils")) (:parenscript-file "js/courses/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/schedule/id" :depends-on ("js/show-tab" "js/fetch" "js/utils" "js/template" "js/read-cookie" "js/state-machine")) (:parenscript-file "js/schedules/new" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/state-machine" "js/utils")) (:parenscript-file "js/schedules/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/student-courses/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils")) (:parenscript-file "js/settings/index" :depends-on ("js/show-tab" "js/read-cookie" "js/fetch" "js/template" "js/utils" "js/state-machine")) (:parenscript-file "js/template" :depends-on ("js/utils")) (:parenscript-file "js/math" :depends-on ("js/utils")) (:parenscript-file "js/image-viewer" :depends-on ("js/utils")) (:parenscript-file "js/substitution-schedule/index" :depends-on ("js/show-tab" "js/fetch" "js/utils" "js/template" "js/read-cookie" "js/state-machine")) (:parenscript-file "js/contact/index" :depends-on ("js/show-tab")) (:parenscript-file "js/state-machine" :depends-on ("js/utils" "js/template" "js/fetch" "js/show-tab")) (:parenscript-file "js/editor-lib" :depends-on ("js/file-upload" "js/categories" "js/fetch" "js/utils")) (:parenscript-file "js/utils") (:parenscript-file "js/index" :depends-on ("js/contact/index" "js/wiki/page" "js/search" "js/quiz" "js/logout" "js/login" "js/root" "js/history" "js/wiki/page/edit" "js/create" "js/articles" "js/categories" "js/courses/index" "js/schedule/id" "js/schedules/new" "js/schedules/index" "js/student-courses/index" "js/settings/index" "js/math" "js/image-viewer" "js/substitution-schedule/index" "js/state-machine" "js/editor-lib" "js/utils")) (:file "src/tsquery-converter" :depends-on ("src/package")) (:file "src/web" :depends-on ("src/package" "src/parenscript" "src/db" "src/index" "src/argon2" "src/vertretungsplan" "src/web-push")) (:file "src/settings" :depends-on ("src/package" "src/web")) (:file "src/schedule" :depends-on ("src/package" "src/web")) ;; TODO FIXME clean up this dependency garbage (:file "src/student-courses" :depends-on ("src/package" "src/web")) (:file "src/default-handler" :depends-on ("src/package" "src/web")) (:file "src/pdf") (:file "src/libc") (:file "src/vertretungsplan" :depends-on ("src/pdf" "src/libc")) (:file "src/db" :depends-on ("src/package" "src/config")) (:file "src/main" :depends-on ("src/package" "src/config" "src/db" "src/web"))))) :description "" :in-order-to ((test-op (test-op "schule-test"))))
6,586
Common Lisp
.asd
99
58.10101
443
0.632517
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
6217cb241f2247f370a5f5dfe77f73c715b253abaa345445b2bb8cc89ab09579
38,236
[ -1 ]
38,237
schule-test.asd
mohe2015_schule/schule-test.asd
(defsystem "schule-test" :defsystem-depends-on ("prove-asdf") :author "Moritz Hedtke" :license "" :depends-on ("schule" "prove") :components ((:module "tests" :components ((:test-file "schule")))) :description "Test system for schule" :perform (test-op (op c) (symbol-call :prove-asdf :run-test-system c)))
368
Common Lisp
.asd
11
26.909091
73
0.602241
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
35179a82fcd83eed5661798fb3e7280ebdfd2ad2294f467425ca4e90af67c990
38,237
[ -1 ]
38,240
.gitmodules
mohe2015_schule/.gitmodules
[submodule "cl-sanitize"] path = cl-sanitize url = https://github.com/mohe2015/cl-sanitize.git [submodule "mathlive"] path = mathlive url = https://github.com/arnog/mathlive.git [submodule "lack"] path = lack url = https://github.com/mohe2015/lack.git [submodule "parenscript"] path = parenscript url = https://github.com/mohe2015/parenscript.git [submodule "popper.js"] path = popper.js url = https://github.com/FezVrasta/popper.js [submodule "dependencies/bootstrap"] path = dependencies/bootstrap url = https://github.com/twbs/bootstrap [submodule "dependencies/cl-pdf"] path = dependencies/cl-pdf url = https://github.com/mbattyani/cl-pdf [submodule "dependencies/Font-Awesome"] path = dependencies/Font-Awesome url = https://github.com/FortAwesome/Font-Awesome [submodule "dependencies/lack"] path = dependencies/lack url = https://github.com/mohe2015/lack [submodule "dependencies/mathlive"] path = dependencies/mathlive url = https://github.com/arnog/mathlive [submodule "dependencies/mw-diff-sexp"] path = dependencies/mw-diff-sexp url = https://github.com/michaelw/mw-diff-sexp [submodule "dependencies/parenscript"] path = dependencies/parenscript url = https://github.com/mohe2015/parenscript [submodule "dependencies/popper.js"] path = dependencies/popper.js url = https://github.com/FezVrasta/popper.js
1,342
Common Lisp
.l
39
32.74359
50
0.778972
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
4759fe209d71c1e242ab05647369cd9929a5204294bf13688e465750254391f0
38,240
[ -1 ]
38,241
schema.sql
mohe2015_schule/schema.sql
CREATE TABLE "schedule" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "grade" VARCHAR(64) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP, UNIQUE ("grade") ); CREATE TABLE "user" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" VARCHAR(64) NOT NULL, "group" VARCHAR(64) NOT NULL, "hash" VARCHAR(512) NOT NULL, "grade_id" INTEGER, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "schedule_revision" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "author_id" INTEGER NOT NULL, "schedule_id" INTEGER NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "course" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "schedule_data" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "weekday" INTEGER NOT NULL, "hour" INTEGER NOT NULL, "week_modulo" INTEGER NOT NULL, "course_id" INTEGER NOT NULL, "room" VARCHAR(32) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "schedule_revision_data" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "schedule_revision_id" INTEGER NOT NULL, "schedule_data_id" INTEGER NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "web_push" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "user_id" INTEGER NOT NULL, "p256dh" VARCHAR(128) NOT NULL, "auth" VARCHAR(32) NOT NULL, "endpoint" VARCHAR(1024) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP, UNIQUE ("user_id", "p256dh", "auth", "endpoint") ); CREATE TABLE "student_course" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "student_id" INTEGER NOT NULL, "course_id" INTEGER NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP, UNIQUE ("student_id", "course_id") ); CREATE TABLE "teacher" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "course_revision" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "author_id" INTEGER NOT NULL, "course_id" INTEGER NOT NULL, "teacher_id" INTEGER NOT NULL, "type" VARCHAR(4) NOT NULL, "subject" VARCHAR(64) NOT NULL, "is_tutorial" BOOLEAN NOT NULL, "grade_id" INTEGER NOT NULL, "topic" VARCHAR(512) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "teacher_revision" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "author_id" INTEGER NOT NULL, "teacher_id" INTEGER NOT NULL, "name" VARCHAR(128) NOT NULL, "initial" VARCHAR(64) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "quiz" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "quiz_revision" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "author_id" INTEGER NOT NULL, "quiz_id" INTEGER NOT NULL, "content" TEXT NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "my_session" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "session_cookie" VARCHAR(512) NOT NULL, "csrf_token" VARCHAR(512) NOT NULL, "user_id" INTEGER, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "wiki_article" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "title" VARCHAR(128) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "wiki_article_revision" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "author_id" INTEGER NOT NULL, "article_id" INTEGER NOT NULL, "summary" VARCHAR(256) NOT NULL, "content" TEXT NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE "wiki_article_revision_category" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "revision_id" INTEGER NOT NULL, "category" VARCHAR(256) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); CREATE TABLE IF NOT EXISTS "schema_migrations" ( "version" VARCHAR(255) PRIMARY KEY ); INSERT INTO schema_migrations (version) VALUES ('20190818175429');
4,099
Common Lisp
.l
137
25.875912
66
0.690241
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
319a2c61d273bfc344b24e588f477275513e560c50f6a48010b79cb411f87ba5
38,241
[ -1 ]
38,277
Cargo.toml
mohe2015_schule/dependencies/rust-web-push/Cargo.toml
[package] name = "web-push-interface" version = "0.1.0" authors = ["mohe2015 <[email protected]>"] edition = "2018" [lib] name = "webpush" crate-type = ["dylib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] web-push = "*" tokio = "*" futures = "*" libc = "*"
337
Common Lisp
.l
14
22.857143
96
0.7
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
aa4c099768e59440227beb10ddb043e9fa5aa1b1146b517e7faafdf6171ad950
38,277
[ -1 ]
38,278
Cargo.lock
mohe2015_schule/dependencies/rust-web-push/Cargo.lock
# This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] name = "arrayvec" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "base64" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "c2-chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "crossbeam-deque" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-queue" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "either" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "erased-serde" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "getrandom" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http-body" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" version = "0.12.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lazy_static" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" version = "0.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memoffset" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio-uds" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nodrop" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num-integer" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl" version = "0.10.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" version = "0.9.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "owning_ref" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ppv-lite86" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand_core" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_hc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_isaac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_os" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_xorshift" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rdrand" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ring" version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rust-crypto" version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rustc_version" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ryu" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "safemem" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "schannel" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "scopeguard" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "security-framework" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "slab" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "spin" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stable_deref_trait" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-buf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-fs" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-udp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "untrusted" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vcpkg" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "want" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasi" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "web-push" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "web-push-interface" version = "0.1.0" dependencies = [ "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "web-push 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ws2_32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" "checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" "checksum base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5032d51da2741729bfdaeb2664d9b8c6d9fd1e2b90715c660b6def36628499c2" "checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" "checksum cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7" "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" "checksum chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "77d81f58b7301084de3b958691458a53c3f7e0b1d702f77e550b6a88e3a88abe" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum getrandom 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2512b3191f22e2763a5db387f1c9409379772e2050841722eb4a8c4f497bf096" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" "checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)" = "7cb44cbce9d8ee4fb36e4c0ad7b794ac44ebaad924b9c8291a63215bb44c2c8f" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)" = "c665266eb592905e8503ba3403020f4b8794d26263f412ca33171600eca9a6fa" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)" = "b5ba300217253bcc5dc68bed23d782affa45000193866e025329aa8a7a9f05b8" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" "checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" "checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5626ac617da2f2d9c48af5515a21d5a480dbd151e01bb1c355e26a3e68113" "checksum serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "01e69e1b8a631f245467ee275b8c757b818653c6d704cdbcaeb56b56767b529c" "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum spin 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbdb51a221842709c2dd65b62ad4b78289fc3e706a02c17a26104528b6aa7837" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" "checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" "checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" "checksum tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" "checksum wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd5442abcac6525a045cc8c795aedb60da7a2e5e89c7bf18a0d5357849bb23c7" "checksum web-push 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4f9940029db5fad1f5ccdc6706367fa24e004c56d2426680c2dfbfbfb5934e3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
64,220
Common Lisp
.l
1,212
51.591584
170
0.758537
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
beec2952f08276d9f1eb08a422500e612609d03ee5e22cdbd711eb55022e8e06
38,278
[ -1 ]
38,279
20190818175429.up.sql
mohe2015_schule/migrations/20190818175429.up.sql
ALTER TABLE "schedule_data" RENAME TO "schedule_data1077"; CREATE TABLE "schedule_data" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "weekday" INTEGER NOT NULL, "hour" INTEGER NOT NULL, "week_modulo" INTEGER NOT NULL, "course_id" INTEGER NOT NULL, "room" VARCHAR(32) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP ); INSERT INTO "schedule_data" ("course_id", "created_at", "hour", "id", "room", "updated_at", "week_modulo", "weekday") SELECT "course_id", "created_at", "hour", "id", "room", "updated_at", "week_modulo", "weekday" FROM "schedule_data1077"; CREATE TABLE "schedule_revision_data" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "schedule_revision_id" INTEGER NOT NULL, "schedule_data_id" INTEGER NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP );
823
Common Lisp
.l
19
39.578947
238
0.690299
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
00df6c14d12369cd4f58696b5dae305c911c3dd3c3bec112171049e2b291a97c
38,279
[ -1 ]
38,280
20190814143420.up.sql
mohe2015_schule/migrations/20190814143420.up.sql
CREATE TABLE "web_push" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "user_id" INTEGER NOT NULL, "p256dh" VARCHAR(128) NOT NULL, "auth" VARCHAR(32) NOT NULL, "endpoint" VARCHAR(1024) NOT NULL, "created_at" TIMESTAMP, "updated_at" TIMESTAMP, UNIQUE ("user_id", "p256dh", "auth", "endpoint") );
322
Common Lisp
.l
10
28
52
0.657051
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
ac2be4ca9843f906eefa33be65ce0ea13dc951e5d6cdc45de7ef715792ecfac4
38,280
[ -1 ]
38,308
blank.yml
mohe2015_schule/.github/workflows/blank.yml
name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Run a one-line script run: echo Hello, world! - name: Run a multi-line script run: | echo Add other actions to build, echo test, and deploy your project.
311
Common Lisp
.l
13
18.461538
43
0.631034
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
15894e1045c6e8cea00b84da3c7fb4c3e96132dc1af62925eb40033a6c18a660
38,308
[ -1 ]
38,310
mathlive.js
mohe2015_schule/static/mathlive.js
const t=0,e=1,i=2,s=3,a=4,o=5,n=6,r=7,l=8,c=9,h=10,d=11,p=12;function m(t,e){e=e||0;const i=t.charCodeAt(e);if(55296<=i&&i<=56319&&e<t.length-1){const s=i,a=t.charCodeAt(e+1);return 56320<=a&&a<=57343?1024*(s-55296)+(a-56320)+65536:s}if(56320<=i&&i<=57343&&e>=1){const s=t.charCodeAt(e-1),a=i;return 55296<=s&&s<=56319?1024*(s-55296)+(a-56320)+65536:a}return i}function u(u,g){if((g=g||0)<0)return 0;if(g>=u.length-1)return u.length;let y=f(m(u,g));for(let k=g+1;k<u.length;k++){if(55296<=u.charCodeAt(k-1)&&u.charCodeAt(k-1)<=56319&&56320<=u.charCodeAt(k)&&u.charCodeAt(k)<=57343)continue;const g=f(m(u,k));if(x=g,!((b=y)===d&&x===p||b===s&&x===d||b===d&&x===s||b===t&&x===e||b!==i&&b!==t&&b!==e&&x!==i&&x!==t&&x!==e&&(b===n&&(x===n||x===r||x===c||x===h)||!(b!==c&&b!==r||x!==r&&x!==l)||(b===h||b===l)&&x===l||b===a&&x===a||x===s||x===o)))return k;y=g}var b,x;return u.length}function f(m){return 13===m?t:10===m?e:0<=m&&m<=9||11<=m&&m<=12||14<=m&&m<=31||127<=m&&m<=159||173===m||1536<=m&&m<=1541||1564===m||1757===m||1807===m||6158===m||8203===m||8206<=m&&m<=8207||8232===m||8233===m||8234<=m&&m<=8238||8288<=m&&m<=8292||8293===m||8294<=m&&m<=8303||55296<=m&&m<=57343||65279===m||65520<=m&&m<=65528||65529<=m&&m<=65531||69821===m||113824<=m&&m<=113827||119155<=m&&m<=119162||917504===m||917505===m||917506<=m&&m<=917535||917536<=m&&m<=917631||917632<=m&&m<=917759||918e3<=m&&m<=921599?i:768<=m&&m<=879||1155<=m&&m<=1159||1160<=m&&m<=1161||1425<=m&&m<=1469||1471===m||1473<=m&&m<=1474||1476<=m&&m<=1477||1479===m||1552<=m&&m<=1562||1611<=m&&m<=1631||1648===m||1750<=m&&m<=1756||1759<=m&&m<=1764||1767<=m&&m<=1768||1770<=m&&m<=1773||1809===m||1840<=m&&m<=1866||1958<=m&&m<=1968||2027<=m&&m<=2035||2070<=m&&m<=2073||2075<=m&&m<=2083||2085<=m&&m<=2087||2089<=m&&m<=2093||2137<=m&&m<=2139||2275<=m&&m<=2306||2362===m||2364===m||2369<=m&&m<=2376||2381===m||2385<=m&&m<=2391||2402<=m&&m<=2403||2433===m||2492===m||2494===m||2497<=m&&m<=2500||2509===m||2519===m||2530<=m&&m<=2531||2561<=m&&m<=2562||2620===m||2625<=m&&m<=2626||2631<=m&&m<=2632||2635<=m&&m<=2637||2641===m||2672<=m&&m<=2673||2677===m||2689<=m&&m<=2690||2748===m||2753<=m&&m<=2757||2759<=m&&m<=2760||2765===m||2786<=m&&m<=2787||2817===m||2876===m||2878===m||2879===m||2881<=m&&m<=2884||2893===m||2902===m||2903===m||2914<=m&&m<=2915||2946===m||3006===m||3008===m||3021===m||3031===m||3072===m||3134<=m&&m<=3136||3142<=m&&m<=3144||3146<=m&&m<=3149||3157<=m&&m<=3158||3170<=m&&m<=3171||3201===m||3260===m||3263===m||3266===m||3270===m||3276<=m&&m<=3277||3285<=m&&m<=3286||3298<=m&&m<=3299||3329===m||3390===m||3393<=m&&m<=3396||3405===m||3415===m||3426<=m&&m<=3427||3530===m||3535===m||3538<=m&&m<=3540||3542===m||3551===m||3633===m||3636<=m&&m<=3642||3655<=m&&m<=3662||3761===m||3764<=m&&m<=3769||3771<=m&&m<=3772||3784<=m&&m<=3789||3864<=m&&m<=3865||3893===m||3895===m||3897===m||3953<=m&&m<=3966||3968<=m&&m<=3972||3974<=m&&m<=3975||3981<=m&&m<=3991||3993<=m&&m<=4028||4038===m||4141<=m&&m<=4144||4146<=m&&m<=4151||4153<=m&&m<=4154||4157<=m&&m<=4158||4184<=m&&m<=4185||4190<=m&&m<=4192||4209<=m&&m<=4212||4226===m||4229<=m&&m<=4230||4237===m||4253===m||4957<=m&&m<=4959||5906<=m&&m<=5908||5938<=m&&m<=5940||5970<=m&&m<=5971||6002<=m&&m<=6003||6068<=m&&m<=6069||6071<=m&&m<=6077||6086===m||6089<=m&&m<=6099||6109===m||6155<=m&&m<=6157||6313===m||6432<=m&&m<=6434||6439<=m&&m<=6440||6450===m||6457<=m&&m<=6459||6679<=m&&m<=6680||6683===m||6742===m||6744<=m&&m<=6750||6752===m||6754===m||6757<=m&&m<=6764||6771<=m&&m<=6780||6783===m||6832<=m&&m<=6845||6846===m||6912<=m&&m<=6915||6964===m||6966<=m&&m<=6970||6972===m||6978===m||7019<=m&&m<=7027||7040<=m&&m<=7041||7074<=m&&m<=7077||7080<=m&&m<=7081||7083<=m&&m<=7085||7142===m||7144<=m&&m<=7145||7149===m||7151<=m&&m<=7153||7212<=m&&m<=7219||7222<=m&&m<=7223||7376<=m&&m<=7378||7380<=m&&m<=7392||7394<=m&&m<=7400||7405===m||7412===m||7416<=m&&m<=7417||7616<=m&&m<=7669||7676<=m&&m<=7679||8204<=m&&m<=8205||8400<=m&&m<=8412||8413<=m&&m<=8416||8417===m||8418<=m&&m<=8420||8421<=m&&m<=8432||11503<=m&&m<=11505||11647===m||11744<=m&&m<=11775||12330<=m&&m<=12333||12334<=m&&m<=12335||12441<=m&&m<=12442||42607===m||42608<=m&&m<=42610||42612<=m&&m<=42621||42654<=m&&m<=42655||42736<=m&&m<=42737||43010===m||43014===m||43019===m||43045<=m&&m<=43046||43204===m||43232<=m&&m<=43249||43302<=m&&m<=43309||43335<=m&&m<=43345||43392<=m&&m<=43394||43443===m||43446<=m&&m<=43449||43452===m||43493===m||43561<=m&&m<=43566||43569<=m&&m<=43570||43573<=m&&m<=43574||43587===m||43596===m||43644===m||43696===m||43698<=m&&m<=43700||43703<=m&&m<=43704||43710<=m&&m<=43711||43713===m||43756<=m&&m<=43757||43766===m||44005===m||44008===m||44013===m||64286===m||65024<=m&&m<=65039||65056<=m&&m<=65071||65438<=m&&m<=65439||66045===m||66272===m||66422<=m&&m<=66426||68097<=m&&m<=68099||68101<=m&&m<=68102||68108<=m&&m<=68111||68152<=m&&m<=68154||68159===m||68325<=m&&m<=68326||69633===m||69688<=m&&m<=69702||69759<=m&&m<=69761||69811<=m&&m<=69814||69817<=m&&m<=69818||69888<=m&&m<=69890||69927<=m&&m<=69931||69933<=m&&m<=69940||70003===m||70016<=m&&m<=70017||70070<=m&&m<=70078||70090<=m&&m<=70092||70191<=m&&m<=70193||70196===m||70198<=m&&m<=70199||70367===m||70371<=m&&m<=70378||70400<=m&&m<=70401||70460===m||70462===m||70464===m||70487===m||70502<=m&&m<=70508||70512<=m&&m<=70516||70832===m||70835<=m&&m<=70840||70842===m||70845===m||70847<=m&&m<=70848||70850<=m&&m<=70851||71087===m||71090<=m&&m<=71093||71100<=m&&m<=71101||71103<=m&&m<=71104||71132<=m&&m<=71133||71219<=m&&m<=71226||71229===m||71231<=m&&m<=71232||71339===m||71341===m||71344<=m&&m<=71349||71351===m||71453<=m&&m<=71455||71458<=m&&m<=71461||71463<=m&&m<=71467||92912<=m&&m<=92916||92976<=m&&m<=92982||94095<=m&&m<=94098||113821<=m&&m<=113822||119141===m||119143<=m&&m<=119145||119150<=m&&m<=119154||119163<=m&&m<=119170||119173<=m&&m<=119179||119210<=m&&m<=119213||119362<=m&&m<=119364||121344<=m&&m<=121398||121403<=m&&m<=121452||121461===m||121476===m||121499<=m&&m<=121503||121505<=m&&m<=121519||125136<=m&&m<=125142||917760<=m&&m<=917999?s:127462<=m&&m<=127487?a:127995<=m&&m<=127999?p:2307===m||2363===m||2366<=m&&m<=2368||2377<=m&&m<=2380||2382<=m&&m<=2383||2434<=m&&m<=2435||2495<=m&&m<=2496||2503<=m&&m<=2504||2507<=m&&m<=2508||2563===m||2622<=m&&m<=2624||2691===m||2750<=m&&m<=2752||2761===m||2763<=m&&m<=2764||2818<=m&&m<=2819||2880===m||2887<=m&&m<=2888||2891<=m&&m<=2892||3007===m||3009<=m&&m<=3010||3014<=m&&m<=3016||3018<=m&&m<=3020||3073<=m&&m<=3075||3137<=m&&m<=3140||3202<=m&&m<=3203||3262===m||3264<=m&&m<=3265||3267<=m&&m<=3268||3271<=m&&m<=3272||3274<=m&&m<=3275||3330<=m&&m<=3331||3391<=m&&m<=3392||3398<=m&&m<=3400||3402<=m&&m<=3404||3458<=m&&m<=3459||3536<=m&&m<=3537||3544<=m&&m<=3550||3570<=m&&m<=3571||3635===m||3763===m||3902<=m&&m<=3903||3967===m||4145===m||4155<=m&&m<=4156||4182<=m&&m<=4183||4228===m||6070===m||6078<=m&&m<=6085||6087<=m&&m<=6088||6435<=m&&m<=6438||6441<=m&&m<=6443||6448<=m&&m<=6449||6451<=m&&m<=6456||6681<=m&&m<=6682||6741===m||6743===m||6765<=m&&m<=6770||6916===m||6965===m||6971===m||6973<=m&&m<=6977||6979<=m&&m<=6980||7042===m||7073===m||7078<=m&&m<=7079||7082===m||7143===m||7146<=m&&m<=7148||7150===m||7154<=m&&m<=7155||7204<=m&&m<=7211||7220<=m&&m<=7221||7393===m||7410<=m&&m<=7411||43043<=m&&m<=43044||43047===m||43136<=m&&m<=43137||43188<=m&&m<=43203||43346<=m&&m<=43347||43395===m||43444<=m&&m<=43445||43450<=m&&m<=43451||43453<=m&&m<=43456||43567<=m&&m<=43568||43571<=m&&m<=43572||43597===m||43755===m||43758<=m&&m<=43759||43765===m||44003<=m&&m<=44004||44006<=m&&m<=44007||44009<=m&&m<=44010||44012===m||69632===m||69634===m||69762===m||69808<=m&&m<=69810||69815<=m&&m<=69816||69932===m||70018===m||70067<=m&&m<=70069||70079<=m&&m<=70080||70188<=m&&m<=70190||70194<=m&&m<=70195||70197===m||70368<=m&&m<=70370||70402<=m&&m<=70403||70463===m||70465<=m&&m<=70468||70471<=m&&m<=70472||70475<=m&&m<=70477||70498<=m&&m<=70499||70833<=m&&m<=70834||70841===m||70843<=m&&m<=70844||70846===m||70849===m||71088<=m&&m<=71089||71096<=m&&m<=71099||71102===m||71216<=m&&m<=71218||71227<=m&&m<=71228||71230===m||71340===m||71342<=m&&m<=71343||71350===m||71456<=m&&m<=71457||71462===m||94033<=m&&m<=94078||119142===m||119149===m?o:4352<=m&&m<=4447||43360<=m&&m<=43388?n:4448<=m&&m<=4519||55216<=m&&m<=55238?r:4520<=m&&m<=4607||55243<=m&&m<=55291?l:44032===m||44060===m||44088===m||44116===m||44144===m||44172===m||44200===m||44228===m||44256===m||44284===m||44312===m||44340===m||44368===m||44396===m||44424===m||44452===m||44480===m||44508===m||44536===m||44564===m||44592===m||44620===m||44648===m||44676===m||44704===m||44732===m||44760===m||44788===m||44816===m||44844===m||44872===m||44900===m||44928===m||44956===m||44984===m||45012===m||45040===m||45068===m||45096===m||45124===m||45152===m||45180===m||45208===m||45236===m||45264===m||45292===m||45320===m||45348===m||45376===m||45404===m||45432===m||45460===m||45488===m||45516===m||45544===m||45572===m||45600===m||45628===m||45656===m||45684===m||45712===m||45740===m||45768===m||45796===m||45824===m||45852===m||45880===m||45908===m||45936===m||45964===m||45992===m||46020===m||46048===m||46076===m||46104===m||46132===m||46160===m||46188===m||46216===m||46244===m||46272===m||46300===m||46328===m||46356===m||46384===m||46412===m||46440===m||46468===m||46496===m||46524===m||46552===m||46580===m||46608===m||46636===m||46664===m||46692===m||46720===m||46748===m||46776===m||46804===m||46832===m||46860===m||46888===m||46916===m||46944===m||46972===m||47e3===m||47028===m||47056===m||47084===m||47112===m||47140===m||47168===m||47196===m||47224===m||47252===m||47280===m||47308===m||47336===m||47364===m||47392===m||47420===m||47448===m||47476===m||47504===m||47532===m||47560===m||47588===m||47616===m||47644===m||47672===m||47700===m||47728===m||47756===m||47784===m||47812===m||47840===m||47868===m||47896===m||47924===m||47952===m||47980===m||48008===m||48036===m||48064===m||48092===m||48120===m||48148===m||48176===m||48204===m||48232===m||48260===m||48288===m||48316===m||48344===m||48372===m||48400===m||48428===m||48456===m||48484===m||48512===m||48540===m||48568===m||48596===m||48624===m||48652===m||48680===m||48708===m||48736===m||48764===m||48792===m||48820===m||48848===m||48876===m||48904===m||48932===m||48960===m||48988===m||49016===m||49044===m||49072===m||49100===m||49128===m||49156===m||49184===m||49212===m||49240===m||49268===m||49296===m||49324===m||49352===m||49380===m||49408===m||49436===m||49464===m||49492===m||49520===m||49548===m||49576===m||49604===m||49632===m||49660===m||49688===m||49716===m||49744===m||49772===m||49800===m||49828===m||49856===m||49884===m||49912===m||49940===m||49968===m||49996===m||50024===m||50052===m||50080===m||50108===m||50136===m||50164===m||50192===m||50220===m||50248===m||50276===m||50304===m||50332===m||50360===m||50388===m||50416===m||50444===m||50472===m||50500===m||50528===m||50556===m||50584===m||50612===m||50640===m||50668===m||50696===m||50724===m||50752===m||50780===m||50808===m||50836===m||50864===m||50892===m||50920===m||50948===m||50976===m||51004===m||51032===m||51060===m||51088===m||51116===m||51144===m||51172===m||51200===m||51228===m||51256===m||51284===m||51312===m||51340===m||51368===m||51396===m||51424===m||51452===m||51480===m||51508===m||51536===m||51564===m||51592===m||51620===m||51648===m||51676===m||51704===m||51732===m||51760===m||51788===m||51816===m||51844===m||51872===m||51900===m||51928===m||51956===m||51984===m||52012===m||52040===m||52068===m||52096===m||52124===m||52152===m||52180===m||52208===m||52236===m||52264===m||52292===m||52320===m||52348===m||52376===m||52404===m||52432===m||52460===m||52488===m||52516===m||52544===m||52572===m||52600===m||52628===m||52656===m||52684===m||52712===m||52740===m||52768===m||52796===m||52824===m||52852===m||52880===m||52908===m||52936===m||52964===m||52992===m||53020===m||53048===m||53076===m||53104===m||53132===m||53160===m||53188===m||53216===m||53244===m||53272===m||53300===m||53328===m||53356===m||53384===m||53412===m||53440===m||53468===m||53496===m||53524===m||53552===m||53580===m||53608===m||53636===m||53664===m||53692===m||53720===m||53748===m||53776===m||53804===m||53832===m||53860===m||53888===m||53916===m||53944===m||53972===m||54e3===m||54028===m||54056===m||54084===m||54112===m||54140===m||54168===m||54196===m||54224===m||54252===m||54280===m||54308===m||54336===m||54364===m||54392===m||54420===m||54448===m||54476===m||54504===m||54532===m||54560===m||54588===m||54616===m||54644===m||54672===m||54700===m||54728===m||54756===m||54784===m||54812===m||54840===m||54868===m||54896===m||54924===m||54952===m||54980===m||55008===m||55036===m||55064===m||55092===m||55120===m||55148===m||55176===m?c:44033<=m&&m<=44059||44061<=m&&m<=44087||44089<=m&&m<=44115||44117<=m&&m<=44143||44145<=m&&m<=44171||44173<=m&&m<=44199||44201<=m&&m<=44227||44229<=m&&m<=44255||44257<=m&&m<=44283||44285<=m&&m<=44311||44313<=m&&m<=44339||44341<=m&&m<=44367||44369<=m&&m<=44395||44397<=m&&m<=44423||44425<=m&&m<=44451||44453<=m&&m<=44479||44481<=m&&m<=44507||44509<=m&&m<=44535||44537<=m&&m<=44563||44565<=m&&m<=44591||44593<=m&&m<=44619||44621<=m&&m<=44647||44649<=m&&m<=44675||44677<=m&&m<=44703||44705<=m&&m<=44731||44733<=m&&m<=44759||44761<=m&&m<=44787||44789<=m&&m<=44815||44817<=m&&m<=44843||44845<=m&&m<=44871||44873<=m&&m<=44899||44901<=m&&m<=44927||44929<=m&&m<=44955||44957<=m&&m<=44983||44985<=m&&m<=45011||45013<=m&&m<=45039||45041<=m&&m<=45067||45069<=m&&m<=45095||45097<=m&&m<=45123||45125<=m&&m<=45151||45153<=m&&m<=45179||45181<=m&&m<=45207||45209<=m&&m<=45235||45237<=m&&m<=45263||45265<=m&&m<=45291||45293<=m&&m<=45319||45321<=m&&m<=45347||45349<=m&&m<=45375||45377<=m&&m<=45403||45405<=m&&m<=45431||45433<=m&&m<=45459||45461<=m&&m<=45487||45489<=m&&m<=45515||45517<=m&&m<=45543||45545<=m&&m<=45571||45573<=m&&m<=45599||45601<=m&&m<=45627||45629<=m&&m<=45655||45657<=m&&m<=45683||45685<=m&&m<=45711||45713<=m&&m<=45739||45741<=m&&m<=45767||45769<=m&&m<=45795||45797<=m&&m<=45823||45825<=m&&m<=45851||45853<=m&&m<=45879||45881<=m&&m<=45907||45909<=m&&m<=45935||45937<=m&&m<=45963||45965<=m&&m<=45991||45993<=m&&m<=46019||46021<=m&&m<=46047||46049<=m&&m<=46075||46077<=m&&m<=46103||46105<=m&&m<=46131||46133<=m&&m<=46159||46161<=m&&m<=46187||46189<=m&&m<=46215||46217<=m&&m<=46243||46245<=m&&m<=46271||46273<=m&&m<=46299||46301<=m&&m<=46327||46329<=m&&m<=46355||46357<=m&&m<=46383||46385<=m&&m<=46411||46413<=m&&m<=46439||46441<=m&&m<=46467||46469<=m&&m<=46495||46497<=m&&m<=46523||46525<=m&&m<=46551||46553<=m&&m<=46579||46581<=m&&m<=46607||46609<=m&&m<=46635||46637<=m&&m<=46663||46665<=m&&m<=46691||46693<=m&&m<=46719||46721<=m&&m<=46747||46749<=m&&m<=46775||46777<=m&&m<=46803||46805<=m&&m<=46831||46833<=m&&m<=46859||46861<=m&&m<=46887||46889<=m&&m<=46915||46917<=m&&m<=46943||46945<=m&&m<=46971||46973<=m&&m<=46999||47001<=m&&m<=47027||47029<=m&&m<=47055||47057<=m&&m<=47083||47085<=m&&m<=47111||47113<=m&&m<=47139||47141<=m&&m<=47167||47169<=m&&m<=47195||47197<=m&&m<=47223||47225<=m&&m<=47251||47253<=m&&m<=47279||47281<=m&&m<=47307||47309<=m&&m<=47335||47337<=m&&m<=47363||47365<=m&&m<=47391||47393<=m&&m<=47419||47421<=m&&m<=47447||47449<=m&&m<=47475||47477<=m&&m<=47503||47505<=m&&m<=47531||47533<=m&&m<=47559||47561<=m&&m<=47587||47589<=m&&m<=47615||47617<=m&&m<=47643||47645<=m&&m<=47671||47673<=m&&m<=47699||47701<=m&&m<=47727||47729<=m&&m<=47755||47757<=m&&m<=47783||47785<=m&&m<=47811||47813<=m&&m<=47839||47841<=m&&m<=47867||47869<=m&&m<=47895||47897<=m&&m<=47923||47925<=m&&m<=47951||47953<=m&&m<=47979||47981<=m&&m<=48007||48009<=m&&m<=48035||48037<=m&&m<=48063||48065<=m&&m<=48091||48093<=m&&m<=48119||48121<=m&&m<=48147||48149<=m&&m<=48175||48177<=m&&m<=48203||48205<=m&&m<=48231||48233<=m&&m<=48259||48261<=m&&m<=48287||48289<=m&&m<=48315||48317<=m&&m<=48343||48345<=m&&m<=48371||48373<=m&&m<=48399||48401<=m&&m<=48427||48429<=m&&m<=48455||48457<=m&&m<=48483||48485<=m&&m<=48511||48513<=m&&m<=48539||48541<=m&&m<=48567||48569<=m&&m<=48595||48597<=m&&m<=48623||48625<=m&&m<=48651||48653<=m&&m<=48679||48681<=m&&m<=48707||48709<=m&&m<=48735||48737<=m&&m<=48763||48765<=m&&m<=48791||48793<=m&&m<=48819||48821<=m&&m<=48847||48849<=m&&m<=48875||48877<=m&&m<=48903||48905<=m&&m<=48931||48933<=m&&m<=48959||48961<=m&&m<=48987||48989<=m&&m<=49015||49017<=m&&m<=49043||49045<=m&&m<=49071||49073<=m&&m<=49099||49101<=m&&m<=49127||49129<=m&&m<=49155||49157<=m&&m<=49183||49185<=m&&m<=49211||49213<=m&&m<=49239||49241<=m&&m<=49267||49269<=m&&m<=49295||49297<=m&&m<=49323||49325<=m&&m<=49351||49353<=m&&m<=49379||49381<=m&&m<=49407||49409<=m&&m<=49435||49437<=m&&m<=49463||49465<=m&&m<=49491||49493<=m&&m<=49519||49521<=m&&m<=49547||49549<=m&&m<=49575||49577<=m&&m<=49603||49605<=m&&m<=49631||49633<=m&&m<=49659||49661<=m&&m<=49687||49689<=m&&m<=49715||49717<=m&&m<=49743||49745<=m&&m<=49771||49773<=m&&m<=49799||49801<=m&&m<=49827||49829<=m&&m<=49855||49857<=m&&m<=49883||49885<=m&&m<=49911||49913<=m&&m<=49939||49941<=m&&m<=49967||49969<=m&&m<=49995||49997<=m&&m<=50023||50025<=m&&m<=50051||50053<=m&&m<=50079||50081<=m&&m<=50107||50109<=m&&m<=50135||50137<=m&&m<=50163||50165<=m&&m<=50191||50193<=m&&m<=50219||50221<=m&&m<=50247||50249<=m&&m<=50275||50277<=m&&m<=50303||50305<=m&&m<=50331||50333<=m&&m<=50359||50361<=m&&m<=50387||50389<=m&&m<=50415||50417<=m&&m<=50443||50445<=m&&m<=50471||50473<=m&&m<=50499||50501<=m&&m<=50527||50529<=m&&m<=50555||50557<=m&&m<=50583||50585<=m&&m<=50611||50613<=m&&m<=50639||50641<=m&&m<=50667||50669<=m&&m<=50695||50697<=m&&m<=50723||50725<=m&&m<=50751||50753<=m&&m<=50779||50781<=m&&m<=50807||50809<=m&&m<=50835||50837<=m&&m<=50863||50865<=m&&m<=50891||50893<=m&&m<=50919||50921<=m&&m<=50947||50949<=m&&m<=50975||50977<=m&&m<=51003||51005<=m&&m<=51031||51033<=m&&m<=51059||51061<=m&&m<=51087||51089<=m&&m<=51115||51117<=m&&m<=51143||51145<=m&&m<=51171||51173<=m&&m<=51199||51201<=m&&m<=51227||51229<=m&&m<=51255||51257<=m&&m<=51283||51285<=m&&m<=51311||51313<=m&&m<=51339||51341<=m&&m<=51367||51369<=m&&m<=51395||51397<=m&&m<=51423||51425<=m&&m<=51451||51453<=m&&m<=51479||51481<=m&&m<=51507||51509<=m&&m<=51535||51537<=m&&m<=51563||51565<=m&&m<=51591||51593<=m&&m<=51619||51621<=m&&m<=51647||51649<=m&&m<=51675||51677<=m&&m<=51703||51705<=m&&m<=51731||51733<=m&&m<=51759||51761<=m&&m<=51787||51789<=m&&m<=51815||51817<=m&&m<=51843||51845<=m&&m<=51871||51873<=m&&m<=51899||51901<=m&&m<=51927||51929<=m&&m<=51955||51957<=m&&m<=51983||51985<=m&&m<=52011||52013<=m&&m<=52039||52041<=m&&m<=52067||52069<=m&&m<=52095||52097<=m&&m<=52123||52125<=m&&m<=52151||52153<=m&&m<=52179||52181<=m&&m<=52207||52209<=m&&m<=52235||52237<=m&&m<=52263||52265<=m&&m<=52291||52293<=m&&m<=52319||52321<=m&&m<=52347||52349<=m&&m<=52375||52377<=m&&m<=52403||52405<=m&&m<=52431||52433<=m&&m<=52459||52461<=m&&m<=52487||52489<=m&&m<=52515||52517<=m&&m<=52543||52545<=m&&m<=52571||52573<=m&&m<=52599||52601<=m&&m<=52627||52629<=m&&m<=52655||52657<=m&&m<=52683||52685<=m&&m<=52711||52713<=m&&m<=52739||52741<=m&&m<=52767||52769<=m&&m<=52795||52797<=m&&m<=52823||52825<=m&&m<=52851||52853<=m&&m<=52879||52881<=m&&m<=52907||52909<=m&&m<=52935||52937<=m&&m<=52963||52965<=m&&m<=52991||52993<=m&&m<=53019||53021<=m&&m<=53047||53049<=m&&m<=53075||53077<=m&&m<=53103||53105<=m&&m<=53131||53133<=m&&m<=53159||53161<=m&&m<=53187||53189<=m&&m<=53215||53217<=m&&m<=53243||53245<=m&&m<=53271||53273<=m&&m<=53299||53301<=m&&m<=53327||53329<=m&&m<=53355||53357<=m&&m<=53383||53385<=m&&m<=53411||53413<=m&&m<=53439||53441<=m&&m<=53467||53469<=m&&m<=53495||53497<=m&&m<=53523||53525<=m&&m<=53551||53553<=m&&m<=53579||53581<=m&&m<=53607||53609<=m&&m<=53635||53637<=m&&m<=53663||53665<=m&&m<=53691||53693<=m&&m<=53719||53721<=m&&m<=53747||53749<=m&&m<=53775||53777<=m&&m<=53803||53805<=m&&m<=53831||53833<=m&&m<=53859||53861<=m&&m<=53887||53889<=m&&m<=53915||53917<=m&&m<=53943||53945<=m&&m<=53971||53973<=m&&m<=53999||54001<=m&&m<=54027||54029<=m&&m<=54055||54057<=m&&m<=54083||54085<=m&&m<=54111||54113<=m&&m<=54139||54141<=m&&m<=54167||54169<=m&&m<=54195||54197<=m&&m<=54223||54225<=m&&m<=54251||54253<=m&&m<=54279||54281<=m&&m<=54307||54309<=m&&m<=54335||54337<=m&&m<=54363||54365<=m&&m<=54391||54393<=m&&m<=54419||54421<=m&&m<=54447||54449<=m&&m<=54475||54477<=m&&m<=54503||54505<=m&&m<=54531||54533<=m&&m<=54559||54561<=m&&m<=54587||54589<=m&&m<=54615||54617<=m&&m<=54643||54645<=m&&m<=54671||54673<=m&&m<=54699||54701<=m&&m<=54727||54729<=m&&m<=54755||54757<=m&&m<=54783||54785<=m&&m<=54811||54813<=m&&m<=54839||54841<=m&&m<=54867||54869<=m&&m<=54895||54897<=m&&m<=54923||54925<=m&&m<=54951||54953<=m&&m<=54979||54981<=m&&m<=55007||55009<=m&&m<=55035||55037<=m&&m<=55063||55065<=m&&m<=55091||55093<=m&&m<=55119||55121<=m&&m<=55147||55149<=m&&m<=55175||55177<=m&&m<=55203?h:d}var g={splitGraphemes:function(t){if(/^[\x20-\xFF]*$/.test(t))return t;const e=[];let i,s=0;for(;(i=u(t,s))<t.length;)e.push(t.slice(s,i)),s=i;return s<t.length&&e.push(t.slice(s)),e},countGraphemes:function(t){let e,i=0,s=0;for(;(e=u(t,s))<t.length;)s=e,i++;return s<t.length&&i++,i},nextBreak:u};class y{constructor(t,e){this.type=t,this.value=e}}class b{constructor(t){this.s=g.splitGraphemes(t),this.pos=0}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:null}peek(){return this.s[this.pos]}scan(t){let e;return(e="string"==typeof this.s?t.exec(this.s.slice(this.pos)):t.exec(this.s.slice(this.pos).join("")))?(this.pos+=e[0].length,e[0]):null}isWhiteSpace(){return/[ \f\n\r\t\v\xA0\u2028\u2029]/.test(this.s[this.pos])}makeToken(){if(this.end())return null;if(this.isWhiteSpace())return this.get(),new y("space");let t=null;if("\\"===this.peek()){if(this.get(),!this.end()){let e=this.scan(/^[a-zA-Z*]+/);"bgroup"===e?t=new y("{"):"egroup"===e?t=new y("}"):(e||(e=this.get()),t=new y("command",e))}}else if("{"===this.peek()||"}"===this.peek())t=new y(this.get());else if("#"===this.peek()){if(this.get(),!this.end()){let e=!1,i=this.peek();if(/[0-9?]/.test(i)&&(e=!0,this.pos+1<this.s.length)){const t=this.s[this.pos+1];e=/[^0-9A-Za-z]/.test(t)}e?(t=new y("#"),i=this.get(),t.value=i>="0"&&i<="9"?parseInt(i):"?"):t=new y("literal","#")}}else"~"===this.peek()?(this.get(),t=new y("command","space")):"$"===this.peek()?(this.get(),"$"===this.peek()?(this.get(),t=new y("$$")):t=new y("$")):t=new y("literal",this.get());return t}}var x={tokenize:function(t){const e=[],i=t.toString().split(/\r?\n/);let s="",a="";for(const t of i){s+=a,a=" ";const e=t.match(/((?:\\%)|[^%])*/);e&&(s+=e[0])}const o=new b(s);for(;!o.end();){const t=o.makeToken();t&&e.push(t)}return e}},k={"AMS-Regular":{65:[0,.68889,0,0],66:[0,.68889,0,0],67:[0,.68889,0,0],68:[0,.68889,0,0],69:[0,.68889,0,0],70:[0,.68889,0,0],71:[0,.68889,0,0],72:[0,.68889,0,0],73:[0,.68889,0,0],74:[.16667,.68889,0,0],75:[0,.68889,0,0],76:[0,.68889,0,0],77:[0,.68889,0,0],78:[0,.68889,0,0],79:[.16667,.68889,0,0],80:[0,.68889,0,0],81:[.16667,.68889,0,0],82:[0,.68889,0,0],83:[0,.68889,0,0],84:[0,.68889,0,0],85:[0,.68889,0,0],86:[0,.68889,0,0],87:[0,.68889,0,0],88:[0,.68889,0,0],89:[0,.68889,0,0],90:[0,.68889,0,0],107:[0,.68889,0,0],165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:[0,.68889,0,0],295:[0,.68889,0,0],710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:[.08167,.58167,0,0],1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:[0,.68889,0,0],8487:[0,.68889,0,0],8498:[0,.68889,0,0],8502:[0,.68889,0,0],8503:[0,.68889,0,0],8504:[0,.68889,0,0],8513:[0,.68889,0,0],8592:[-.03598,.46402,0,0],8594:[-.03598,.46402,0,0],8602:[-.13313,.36687,0,0],8603:[-.13313,.36687,0,0],8606:[.01354,.52239,0,0],8608:[.01354,.52239,0,0],8610:[.01354,.52239,0,0],8611:[.01354,.52239,0,0],8619:[0,.54986,0,0],8620:[0,.54986,0,0],8621:[-.13313,.37788,0,0],8622:[-.13313,.36687,0,0],8624:[0,.69224,0,0],8625:[0,.69224,0,0],8630:[0,.43056,0,0],8631:[0,.43056,0,0],8634:[.08198,.58198,0,0],8635:[.08198,.58198,0,0],8638:[.19444,.69224,0,0],8639:[.19444,.69224,0,0],8642:[.19444,.69224,0,0],8643:[.19444,.69224,0,0],8644:[.1808,.675,0,0],8646:[.1808,.675,0,0],8647:[.1808,.675,0,0],8648:[.19444,.69224,0,0],8649:[.1808,.675,0,0],8650:[.19444,.69224,0,0],8651:[.01354,.52239,0,0],8652:[.01354,.52239,0,0],8653:[-.13313,.36687,0,0],8654:[-.13313,.36687,0,0],8655:[-.13313,.36687,0,0],8666:[.13667,.63667,0,0],8667:[.13667,.63667,0,0],8669:[-.13313,.37788,0,0],8672:[-.064,.437,0,0],8674:[-.064,.437,0,0],8705:[0,.825,0,0],8708:[0,.68889,0,0],8709:[.08167,.58167,0,0],8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:[.08167,.58167,0,0],8733:[0,.69224,0,0],8736:[0,.69224,0,0],8737:[0,.69224,0,0],8738:[.03517,.52239,0,0],8739:[.08167,.58167,0,0],8740:[.25142,.74111,0,0],8741:[.08167,.58167,0,0],8742:[.25142,.74111,0,0],8756:[0,.69224,0,0],8757:[0,.69224,0,0],8764:[-.13313,.36687,0,0],8765:[-.13313,.37788,0,0],8769:[-.13313,.36687,0,0],8770:[-.03625,.46375,0,0],8774:[.30274,.79383,0,0],8776:[-.01688,.48312,0,0],8778:[.08167,.58167,0,0],8782:[.06062,.54986,0,0],8783:[.06062,.54986,0,0],8785:[.08198,.58198,0,0],8786:[.08198,.58198,0,0],8787:[.08198,.58198,0,0],8790:[0,.69224,0,0],8791:[.22958,.72958,0,0],8796:[.08198,.91667,0,0],8806:[.25583,.75583,0,0],8807:[.25583,.75583,0,0],8808:[.25142,.75726,0,0],8809:[.25142,.75726,0,0],8812:[.25583,.75583,0,0],8814:[.20576,.70576,0,0],8815:[.20576,.70576,0,0],8816:[.30274,.79383,0,0],8817:[.30274,.79383,0,0],8818:[.22958,.72958,0,0],8819:[.22958,.72958,0,0],8822:[.1808,.675,0,0],8823:[.1808,.675,0,0],8828:[.13667,.63667,0,0],8829:[.13667,.63667,0,0],8830:[.22958,.72958,0,0],8831:[.22958,.72958,0,0],8832:[.20576,.70576,0,0],8833:[.20576,.70576,0,0],8840:[.30274,.79383,0,0],8841:[.30274,.79383,0,0],8842:[.13597,.63597,0,0],8843:[.13597,.63597,0,0],8847:[.03517,.54986,0,0],8848:[.03517,.54986,0,0],8858:[.08198,.58198,0,0],8859:[.08198,.58198,0,0],8861:[.08198,.58198,0,0],8862:[0,.675,0,0],8863:[0,.675,0,0],8864:[0,.675,0,0],8865:[0,.675,0,0],8872:[0,.69224,0,0],8873:[0,.69224,0,0],8874:[0,.69224,0,0],8876:[0,.68889,0,0],8877:[0,.68889,0,0],8878:[0,.68889,0,0],8879:[0,.68889,0,0],8882:[.03517,.54986,0,0],8883:[.03517,.54986,0,0],8884:[.13667,.63667,0,0],8885:[.13667,.63667,0,0],8888:[0,.54986,0,0],8890:[.19444,.43056,0,0],8891:[.19444,.69224,0,0],8892:[.19444,.69224,0,0],8901:[0,.54986,0,0],8903:[.08167,.58167,0,0],8905:[.08167,.58167,0,0],8906:[.08167,.58167,0,0],8907:[0,.69224,0,0],8908:[0,.69224,0,0],8909:[-.03598,.46402,0,0],8910:[0,.54986,0,0],8911:[0,.54986,0,0],8912:[.03517,.54986,0,0],8913:[.03517,.54986,0,0],8914:[0,.54986,0,0],8915:[0,.54986,0,0],8916:[0,.69224,0,0],8918:[.0391,.5391,0,0],8919:[.0391,.5391,0,0],8920:[.03517,.54986,0,0],8921:[.03517,.54986,0,0],8922:[.38569,.88569,0,0],8923:[.38569,.88569,0,0],8926:[.13667,.63667,0,0],8927:[.13667,.63667,0,0],8928:[.30274,.79383,0,0],8929:[.30274,.79383,0,0],8934:[.23222,.74111,0,0],8935:[.23222,.74111,0,0],8936:[.23222,.74111,0,0],8937:[.23222,.74111,0,0],8938:[.20576,.70576,0,0],8939:[.20576,.70576,0,0],8940:[.30274,.79383,0,0],8941:[.30274,.79383,0,0],8994:[.19444,.69224,0,0],8995:[.19444,.69224,0,0],9416:[.15559,.69224,0,0],9484:[0,.69224,0,0],9488:[0,.69224,0,0],9492:[0,.37788,0,0],9496:[0,.37788,0,0],9585:[.19444,.68889,0,0],9586:[.19444,.74111,0,0],9632:[0,.675,0,0],9633:[0,.675,0,0],9650:[0,.54986,0,0],9651:[0,.54986,0,0],9654:[.03517,.54986,0,0],9660:[0,.54986,0,0],9661:[0,.54986,0,0],9664:[.03517,.54986,0,0],9674:[.11111,.69224,0,0],9733:[.19444,.69224,0,0],10003:[0,.69224,0,0],10016:[0,.69224,0,0],10731:[.11111,.69224,0,0],10846:[.19444,.75583,0,0],10877:[.13667,.63667,0,0],10878:[.13667,.63667,0,0],10885:[.25583,.75583,0,0],10886:[.25583,.75583,0,0],10887:[.13597,.63597,0,0],10888:[.13597,.63597,0,0],10889:[.26167,.75726,0,0],10890:[.26167,.75726,0,0],10891:[.48256,.98256,0,0],10892:[.48256,.98256,0,0],10901:[.13667,.63667,0,0],10902:[.13667,.63667,0,0],10933:[.25142,.75726,0,0],10934:[.25142,.75726,0,0],10935:[.26167,.75726,0,0],10936:[.26167,.75726,0,0],10937:[.26167,.75726,0,0],10938:[.26167,.75726,0,0],10949:[.25583,.75583,0,0],10950:[.25583,.75583,0,0],10955:[.28481,.79383,0,0],10956:[.28481,.79383,0,0],57350:[.08167,.58167,0,0],57351:[.08167,.58167,0,0],57352:[.08167,.58167,0,0],57353:[0,.43056,.04028,0],57356:[.25142,.75726,0,0],57357:[.25142,.75726,0,0],57358:[.41951,.91951,0,0],57359:[.30274,.79383,0,0],57360:[.30274,.79383,0,0],57361:[.41951,.91951,0,0],57366:[.25142,.75726,0,0],57367:[.25142,.75726,0,0],57368:[.25142,.75726,0,0],57369:[.25142,.75726,0,0],57370:[.13597,.63597,0,0],57371:[.13597,.63597,0,0]},"Caligraphic-Regular":{48:[0,.43056,0,0],49:[0,.43056,0,0],50:[0,.43056,0,0],51:[.19444,.43056,0,0],52:[.19444,.43056,0,0],53:[.19444,.43056,0,0],54:[0,.64444,0,0],55:[.19444,.43056,0,0],56:[0,.64444,0,0],57:[.19444,.43056,0,0],65:[0,.68333,0,.19445],66:[0,.68333,.03041,.13889],67:[0,.68333,.05834,.13889],68:[0,.68333,.02778,.08334],69:[0,.68333,.08944,.11111],70:[0,.68333,.09931,.11111],71:[.09722,.68333,.0593,.11111],72:[0,.68333,.00965,.11111],73:[0,.68333,.07382,0],74:[.09722,.68333,.18472,.16667],75:[0,.68333,.01445,.05556],76:[0,.68333,0,.13889],77:[0,.68333,0,.13889],78:[0,.68333,.14736,.08334],79:[0,.68333,.02778,.11111],80:[0,.68333,.08222,.08334],81:[.09722,.68333,0,.11111],82:[0,.68333,0,.08334],83:[0,.68333,.075,.13889],84:[0,.68333,.25417,0],85:[0,.68333,.09931,.08334],86:[0,.68333,.08222,0],87:[0,.68333,.08222,.08334],88:[0,.68333,.14643,.13889],89:[.09722,.68333,.08222,.08334],90:[0,.68333,.07944,.13889]},"Fraktur-Regular":{33:[0,.69141,0,0],34:[0,.69141,0,0],38:[0,.69141,0,0],39:[0,.69141,0,0],40:[.24982,.74947,0,0],41:[.24982,.74947,0,0],42:[0,.62119,0,0],43:[.08319,.58283,0,0],44:[0,.10803,0,0],45:[.08319,.58283,0,0],46:[0,.10803,0,0],47:[.24982,.74947,0,0],48:[0,.47534,0,0],49:[0,.47534,0,0],50:[0,.47534,0,0],51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:[0,.69141,0,0],55:[.18906,.47534,0,0],56:[0,.69141,0,0],57:[.18906,.47534,0,0],58:[0,.47534,0,0],59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:[0,.69141,0,0],65:[0,.69141,0,0],66:[0,.69141,0,0],67:[0,.69141,0,0],68:[0,.69141,0,0],69:[0,.69141,0,0],70:[.12604,.69141,0,0],71:[0,.69141,0,0],72:[.06302,.69141,0,0],73:[0,.69141,0,0],74:[.12604,.69141,0,0],75:[0,.69141,0,0],76:[0,.69141,0,0],77:[0,.69141,0,0],78:[0,.69141,0,0],79:[0,.69141,0,0],80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:[0,.69141,0,0],83:[0,.69141,0,0],84:[0,.69141,0,0],85:[0,.69141,0,0],86:[0,.69141,0,0],87:[0,.69141,0,0],88:[0,.69141,0,0],89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:[0,.69141,0,0],97:[0,.47534,0,0],98:[0,.69141,0,0],99:[0,.47534,0,0],100:[0,.62119,0,0],101:[0,.47534,0,0],102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:[0,.69141,0,0],106:[0,.69141,0,0],107:[0,.69141,0,0],108:[0,.69141,0,0],109:[0,.47534,0,0],110:[0,.47534,0,0],111:[0,.47534,0,0],112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:[0,.47534,0,0],115:[0,.47534,0,0],116:[0,.62119,0,0],117:[0,.47534,0,0],118:[0,.52396,0,0],119:[0,.52396,0,0],120:[.18906,.47534,0,0],121:[.18906,.47534,0,0],122:[.18906,.47534,0,0],8216:[0,.69141,0,0],8217:[0,.69141,0,0],58112:[0,.62119,0,0],58113:[0,.62119,0,0],58114:[.18906,.69141,0,0],58115:[.18906,.69141,0,0],58116:[.18906,.47534,0,0],58117:[0,.69141,0,0],58118:[0,.62119,0,0],58119:[0,.47534,0,0]},"Main-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:[0,.44444,0,0],46:[0,.15556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.44444,0,0],59:[.19444,.44444,0,0],60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68611,0,0],66:[0,.68611,0,0],67:[0,.68611,0,0],68:[0,.68611,0,0],69:[0,.68611,0,0],70:[0,.68611,0,0],71:[0,.68611,0,0],72:[0,.68611,0,0],73:[0,.68611,0,0],74:[0,.68611,0,0],75:[0,.68611,0,0],76:[0,.68611,0,0],77:[0,.68611,0,0],78:[0,.68611,0,0],79:[0,.68611,0,0],80:[0,.68611,0,0],81:[.19444,.68611,0,0],82:[0,.68611,0,0],83:[0,.68611,0,0],84:[0,.68611,0,0],85:[0,.68611,0,0],86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:[0,.68611,0,0],89:[0,.68611,.02875,0],90:[0,.68611,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.13444,.03194,0],96:[0,.69444,0,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,0,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:[0,.44444,0,0],121:[.19444,.44444,.01597,0],122:[0,.44444,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],172:[0,.44444,0,0],175:[0,.59611,0,0],176:[0,.69444,0,0],177:[.13333,.63333,0,0],180:[0,.69444,0,0],215:[.13333,.63333,0,0],247:[.13333,.63333,0,0],305:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.59611,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.69444,0,0],772:[0,.59611,0,0],774:[0,.69444,0,0],775:[0,.69444,0,0],776:[0,.69444,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.63194,0,0],824:[.19444,.69444,0,0],915:[0,.68611,0,0],916:[0,.68611,0,0],920:[0,.68611,0,0],923:[0,.68611,0,0],926:[0,.68611,0,0],928:[0,.68611,0,0],931:[0,.68611,0,0],933:[0,.68611,0,0],934:[0,.68611,0,0],936:[0,.68611,0,0],937:[0,.68611,0,0],8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8242:[0,.55556,0,0],8407:[0,.72444,.15486,0],8463:[0,.69444,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,0],8472:[.19444,.44444,0,0],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.10889,.39111,0,0],8593:[.19444,.69444,0,0],8594:[-.10889,.39111,0,0],8595:[.19444,.69444,0,0],8596:[-.10889,.39111,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8636:[-.10889,.39111,0,0],8637:[-.10889,.39111,0,0],8640:[-.10889,.39111,0,0],8641:[-.10889,.39111,0,0],8656:[-.10889,.39111,0,0],8657:[.19444,.69444,0,0],8658:[-.10889,.39111,0,0],8659:[.19444,.69444,0,0],8660:[-.10889,.39111,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.06389,0],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68611,0,0],8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:[0,.44444,0,0],8734:[0,.44444,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:[.19444,.69444,0,0],8771:[.00222,.50222,0,0],8776:[.02444,.52444,0,0],8781:[.00222,.50222,0,0],8801:[.00222,.50222,0,0],8804:[.19667,.69667,0,0],8805:[.19667,.69667,0,0],8810:[.08556,.58556,0,0],8811:[.08556,.58556,0,0],8826:[.08556,.58556,0,0],8827:[.08556,.58556,0,0],8834:[.08556,.58556,0,0],8835:[.08556,.58556,0,0],8838:[.19667,.69667,0,0],8839:[.19667,.69667,0,0],8846:[0,.55556,0,0],8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.13333,.63333,0,0],8854:[.13333,.63333,0,0],8855:[.13333,.63333,0,0],8856:[.13333,.63333,0,0],8857:[.13333,.63333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:[.19444,.69444,0,0],9657:[-.02778,.47222,0,0],9661:[.19444,.69444,0,0],9667:[-.02778,.47222,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10815:[0,.68611,0,0],10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0]},"Main-Italic":{33:[0,.69444,.12417,0],34:[0,.69444,.06961,0],35:[.19444,.69444,.06616,0],37:[.05556,.75,.13639,0],38:[0,.69444,.09694,0],39:[0,.69444,.12417,0],40:[.25,.75,.16194,0],41:[.25,.75,.03694,0],42:[0,.75,.14917,0],43:[.05667,.56167,.03694,0],44:[.19444,.10556,0,0],45:[0,.43056,.02826,0],46:[0,.10556,0,0],47:[.25,.75,.16194,0],48:[0,.64444,.13556,0],49:[0,.64444,.13556,0],50:[0,.64444,.13556,0],51:[0,.64444,.13556,0],52:[.19444,.64444,.13556,0],53:[0,.64444,.13556,0],54:[0,.64444,.13556,0],55:[.19444,.64444,.13556,0],56:[0,.64444,.13556,0],57:[0,.64444,.13556,0],58:[0,.43056,.0582,0],59:[.19444,.43056,.0582,0],61:[-.13313,.36687,.06616,0],63:[0,.69444,.1225,0],64:[0,.69444,.09597,0],65:[0,.68333,0,0],66:[0,.68333,.10257,0],67:[0,.68333,.14528,0],68:[0,.68333,.09403,0],69:[0,.68333,.12028,0],70:[0,.68333,.13305,0],71:[0,.68333,.08722,0],72:[0,.68333,.16389,0],73:[0,.68333,.15806,0],74:[0,.68333,.14028,0],75:[0,.68333,.14528,0],76:[0,.68333,0,0],77:[0,.68333,.16389,0],78:[0,.68333,.16389,0],79:[0,.68333,.09403,0],80:[0,.68333,.10257,0],81:[.19444,.68333,.09403,0],82:[0,.68333,.03868,0],83:[0,.68333,.11972,0],84:[0,.68333,.13305,0],85:[0,.68333,.16389,0],86:[0,.68333,.18361,0],87:[0,.68333,.18361,0],88:[0,.68333,.15806,0],89:[0,.68333,.19383,0],90:[0,.68333,.14528,0],91:[.25,.75,.1875,0],93:[.25,.75,.10528,0],94:[0,.69444,.06646,0],95:[.31,.12056,.09208,0],97:[0,.43056,.07671,0],98:[0,.69444,.06312,0],99:[0,.43056,.05653,0],100:[0,.69444,.10333,0],101:[0,.43056,.07514,0],102:[.19444,.69444,.21194,0],103:[.19444,.43056,.08847,0],104:[0,.69444,.07671,0],105:[0,.65536,.1019,0],106:[.19444,.65536,.14467,0],107:[0,.69444,.10764,0],108:[0,.69444,.10333,0],109:[0,.43056,.07671,0],110:[0,.43056,.07671,0],111:[0,.43056,.06312,0],112:[.19444,.43056,.06312,0],113:[.19444,.43056,.08847,0],114:[0,.43056,.10764,0],115:[0,.43056,.08208,0],116:[0,.61508,.09486,0],117:[0,.43056,.07671,0],118:[0,.43056,.10764,0],119:[0,.43056,.10764,0],120:[0,.43056,.12042,0],121:[.19444,.43056,.08847,0],122:[0,.43056,.12292,0],126:[.35,.31786,.11585,0],163:[0,.69444,0,0],305:[0,.43056,0,.02778],567:[.19444,.43056,0,.08334],768:[0,.69444,0,0],769:[0,.69444,.09694,0],770:[0,.69444,.06646,0],771:[0,.66786,.11585,0],772:[0,.56167,.10333,0],774:[0,.69444,.10806,0],775:[0,.66786,.11752,0],776:[0,.66786,.10474,0],778:[0,.69444,0,0],779:[0,.69444,.1225,0],780:[0,.62847,.08295,0],915:[0,.68333,.13305,0],916:[0,.68333,0,0],920:[0,.68333,.09403,0],923:[0,.68333,0,0],926:[0,.68333,.15294,0],928:[0,.68333,.16389,0],931:[0,.68333,.12028,0],933:[0,.68333,.11111,0],934:[0,.68333,.05986,0],936:[0,.68333,.11111,0],937:[0,.68333,.10257,0],8211:[0,.43056,.09208,0],8212:[0,.43056,.09208,0],8216:[0,.69444,.12417,0],8217:[0,.69444,.12417,0],8220:[0,.69444,.1685,0],8221:[0,.69444,.06961,0],8463:[0,.68889,0,0]},"Main-Regular":{32:[0,0,0,0],33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.43056,0,0],59:[.19444,.43056,0,0],60:[.0391,.5391,0,0],61:[-.13313,.36687,0,0],62:[.0391,.5391,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68333,0,0],66:[0,.68333,0,0],67:[0,.68333,0,0],68:[0,.68333,0,0],69:[0,.68333,0,0],70:[0,.68333,0,0],71:[0,.68333,0,0],72:[0,.68333,0,0],73:[0,.68333,0,0],74:[0,.68333,0,0],75:[0,.68333,0,0],76:[0,.68333,0,0],77:[0,.68333,0,0],78:[0,.68333,0,0],79:[0,.68333,0,0],80:[0,.68333,0,0],81:[.19444,.68333,0,0],82:[0,.68333,0,0],83:[0,.68333,0,0],84:[0,.68333,0,0],85:[0,.68333,0,0],86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:[0,.68333,0,0],89:[0,.68333,.025,0],90:[0,.68333,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.12056,.02778,0],96:[0,.69444,0,0],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,0],100:[0,.69444,0,0],101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:[0,.69444,0,0],105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.19444,.43056,0,0],113:[.19444,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.61508,0,0],117:[0,.43056,0,0],118:[0,.43056,.01389,0],119:[0,.43056,.01389,0],120:[0,.43056,0,0],121:[.19444,.43056,.01389,0],122:[0,.43056,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.31786,0,0],160:[0,0,0,0],168:[0,.66786,0,0],172:[0,.43056,0,0],175:[0,.56778,0,0],176:[0,.69444,0,0],177:[.08333,.58333,0,0],180:[0,.69444,0,0],215:[.08333,.58333,0,0],247:[.08333,.58333,0,0],305:[0,.43056,0,0],567:[.19444,.43056,0,0],710:[0,.69444,0,0],711:[0,.62847,0,0],713:[0,.56778,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.66786,0,0],730:[0,.69444,0,0],732:[0,.66786,0,0],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.66786,0,0],772:[0,.56778,0,0],774:[0,.69444,0,0],775:[0,.66786,0,0],776:[0,.66786,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.62847,0,0],824:[.19444,.69444,0,0],915:[0,.68333,0,0],916:[0,.68333,0,0],920:[0,.68333,0,0],923:[0,.68333,0,0],926:[0,.68333,0,0],928:[0,.68333,0,0],931:[0,.68333,0,0],933:[0,.68333,0,0],934:[0,.68333,0,0],936:[0,.68333,0,0],937:[0,.68333,0,0],8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8230:[0,.12,0,0],8242:[0,.55556,0,0],8407:[0,.71444,.15382,0],8463:[0,.68889,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.13313,.36687,0,0],8593:[.19444,.69444,0,0],8594:[-.13313,.36687,0,0],8595:[.19444,.69444,0,0],8596:[-.13313,.36687,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8614:[.011,.511,0,0],8617:[.011,.511,0,0],8618:[.011,.511,0,0],8636:[-.13313,.36687,0,0],8637:[-.13313,.36687,0,0],8640:[-.13313,.36687,0,0],8641:[-.13313,.36687,0,0],8652:[.011,.671,0,0],8656:[-.13313,.36687,0,0],8657:[.19444,.69444,0,0],8658:[-.13313,.36687,0,0],8659:[.19444,.69444,0,0],8660:[-.13313,.36687,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.05556,.08334],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68333,0,0],8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.03472,.46528,0,0],8728:[-.05555,.44445,0,0],8729:[-.05555,.44445,0,0],8730:[.2,.8,0,0],8733:[0,.43056,0,0],8734:[0,.43056,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:[.19444,.69444,0,0],8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8800:[.215,.716,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:[0,.55556,0,0],8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.08333,.58333,0,0],8854:[.08333,.58333,0,0],8855:[.08333,.58333,0,0],8856:[.08333,.58333,0,0],8857:[.08333,.58333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8872:[.249,.75,0,0],8900:[-.05555,.44445,0,0],8901:[-.05555,.44445,0,0],8902:[-.03472,.46528,0,0],8904:[.005,.505,0,0],8942:[.03,.9,0,0],8943:[-.19,.31,0,0],8945:[-.1,.82,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:[.19444,.69444,0,0],9657:[-.03472,.46528,0,0],9661:[.19444,.69444,0,0],9667:[-.03472,.46528,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10222:[.244,.744,0,0],10223:[.244,.744,0,0],10229:[.011,.511,0,0],10230:[.011,.511,0,0],10231:[.011,.511,0,0],10232:[.024,.525,0,0],10233:[.024,.525,0,0],10234:[.024,.525,0,0],10236:[.011,.511,0,0],10815:[0,.68333,0,0],10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0]},"Math-BoldItalic":{47:[.19444,.69444,0,0],65:[0,.68611,0,0],66:[0,.68611,.04835,0],67:[0,.68611,.06979,0],68:[0,.68611,.03194,0],69:[0,.68611,.05451,0],70:[0,.68611,.15972,0],71:[0,.68611,0,0],72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:[0,.68611,0,0],77:[0,.68611,.11424,0],78:[0,.68611,.11424,0],79:[0,.68611,.03194,0],80:[0,.68611,.15972,0],81:[.19444,.68611,0,0],82:[0,.68611,.00421,0],83:[0,.68611,.05382,0],84:[0,.68611,.15972,0],85:[0,.68611,.11424,0],86:[0,.68611,.25555,0],87:[0,.68611,.15972,0],88:[0,.68611,.07778,0],89:[0,.68611,.25555,0],90:[0,.68611,.06979,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:[0,.69444,0,0],105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:[0,.44444,0,0],121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],915:[0,.68611,.15972,0],916:[0,.68611,0,0],920:[0,.68611,.03194,0],923:[0,.68611,0,0],926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:[0,.68611,0,0],936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:[0,.44444,0,0],946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:[0,.44444,0,0],950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:[0,.44444,0,0],954:[0,.44444,0,0],955:[0,.69444,0,0],956:[.19444,.44444,0,0],957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:[0,.44444,0,0],960:[0,.44444,.03704,0],961:[.19444,.44444,0,0],962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:[.19444,.44444,0,0],967:[.19444,.44444,0,0],968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:[0,.69444,0,0],981:[.19444,.69444,0,0],982:[0,.44444,.03194,0],1009:[.19444,.44444,0,0],1013:[0,.44444,0,0]},"Math-Italic":{47:[.19444,.69444,0,0],65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:[0,.69444,0,0],105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:[0,.69444,0,0],956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556]},"Math-Regular":{65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:[0,.69444,0,0],105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:[0,.69444,0,0],956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556]},"SansSerif-Regular":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:[0,.44444,0,0],46:[0,.08333,0,0],47:[.25,.75,0,0],48:[0,.65556,0,0],49:[0,.65556,0,0],50:[0,.65556,0,0],51:[0,.65556,0,0],52:[0,.65556,0,0],53:[0,.65556,0,0],54:[0,.65556,0,0],55:[0,.65556,0,0],56:[0,.65556,0,0],57:[0,.65556,0,0],58:[0,.44444,0,0],59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.125,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:[0,.69444,0,0],89:[0,.69444,.025,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.09444,.02778,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:[0,.69444,0,0],105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,.01389,0],115:[0,.44444,0,0],116:[0,.57143,0,0],117:[0,.44444,0,0],118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:[0,.44444,0,0],121:[.19444,.44444,.01389,0],122:[0,.44444,0,0],126:[.35,.32659,0,0],305:[0,.44444,0,0],567:[.19444,.44444,0,0],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.67659,0,0],772:[0,.60889,0,0],774:[0,.69444,0,0],775:[0,.67937,0,0],776:[0,.67937,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.63194,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"Script-Regular":{65:[0,.7,.22925,0],66:[0,.7,.04087,0],67:[0,.7,.1689,0],68:[0,.7,.09371,0],69:[0,.7,.18583,0],70:[0,.7,.13634,0],71:[0,.7,.17322,0],72:[0,.7,.29694,0],73:[0,.7,.19189,0],74:[.27778,.7,.19189,0],75:[0,.7,.31259,0],76:[0,.7,.19189,0],77:[0,.7,.15981,0],78:[0,.7,.3525,0],79:[0,.7,.08078,0],80:[0,.7,.08078,0],81:[0,.7,.03305,0],82:[0,.7,.06259,0],83:[0,.7,.19189,0],84:[0,.7,.29087,0],85:[0,.7,.25815,0],86:[0,.7,.27523,0],87:[0,.7,.27523,0],88:[0,.7,.26006,0],89:[0,.7,.2939,0],90:[0,.7,.24037,0]},"Size1-Regular":{40:[.35001,.85,0,0],41:[.35001,.85,0,0],47:[.35001,.85,0,0],91:[.35001,.85,0,0],92:[.35001,.85,0,0],93:[.35001,.85,0,0],123:[.35001,.85,0,0],125:[.35001,.85,0,0],710:[0,.72222,0,0],732:[0,.72222,0,0],770:[0,.72222,0,0],771:[0,.72222,0,0],8214:[-99e-5,.601,0,0],8593:[1e-5,.6,0,0],8595:[1e-5,.6,0,0],8657:[1e-5,.6,0,0],8659:[1e-5,.6,0,0],8719:[.25001,.75,0,0],8720:[.25001,.75,0,0],8721:[.25001,.75,0,0],8730:[.35001,.85,0,0],8739:[-.00599,.606,0,0],8741:[-.00599,.606,0,0],8747:[.30612,.805,.19445,0],8748:[.306,.805,.19445,0],8749:[.306,.805,.19445,0],8750:[.30612,.805,.19445,0],8896:[.25001,.75,0,0],8897:[.25001,.75,0,0],8898:[.25001,.75,0,0],8899:[.25001,.75,0,0],8968:[.35001,.85,0,0],8969:[.35001,.85,0,0],8970:[.35001,.85,0,0],8971:[.35001,.85,0,0],9168:[-99e-5,.601,0,0],10216:[.35001,.85,0,0],10217:[.35001,.85,0,0],10752:[.25001,.75,0,0],10753:[.25001,.75,0,0],10754:[.25001,.75,0,0],10756:[.25001,.75,0,0],10758:[.25001,.75,0,0]},"Size2-Regular":{40:[.65002,1.15,0,0],41:[.65002,1.15,0,0],47:[.65002,1.15,0,0],91:[.65002,1.15,0,0],92:[.65002,1.15,0,0],93:[.65002,1.15,0,0],123:[.65002,1.15,0,0],125:[.65002,1.15,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8719:[.55001,1.05,0,0],8720:[.55001,1.05,0,0],8721:[.55001,1.05,0,0],8730:[.65002,1.15,0,0],8747:[.86225,1.36,.44445,0],8748:[.862,1.36,.44445,0],8749:[.862,1.36,.44445,0],8750:[.86225,1.36,.44445,0],8896:[.55001,1.05,0,0],8897:[.55001,1.05,0,0],8898:[.55001,1.05,0,0],8899:[.55001,1.05,0,0],8968:[.65002,1.15,0,0],8969:[.65002,1.15,0,0],8970:[.65002,1.15,0,0],8971:[.65002,1.15,0,0],10216:[.65002,1.15,0,0],10217:[.65002,1.15,0,0],10752:[.55001,1.05,0,0],10753:[.55001,1.05,0,0],10754:[.55001,1.05,0,0],10756:[.55001,1.05,0,0],10758:[.55001,1.05,0,0]},"Size3-Regular":{40:[.95003,1.45,0,0],41:[.95003,1.45,0,0],47:[.95003,1.45,0,0],91:[.95003,1.45,0,0],92:[.95003,1.45,0,0],93:[.95003,1.45,0,0],123:[.95003,1.45,0,0],125:[.95003,1.45,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8730:[.95003,1.45,0,0],8968:[.95003,1.45,0,0],8969:[.95003,1.45,0,0],8970:[.95003,1.45,0,0],8971:[.95003,1.45,0,0],10216:[.95003,1.45,0,0],10217:[.95003,1.45,0,0]},"Size4-Regular":{40:[1.25003,1.75,0,0],41:[1.25003,1.75,0,0],47:[1.25003,1.75,0,0],91:[1.25003,1.75,0,0],92:[1.25003,1.75,0,0],93:[1.25003,1.75,0,0],123:[1.25003,1.75,0,0],125:[1.25003,1.75,0,0],710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:[1.25003,1.75,0,0],8968:[1.25003,1.75,0,0],8969:[1.25003,1.75,0,0],8970:[1.25003,1.75,0,0],8971:[1.25003,1.75,0,0],9115:[.64502,1.155,0,0],9116:[1e-5,.6,0,0],9117:[.64502,1.155,0,0],9118:[.64502,1.155,0,0],9119:[1e-5,.6,0,0],9120:[.64502,1.155,0,0],9121:[.64502,1.155,0,0],9122:[-99e-5,.601,0,0],9123:[.64502,1.155,0,0],9124:[.64502,1.155,0,0],9125:[-99e-5,.601,0,0],9126:[.64502,1.155,0,0],9127:[1e-5,.9,0,0],9128:[.65002,1.15,0,0],9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:[.65002,1.15,0,0],9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:[1.25003,1.75,0,0],10217:[1.25003,1.75,0,0],57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{33:[0,.61111,0,0],34:[0,.61111,0,0],35:[0,.61111,0,0],36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:[0,.61111,0,0],39:[0,.61111,0,0],40:[.08333,.69444,0,0],41:[.08333,.69444,0,0],42:[0,.52083,0,0],43:[-.08056,.53055,0,0],44:[.13889,.125,0,0],45:[-.08056,.53055,0,0],46:[0,.125,0,0],47:[.08333,.69444,0,0],48:[0,.61111,0,0],49:[0,.61111,0,0],50:[0,.61111,0,0],51:[0,.61111,0,0],52:[0,.61111,0,0],53:[0,.61111,0,0],54:[0,.61111,0,0],55:[0,.61111,0,0],56:[0,.61111,0,0],57:[0,.61111,0,0],58:[0,.43056,0,0],59:[.13889,.43056,0,0],60:[-.05556,.55556,0,0],61:[-.19549,.41562,0,0],62:[-.05556,.55556,0,0],63:[0,.61111,0,0],64:[0,.61111,0,0],65:[0,.61111,0,0],66:[0,.61111,0,0],67:[0,.61111,0,0],68:[0,.61111,0,0],69:[0,.61111,0,0],70:[0,.61111,0,0],71:[0,.61111,0,0],72:[0,.61111,0,0],73:[0,.61111,0,0],74:[0,.61111,0,0],75:[0,.61111,0,0],76:[0,.61111,0,0],77:[0,.61111,0,0],78:[0,.61111,0,0],79:[0,.61111,0,0],80:[0,.61111,0,0],81:[.13889,.61111,0,0],82:[0,.61111,0,0],83:[0,.61111,0,0],84:[0,.61111,0,0],85:[0,.61111,0,0],86:[0,.61111,0,0],87:[0,.61111,0,0],88:[0,.61111,0,0],89:[0,.61111,0,0],90:[0,.61111,0,0],91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:[0,.61111,0,0],95:[.09514,0,0,0],96:[0,.61111,0,0],97:[0,.43056,0,0],98:[0,.61111,0,0],99:[0,.43056,0,0],100:[0,.61111,0,0],101:[0,.43056,0,0],102:[0,.61111,0,0],103:[.22222,.43056,0,0],104:[0,.61111,0,0],105:[0,.61111,0,0],106:[.22222,.61111,0,0],107:[0,.61111,0,0],108:[0,.61111,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.22222,.43056,0,0],113:[.22222,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.55358,0,0],117:[0,.43056,0,0],118:[0,.43056,0,0],119:[0,.43056,0,0],120:[0,.43056,0,0],121:[.22222,.43056,0,0],122:[0,.43056,0,0],123:[.08333,.69444,0,0],124:[.08333,.69444,0,0],125:[.08333,.69444,0,0],126:[0,.61111,0,0],127:[0,.61111,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],768:[0,.61111,0,0],769:[0,.61111,0,0],770:[0,.61111,0,0],771:[0,.61111,0,0],772:[0,.56555,0,0],774:[0,.61111,0,0],776:[0,.61111,0,0],778:[0,.61111,0,0],780:[0,.56597,0,0],915:[0,.61111,0,0],916:[0,.61111,0,0],920:[0,.61111,0,0],923:[0,.61111,0,0],926:[0,.61111,0,0],928:[0,.61111,0,0],931:[0,.61111,0,0],933:[0,.61111,0,0],934:[0,.61111,0,0],936:[0,.61111,0,0],937:[0,.61111,0,0],2018:[0,.61111,0,0],2019:[0,.61111,0,0],8242:[0,.61111,0,0]}};const v=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,w={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25]},S={defaultRuleThickness:.04,bigOpSpacing1:.111,bigOpSpacing2:.166,bigOpSpacing3:.2,bigOpSpacing4:.6,bigOpSpacing5:.1,ptPerEm:10,pxPerEm:40/3,doubleRuleSep:.2,arraycolsep:.5,baselineskip:1.2,arrayrulewidth:.04,fboxsep:.3,fboxrule:.04},A={" ":" ","​":" ","Å":"A","Ç":"C","Ð":"D","Þ":"o","å":"a","ç":"c","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function C(t,e,i){if("string"==typeof t){const i=t.match(/([-+]?[0-9.]*)\s*([a-zA-Z]+)/);i?(t=parseFloat(i[1]),e=i[2].toLowerCase()):t=parseFloat(t)}const s={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:.75,em:S.ptPerEm,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[e]||1;if(isFinite(i)){const e=Math.pow(10,i);return Math.round(t/S.ptPerEm*s*e)/e}return t/S.ptPerEm*s}var M={toEm:C,toPx:function(t,e){return C(t,e)*(4/3)*S.ptPerEm},METRICS:S,SIGMAS:w,getCharacterMetrics:function(t,e){const i={cal:"Caligraphic-Regular",ams:"AMS-Regular",frak:"Fraktur-Regular",bb:"AMS-Regular",scr:"Script-Regular",cmr:"Main-Regular",cmtt:"Typewriter-Regular",cmss:"SansSerif-Regular"}[e]||e;let s=t.charCodeAt(0);t[0]in A?s=A[t[0]].charCodeAt(0):v.test(t[0])&&(s=77);const a=k[i][s];return a?a?{depth:a[0],height:a[1],italic:a[2],skew:a[3]}:null:{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}};const _=[{},{},{}];let T;for(const t in w)if(Object.prototype.hasOwnProperty.call(w,t))for(T=0;T<3;T++)_[T][t]=w[t][T];for(T=0;T<3;T++)_[T].emPerEx=w.xHeight[T]/w.quad[T];class L{constructor(t,e,i,s){this.id=t,this.size=e,this.cramped=s,this.sizeMultiplier=i,this.metrics=_[e>0?e-1:0]}sup(){return F[E[this.id]]}sub(){return F[q[this.id]]}fracNum(){return F[I[this.id]]}fracDen(){return F[P[this.id]]}cramp(){return F[B[this.id]]}cls(){return D[this.size]}adjustTo(t){let e=z[this.size][t.size];return e.length>0&&(e=" "+e),e}isTight(){return this.size>=2}}const F=[new L(0,0,1,!1),new L(1,0,1,!0),new L(2,1,1,!1),new L(3,1,1,!0),new L(4,2,.7,!1),new L(5,2,.7,!0),new L(6,3,.5,!1),new L(7,3,.5,!0)],D=["displaystyle textstyle","textstyle","scriptstyle","scriptscriptstyle"],z=[["","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-textstyle displaystyle textstyle","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-scriptstyle textstyle displaystyle","reset-scriptstyle textstyle","","reset-scriptstyle scriptscriptstyle"],["reset-scriptscriptstyle textstyle displaystyle","reset-scriptscriptstyle textstyle","reset-scriptscriptstyle scriptstyle",""]],E=[4,5,4,5,6,7,6,7],q=[5,5,5,5,7,7,7,7],I=[2,3,4,5,6,7,6,7],P=[3,3,5,5,7,7,7,7],B=[1,1,3,3,5,5,7,7];var O={DISPLAY:F[0],TEXT:F[2],SCRIPT:F[4],SCRIPTSCRIPT:F[6],toMathstyle:function(t){return t?"object"==typeof t?t:{displaystyle:F[0],textstyle:F[2],scriptstyle:F[4],scriptscriptstyle:F[6]}[t]:t}};class R{constructor(t){this.macros=t.macros||{},this.generateID=!!t.generateID&&t.generateID,this.mathstyle=O.toMathstyle(t.mathstyle||"displaystyle"),this.size=t.size||"size5",this.parentMathstyle=t.parentMathstyle||this.mathstyle,this.parentSize=t.parentSize||this.size,this.opacity=t.opacity}clone(t){const e=new R(this);return e.parentMathstyle=this.mathstyle,e.parentSize=this.size,e.macros=this.macros,t&&("auto"!==t.mathstyle&&t.mathstyle||delete t.mathstyle,Object.assign(e,t),"string"==typeof t.mathstyle&&(e.mathstyle=O.toMathstyle(t.mathstyle))),e}setMathstyle(t){t&&"auto"!==t&&(this.mathstyle=O.toMathstyle(t))}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sup()})}}var K={Context:R};function N(t){let e="";if("number"==typeof t)e+=Math.floor(100*t)/100;else if("string"==typeof t)e+=t;else if(Array.isArray(t))for(const i of t)e+=N(i);else t&&(e+=t.toString());return e}class ${constructor(t,e){this.classes=e||"",Array.isArray(t)?this.children=[].concat.apply([],t):"string"==typeof t?this.body=t:t&&"object"==typeof t&&(this.children=[t]),this.style=null,this.updateDimensions()}updateDimensions(){let t=0,e=0,i=1;this.children&&this.children.forEach(s=>{s.height>t&&(t=s.height),s.depth>e&&(e=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}),this.height=t,this.depth=e,this.maxFontSize=i}selected(t){t&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=" "),this.classes+="ML__selected"),!t&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace("ML__selected","")),this.children&&this.children.forEach(e=>e.selected(t))}applyStyle(t){if(!t)return;if(t.color&&("none"!==t.color?this.setStyle("color",t.color):this.setStyle("color","")),t.backgroundColor&&("none"!==t.backgroundColor?this.setStyle("background-color",t.backgroundColor):this.setStyle("background-color","")),t.cssClass&&(this.classes+=" "+t.cssClass),!this.body)return;let e=t.fontFamily;"math"===e&&"n"===t.fontShape&&(e="cmr");let i="Main-Regular";if(e&&(i=function(t,e){if("string"!=typeof t||t.length>1||"​"===t)return Q[e];if("bb"===e||"scr"===e){if(!/^[A-Z ]$/.test(t))return null}else if("cal"===e){if(!/^[0-9A-Z ]$/.test(t))return null}else if("frak"===e){if(!/^[0-9A-Za-z ]$|^[!"#$%&'()*+,\-.\/:;=?[]^’‘]$/.test(t))return null}else if(("cmtt"===e||"cmss"===e)&&!/^[0-9A-Za-z ]$|^[!"&'()*+,\-.\/:;=?@[]^_~\u0131\u0237\u0393\u0394\u0398\u039b\u039e\u03A0\u03A3\u03A5\u03A8\u03a9’‘]$/.test(t))return null;return Q[e]}(this.body,e)),t.fontShape&&(this.classes+=" "+({it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape]||"")),t.fontSeries){const e=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);e&&(this.classes+=" "+({ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[e[1]||""]||""),this.classes+=" "+({uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[e[2]||""]||""))}if(tt[e]?this.classes+=" "+tt[e]:e&&this.setStyle("font-family",e),this.body&&this.body.length>0&&i){this.height=0,this.depth=0,this.maxFontSize={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49}[t.fontSize]||1,this.skew=0,this.italic=0;for(let t=0;t<this.body.length;t++){const e=M.getCharacterMetrics(this.body.charAt(t),i);e&&(this.height=Math.max(this.height,e.height),this.depth=Math.max(this.depth,e.depth),this.skew=e.skew,this.italic=e.italic)}}}setStyle(t,...e){const i=N(e);i.length>0&&(this.style||(this.style={}),this.style[t]=i)}setTop(t){t&&0!==t&&(this.style||(this.style={}),this.style.top=N(t)+"em",this.height-=t,this.depth+=t)}setLeft(t){t&&0!==t&&(this.style||(this.style={}),this.style["margin-left"]=N(t)+"em")}setRight(t){t&&0!==t&&(this.style||(this.style={}),this.style["margin-right"]=N(t)+"em")}setWidth(t){t&&0!==t&&(this.style||(this.style={}),this.style.width=N(t)+"em")}addMarginRight(t){if(t&&0!==t){if(!this.style&&!/qquad|quad|enspace|thickspace|mediumspace|thinspace|negativethinspace/.test(this.classes)){const e={2:"qquad",1:"quad",".5":"enspace",.277778:"thickspace",.222222:"mediumspace",.166667:"thinspace","-0.166667":"negativethinspace"}[t.toString()];if(e)return void(this.classes+=" rspace "+e)}this.style||(this.style={});const e=parseFloat(this.style["margin-right"]||"0");this.style["margin-right"]=N(e+t)+"em"}}toMarkup(t,e){t=t||0,e=e||1;let i="",s=this.body||"";if(this.children){let t="none";for(const i of this.children){let a=0;if(t){let s=i.type;s&&("textord"===s&&(s="mord"),"first"===s&&(s="none"),a=i.isTight?U[t+"+"+s]||0:W[t+"+"+s]||0,a=Math.floor(e*a))}s+=i.toMarkup(a,e),t=j(i)}}if("​"!==s&&s||this.classes&&"ML__selected"!==this.classes){if(i="<span",this.cssId&&(i+=' id="'+this.cssId+'" '),this.svgOverlay&&(this.setStyle("position","relative"),this.setStyle("height",this.height+this.depth,"em"),this.setStyle("vertical-align",-this.depth,"em")),this.attributes)for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(i+=" "+t+'="'+this.attributes[t]+'"');const e=this.classes.split(" ");this.type&&(/command|placeholder|error/.test(this.type)&&e.push({command:"ML__command",placeholder:"ML__placeholder",error:"ML__error"}[this.type]),this.caret&&"command"===this.type&&e.push("ML__command-caret"));let a="";if((a=e.length>1?e.filter(function(t,e,i){return t.length>0&&i.indexOf(t)===e}).join(" "):e[0]).length>0&&(i+=' class="'+a+'"'),t&&(this.style&&this.style["margin-left"]?this.style["margin-left"]=N(parseFloat(this.style["margin-left"])+t/18)+"em":t<0&&V[-t]?s=V[-t]+s:H[t]?s=H[t]+s:(this.style||(this.style={}),this.style["margin-left"]=N(t/18)+"em")),this.style){let t="";const e=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&("background-color"===i&&e||(t+=i+":"+this.style[i]+";"));t.length>0&&(i+=' style="'+t+'"')}i+=">",this.svgOverlay?(i+='<span style="',i+="display: inline-block;",i+="height:"+(this.height+this.depth)+"em;",i+="vertical-align:"+this.depth+"em;",i+='">',i+=s,i+="</span>",i+="<svg ",i+='style="position:absolute;',i+="overflow:overlay;",i+="height:"+(this.height+this.depth)+"em;",i+="transform:translateY(-"+Math.round(M.toPx(this.depth,"em")+M.toPx(this.style.padding))+"px);",this.style&&this.style.padding?(i+="top:"+this.style.padding+";",i+="left:"+this.style.padding+";",i+="width:calc(100% - 2 * "+this.style.padding+" );"):(i+="top:0;",i+="left:0;",i+="width:100%;"),i+="z-index:2;",i+='"',this.svgStyle&&(i+=' style="'+this.svgStyle+'"'),i+=">",i+=this.svgOverlay,i+="</svg>"):i+=s,i+="</span>"}else i="";return this.caret&&"command"!==this.type&&("text"===this.caret?i+='<span class="ML__text-caret"></span>':i+='<span class="ML__caret"></span>'),i}tryCoalesceWith(t){if(this.tag!==t.tag)return!1;if(this.type!==t.type)return!1;if("error"===this.type||"placeholder"===this.type||"command"===this.type)return!1;const e=this.children&&this.children.length>0,i=t.children&&t.children.length>0;if(e||i)return!1;if((this.style?this.style.length:0)!==(t.style?t.style.length:0))return!1;const s=this.classes.trim().replace(/\s+/g," ").split(" "),a=t.classes.trim().replace(/\s+/g," ").split(" ");if(s.length!==a.length)return!1;s.sort(),a.sort();for(let t=0;t<s.length;t++){if("vertical-separator"===s[t])return!1;if(s[t]!==a[t])return!1}if(this.style&&t.style)for(const e in this.style)if(Object.prototype.hasOwnProperty.call(this.style,e)&&Object.prototype.hasOwnProperty.call(t.style,e)&&this.style[e]!==t.style[e])return!1;return this.body+=t.body,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}}const W={"mord+mop":3,"mord+mbin":4,"mord+mrel":5,"mord+minner":3,"mop+mord":3,"mop+mop":3,"mop+mbin":5,"mop+minner":3,"mbin+mord":4,"mbin+mop":4,"mbin+mopen":4,"mbin+minner":4,"mrel+mord":5,"mrel+mop":5,"mrel+mopen":5,"mrel+minner":5,"mclose+mop":3,"mclose+mbin":4,"mclose+mrel":5,"mclose+minner":3,"mpunct+mord":3,"mpunct+mop":3,"mpunct+mbin":4,"mpunct+mrel":5,"mpunct+mopen":3,"mpunct+mpunct":3,"mpunct+minner":3},H=["​"," ","  "," "," ","  "," ","",""," "],V=[""," ⁣",""," ⁣"," ⁣"," ⁣"],U={"mord+mop":3,"mop+mord":3,"mop+mop":3,"mclose+mop":3,"minner+mop":3};function j(t){const e=t.type;return"first"===e?"none":"textord"===e?"mord":e}function G(t){return t?Array.isArray(t)?t.reduce((t,e)=>Math.max(t,e.height),0):t.height:0}function Z(t){return t?Array.isArray(t)?t.reduce((t,e)=>Math.max(t,e.depth),0):t.depth:0}function X(t,e){if(Array.isArray(t)){const i=[];for(const e of t)e&&i.push(e);if(1===i.length)return X(i[0],e)}return new $(t,e)}function J(t,e,i){const s=X(e,i);return s.type=t,s}function Y(t,e){if(!e||0===e.length){if(t instanceof $)return t;if(Array.isArray(t)&&1===t.length)return t[0]}const i=new $(t,e);let s=1;return s=t instanceof $?t.maxFontSize:t.reduce((t,e)=>Math.max(t,e.maxFontSize),0),i.height*=s,i.depth*=s,i}const Q={ams:"AMS-Regular",bb:"AMS-Regular",cal:"Caligraphic-Regular",frak:"Fraktur-Regular",scr:"Script-Regular",cmr:"Main-Regular",cmss:"SansSerif-Regular",cmtt:"Typewriter-Regular",math:"Math-Regular",mainit:"Main-Italic"},tt={ams:"ML__ams",bb:"ML__bb",cal:"ML__cal",frak:"ML__frak",scr:"ML__script",cmr:"ML__mathrm",cmss:"ML__sans",cmtt:"ML__tt",math:"ML__mathit",mainit:"ML__mainit"};var et={coalesce:function t(e){if(!e||0===e.length)return[];e[0].children=t(e[0].children);const i=[e[0]];for(let s=1;s<e.length;s++)i[i.length-1].tryCoalesceWith(e[s])||(e[s].children=t(e[s].children),i.push(e[s]));return i},makeSpan:X,makeOp:function(t,e){return J("mop",t,e)},makeOrd:function(t,e){return J("mord",t,e)},makeRel:function(t,e){return J("mrel",t,e)},makeClose:function(t,e){return J("mclose",t,e)},makeOpen:function(t,e){return J("mopen",t,e)},makeInner:function(t,e){return J("minner",t,e)},makePunct:function(t,e){return J("mpunct",t,e)},makeSpanOfType:J,makeSymbol:function(t,e,i){const s=new $(e,i),a=M.getCharacterMetrics(e,t);return s.height=a.height,s.depth=a.depth,s.skew=a.skew,s.italic=a.italic,s.setRight(s.italic),s},makeVlist:function(t,e,i,s){let a=0,o=0;i=i||"shift",s=s||0;for(let t=0;t<e.length;t++)Array.isArray(e[t])&&(1===e[t].length?e[t]=e[t][0]:e[t]=X(e[t]));if("shift"===i)a=-e[0].depth-s;else if("bottom"===i)a=-s;else if("top"===i){let t=s;for(const i of e)t-=i instanceof $?i.height+i.depth:i;a=t}else if("individualShift"===i){const t=e;e=[t[0]],o=a=-t[1]-t[0].depth;for(let i=2;i<t.length;i+=2){const s=-t[i+1]-o-t[i].depth;o+=s;const a=s-(t[i-2].height+t[i-2].depth);e.push(a),e.push(t[i])}}let n=1;for(const t of e)t instanceof $&&(n=Math.max(n,t.maxFontSize));const r=function(t,e){const i=n?n/t.mathstyle.sizeMultiplier:0,s=new $("​");return 1!==i&&(s.setStyle("font-size",i,i>0?"em":""),s.attributes={"aria-hidden":!0}),"size5"!==t.size?new $(s,"fontsize-ensurer reset-"+t.size+" size5"):0!==i?s:null}(t),l=[];o=a;for(const t of e)if("number"==typeof t)o+=t;else{const e=X([r,t]);e.setTop(-t.depth-o),l.push(e),o+=t.height+t.depth}const c=X(l,"vlist");return c.depth=Math.max(a,Z(c)||0),c.height=Math.max(-o,G(c)||0),c},makeHlist:Y,makeStyleWrap:function(t,e,i,s,a){a=a||"";const o=Y(e,(a+=" style-wrap ")+i.adjustTo(s));o.type=t;const n=s.sizeMultiplier/i.sizeMultiplier;return o.height*=n,o.depth*=n,o.maxFontSize=s.sizeMultiplier,o},makeSVG:function(t,e,i){return t.svgOverlay=e,t.svgStyle=i,t},height:G,depth:Z,skew:function(t){if(!t)return 0;if(Array.isArray(t)){let e=0;for(const i of t)e+=i.skew||0;return e}return t.skew},italic:function(t){return t?Array.isArray(t)?t[t.length-1].italic:t.italic:0}};let it="";const st={},at={},ot={},nt="CRYPTIC",rt="COMMON",lt="SUPERCOMMON",ct={CRYPTIC:0,ARCANE:200,VERY_RARE:600,RARE:1200,UNCOMMON:2e3,COMMON:3e3,SUPERCOMMON:4e3};function ht(t,...e){const i="string"==typeof t?ct[t]:t;for(const t of e)st[t]&&(st[t].frequency=i),at[t]&&(at[t]=Object.assign({},at[t]),at[t].frequency=i)}function dt(t,e,i,s,a){e&&/^(ams|cmr|bb|cal|frak|scr)$/.test(e),"string"==typeof a&&(a=ct[a]),st[t]={type:i===kt?vt:i,baseFontFamily:e,value:s,category:it,frequency:a}}function pt(t,e){for(let i=t;i<=e;i++){const t=String.fromCodePoint(i);dt(t,"","mord",t)}}const mt={8739:"|",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",8243:"\\doubleprime",8736:"\\angle",8450:"\\C",8469:"\\N",8473:"\\P",8474:"\\Q",8477:"\\R",8484:"\\Z"};function ut(t,e){const i=String.fromCodePoint(e);if("math"===t&&mt[i])return mt[i];if(e>32&&e<127)return i;let s="";if("math"===t){for(const t in st)if(Object.prototype.hasOwnProperty.call(st,t)&&st[t].value===i){s=t;break}}else for(const t in qt)if(Object.prototype.hasOwnProperty.call(qt,t)&&qt[t]===i){s=t;break}return s||i}const ft={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},gt=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function yt(t){let e=t;if("string"==typeof t&&(e=t.codePointAt(0)),(e<119808||e>120831)&&(e<8448||e>8527))return{char:t};for(const t in ft)if(Object.prototype.hasOwnProperty.call(ft,t)&&ft[t]===e){e=t;break}for(let t=0;t<gt.length;t++)if(e>=gt[t].start&&e<gt[t].start+gt[t].len)return{char:String.fromCodePoint(e-gt[t].start+gt[t].offset),variant:gt[t].variant,style:gt[t].style};return{char:t}}function bt(t,e){if("text"===t)return String.fromCodePoint(e);let i;if(mt[e])return mt[e];const s=yt(e);return s.style||s.variant?(i=s.char,s.variant&&(i="\\"+s.variant+"{"+i+"}"),"bold"===s.style?i="\\mathbf{"+i+"}":"italic"===s.style?i="\\mathit{"+i+"}":"bolditalic"===s.style&&(i="\\mathbf{\\mathit{"+i+"}}"),"\\mathord{"+i+"}"):ut(t,e)}const xt="ams",kt="mord",vt="mord",wt="mbin",St="mrel",At="mopen",Ct="mclose",Mt="spacing";function _t(t,e){let i=t.match(/=(.+)/),s="{}",a="auto",o=null;return i&&(s=i[1]),(i=t.match(/:([^=]+)/))&&(a=i[1].trim()),(i=t.match(/^([^:=]+)/))&&(o=i[1].trim()),{optional:e,type:a,defaultValue:s,placeholder:o}}function Tt(t){if(!t||0===t.length)return[];let e=[],i=t.split("]");if("["===i[0].charAt(0)){e.push(_t(i[0].slice(1),!0));for(let t=1;t<=i.length;t++)e=e.concat(Tt(i[t]))}else if("{"===(i=t.split("}"))[0].charAt(0)){e.push(_t(i[0].slice(1),!1));for(let t=1;t<=i.length;t++)e=e.concat(Tt(i[t]))}return e}function Lt(t){return t.map(t=>t.body).join("")}function Ft(t,e,i,s){"string"==typeof t&&(t=[t]),i||(i={});const a=Tt(e),o={category:it,params:a,parser:s,mathstyle:"displaystyle",tabular:i.tabular||!0,colFormat:i.colFormat||[]};for(const e of t)ot[e]=o}function Dt(t,e,i,s){"string"==typeof t&&(t=[t]),i||(i={});const a={category:it,baseFontFamily:i.fontFamily,params:Tt(e),allowedInText:!!i.allowedInText,infix:!!i.infix,parse:s};for(const e of t)at[e]=a}it="Environments",Ft("math","",{frequency:0},function(){return{mathstyle:"textstyle"}}),Ft("displaymath","",{frequency:8},function(){return{mathstyle:"displaystyle"}}),Ft("array","{columns:colspec}",{frequency:rt},function(t,e){return{colFormat:e[0],mathstyle:"textstyle"}}),Ft("eqnarray","",{},function(){return{}}),Ft("equation","",{},function(){return{colFormat:[{align:"c"}]}}),Ft("subequations","",{},function(){return{colFormat:[{align:"c"}]}}),Ft("multline","",{},function(){return{firstRowFormat:[{align:"l"}],colFormat:[{align:"c"}],lastRowFormat:[{align:"r"}]}}),Ft(["align","aligned"],"",{},function(t,e,i){let s=0;for(const t of i)s=Math.max(s,t.length);const a=[{gap:0},{align:"r"},{gap:0},{align:"l"}];let o=2;for(;o<s;)a.push({gap:1}),a.push({align:"r"}),a.push({gap:0}),a.push({align:"l"}),o+=2;return a.push({gap:0}),{colFormat:a,jot:.3}}),Ft("split","",{},function(){return{}}),Ft(["gather","gathered"],"",{},function(){return{colFormat:[{gap:.25},{align:"c"},{gap:0}],jot:.3}}),Ft(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","smallmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*","smallmatrix*"],"[columns:colspec]",{},function(t,e){const i={mathstyle:"textstyle"};switch(t){case"pmatrix":case"pmatrix*":i.lFence="(",i.rFence=")";break;case"bmatrix":case"bmatrix*":i.lFence="[",i.rFence="]";break;case"Bmatrix":case"Bmatrix*":i.lFence="\\lbrace",i.rFence="\\rbrace";break;case"vmatrix":case"vmatrix*":i.lFence="\\vert",i.rFence="\\vert";break;case"Vmatrix":case"Vmatrix*":i.lFence="\\Vert",i.rFence="\\Vert";break;case"smallmatrix":case"smallmatrix*":i.mathstyle="scriptstyle";break;case"matrix":case"matrix*":i.lFence=".",i.rFence="."}return i.colFormat=e[0]||[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],i}),Ft("cases","",{},function(){return{arraystretch:1.2,lFence:"\\lbrace",rFence:".",colFormat:[{align:"l"},{gap:1},{align:"l"}]}}),Ft("theorem","",{},function(){return{}}),Ft("center","",{},function(){return{colFormat:[{align:"c"}]}}),it="",function(t){for(let t=0;t<"0123456789/@.".length;t++){const e="0123456789/@.".charAt(t);dt(e,"",vt,e)}}(),pt(65,90),pt(97,122),it="Trigonometry",Dt(["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],"",null,function(t){return{type:"mop",limits:"nolimits",symbol:!1,isFunction:!0,body:t.slice(1),baseFontFamily:"cmr"}}),ht(lt,"\\cos","\\sin","\\tan"),ht("UNCOMMON","\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arcsec","\\arccsc"),ht("UNCOMMON","\\arsinh","\\arccosh","\\arctanh","\\arcsech","\\arccsch"),ht("UNCOMMON","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\lg","\\lb","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th"),it="Functions",Dt(["\\deg","\\dim","\\exp","\\hom","\\ker","\\lb","\\lg","\\ln","\\log"],"",null,function(t){return{type:"mop",limits:"nolimits",symbol:!1,isFunction:!0,body:t.slice(1),baseFontFamily:"cmr"}}),ht(lt,"\\ln","\\log","\\exp"),ht(292,"\\hom"),ht(rt,"\\dim"),ht(rt,"\\ker","\\deg"),Dt(["\\lim","\\mod"],"",null,function(t){return{type:"mop",limits:"limits",symbol:!1,body:t.slice(1),baseFontFamily:"cmr"}}),Dt(["\\det","\\max","\\min"],"",null,function(t){return{type:"mop",limits:"limits",symbol:!1,isFunction:!0,body:t.slice(1),baseFontFamily:"cmr"}}),ht(lt,"\\lim"),ht(rt,"\\det"),ht(rt,"\\mod"),ht(rt,"\\min"),ht(rt,"\\max"),it="Decoration",Dt("\\rule","[raise:dimen]{width:dimen}{thickness:dimen}",null,function(t,e){return{type:"rule",shift:e[0],width:e[1],height:e[2]}}),Dt("\\color","{:color}",{allowedInText:!0},(t,e)=>({color:e[0]})),Dt("\\textcolor","{:color}{content:auto*}",{allowedInText:!0},(t,e)=>({color:e[0]})),ht(3,"\\textcolor"),Dt("\\overline","{:auto}",null,function(t,e){return{type:"line",position:"overline",skipBoundary:!0,body:e[0]}}),ht(rt,"\\overline"),Dt("\\underline","{:auto}",null,function(t,e){return{type:"line",position:"underline",skipBoundary:!0,body:e[0]}}),ht(rt,"\\underline"),Dt("\\overset","{annotation:auto}{symbol:auto}",null,function(t,e){return{type:"overunder",overscript:e[0],skipBoundary:!0,body:e[1]}}),ht(rt,"\\overset"),Dt("\\underset","{annotation:auto}{symbol:auto}",null,function(t,e){return{type:"overunder",underscript:e[0],skipBoundary:!0,body:e[1]}}),ht(rt,"\\underset"),Dt(["\\stackrel","\\stackbin"],"{annotation:auto}{symbol:auto}",null,function(t,e){return{type:"overunder",overscript:e[0],skipBoundary:!0,body:e[1],mathtype:"\\stackrel"===t?"mrel":"mbin"}}),ht(rt,"\\stackrel"),ht(0,"\\stackbin"),Dt("\\rlap","{:auto}",null,function(t,e){return{type:"overlap",align:"right",skipBoundary:!0,body:e[0]}}),ht(270,"\\rlap"),Dt("\\llap","{:auto}",null,function(t,e){return{type:"overlap",align:"left",skipBoundary:!0,body:e[0]}}),ht(18,"\\llap"),Dt("\\mathrlap","{:auto}",null,function(t,e){return{type:"overlap",mode:"math",align:"right",skipBoundary:!0,body:e[0]}}),ht(nt,"\\mathrlap"),Dt("\\mathllap","{:auto}",null,function(t,e){return{type:"overlap",mode:"math",align:"left",skipBoundary:!0,body:e[0]}}),ht(nt,"\\mathllap"),Dt("\\boxed","{content:math}",null,function(t,e){return{type:"box",framecolor:"black",skipBoundary:!0,body:e[0]}}),ht(1236,"\\boxed"),Dt("\\colorbox","{background-color:color}{content:auto}",{allowedInText:!0},function(t,e){return{type:"box",backgroundcolor:e[0],skipBoundary:!0,body:e[1]}}),ht(nt,"\\colorbox"),Dt("\\fcolorbox","{frame-color:color}{background-color:color}{content:auto}",{allowedInText:!0},function(t,e){return{type:"box",framecolor:e[0],backgroundcolor:e[1],skipBoundary:!0,body:e[2]}}),ht(nt,"\\fcolorbox"),Dt("\\bbox","[:bbox]{body:auto}",{allowedInText:!0},function(t,e){return e[0]?{type:"box",padding:e[0].padding,border:e[0].border,backgroundcolor:e[0].backgroundcolor,skipBoundary:!0,body:e[1]}:{type:"box",skipBoundary:!0,body:e[1]}}),ht(nt,"\\bbox"),Dt("\\enclose","{notation:string}[style:string]{body:auto}",null,function(t,e){let i=e[0]||[];const s={type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",captureSelection:!0,body:e[2]};if(e[1]){const t=e[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const e of t){const t=e.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(t)s.strokeWidth=M.toPx(t[1],"px"),isFinite(s.strokeWidth)||(s.strokeWidth=1),s.strokeStyle=t[2],s.strokeColor=t[3];else{const t=e.match(/\s*([a-z]*)\s*=\s*"(.*)"/);t&&("mathbackground"===t[1]?s.backgroundcolor=t[2]:"mathcolor"===t[1]?s.strokeColor=t[2]:"padding"===t[1]?s.padding=M.toPx(t[2],"px"):"shadow"===t[1]&&(s.shadow=t[2]))}}"dashed"===s.strokeStyle?s.svgStrokeStyle="5,5":"dotted"===s.strokeStyle&&(s.svgStrokeStyle="1,5")}s.borderStyle=s.strokeWidth+"px "+s.strokeStyle+" "+s.strokeColor,i=i.toString().split(/[, ]/).filter(t=>t.length>0).map(t=>t.toLowerCase()),s.notation={};for(const t of i)s.notation[t]=!0;return s.notation.updiagonalarrow&&(s.notation.updiagonalstrike=!1),s.notation.box&&(s.notation.left=!1,s.notation.right=!1,s.notation.bottom=!1,s.notation.top=!1),s}),ht(nt,"\\enclose"),Dt("\\cancel","{body:auto}",null,function(t,e){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0},body:e[0]}}),Dt("\\bcancel","{body:auto}",null,function(t,e){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{downdiagonalstrike:!0},body:e[0]}}),Dt("\\xcancel","{body:auto}",null,function(t,e){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0,downdiagonalstrike:!0},body:e[0]}}),ht(nt,"\\cancel","\\bcancel","\\xcancel"),it="Styling",Dt(["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],"",{allowedInText:!0},function(t,e){return{fontSize:{tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[t.slice(1)]}}),Dt("\\fontseries","{:text}",{allowedInText:!0},(t,e)=>({fontSeries:Lt(e[0])})),Dt("\\bf","",{allowedInText:!0},(t,e)=>({fontSeries:"b"})),Dt("\\bm","{:math*}",{allowedInText:!0},(t,e)=>({fontSeries:"b"})),Dt("\\bold","",{allowedInText:!0},(t,e)=>({mode:"math",fontSeries:"b"})),Dt(["\\mathbf","\\boldsymbol"],"{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",fontSeries:"b",fontShape:"n"})),Dt("\\bfseries","",{allowedInText:!0},(t,e)=>({fontSeries:"b"})),Dt("\\textbf","{:text*}",{allowedInText:!0},(t,e)=>({fontSeries:"b"})),Dt("\\mathmd","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",fontSeries:"m",fontShape:"n"})),Dt("\\mdseries","",{allowedInText:!0},(t,e)=>({fontSeries:"m"})),Dt("\\textmd","{:math*}",{allowedInText:!0},(t,e)=>({fontSeries:"m"})),Dt("\\fontshape","{:text}",{allowedInText:!0},(t,e)=>({fontShape:Lt(e[0])})),Dt("\\it","",{allowedInText:!0},(t,e)=>({fontShape:"it"})),Dt("\\mathit","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",fontSeries:"m",fontShape:"it"})),Dt("\\upshape","",{allowedInText:!0},(t,e)=>({fontShape:"n"})),Dt("\\textup","{:text*}",{allowedInText:!0},(t,e)=>({fontShape:"n"})),Dt("\\textit","{:text*}",{allowedInText:!0},(t,e)=>({fontShape:"it"})),Dt("\\slshape","",{allowedInText:!0},(t,e)=>({fontShape:"sl"})),Dt("\\textsl","{:text*}",{allowedInText:!0},(t,e)=>({fontShape:"sl"})),Dt("\\scshape","",{allowedInText:!0},(t,e)=>({mode:"text",fontShape:"sc"})),Dt("\\textsc","{:text*}",{allowedInText:!0},(t,e)=>({fontShape:"sc"})),Dt("\\fontfamily","{:text}",{allowedInText:!0},(t,e)=>({fontFamily:Lt(e[0])})),Dt("\\mathrm","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",fontFamily:"cmr",fontSeries:"m",fontShape:"n"})),Dt("\\rmfamily","",{allowedInText:!0},(t,e)=>({fontFamily:"cmr"})),Dt("\\textrm","{:text*}",{allowedInText:!0},(t,e)=>({fontFamily:"cmr"})),Dt("\\mathsf","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",baseFontFamily:"cmss",fontSeries:"m",fontShape:"n"})),Dt("\\sffamily","",{allowedInText:!0},(t,e)=>({fontFamily:"cmss"})),Dt("\\textsf","{:text*}",{allowedInText:!0},(t,e)=>({fontFamily:"cmss"})),Dt("\\mathtt","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",baseFontFamily:"cmtt",fontSeries:"m",fontShape:"n"})),Dt("\\ttfamily","",{allowedInText:!0},(t,e)=>({fontFamily:"cmtt"})),Dt("\\texttt","{:text*}",{allowedInText:!0},(t,e)=>({fontFamily:"cmtt"})),Dt(["\\Bbb","\\mathbb"],"{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",baseFontFamily:"bb"})),Dt(["\\frak","\\mathfrak"],"{:math*}",{allowedInText:!0},(t,e)=>({baseFontFamily:"frak"})),Dt("\\mathcal","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",baseFontFamily:"cal",fontSeries:"m",fontShape:"n"})),Dt("\\mathscr","{:math*}",{allowedInText:!0},(t,e)=>({mode:"math",baseFontFamily:"scr",fontSeries:"m",fontShape:"n"})),ht(lt,"\\mathbb"),ht(1081,"\\Bbb"),ht(0,"\\mathcal"),ht(rt,"\\mathfrak"),ht(271,"\\frak"),ht(rt,"\\mathscr"),ht("UNCOMMON","\\mathsf"),ht(rt,"\\mathtt"),ht(rt,"\\boldsymbol"),Dt("\\textnormal","{:text*}",{allowedInText:!0},(t,e)=>({fontFamily:"cmr",fontShape:"n",fontSeries:"n"})),Dt("\\mbox","{:text*}",null,(t,e)=>({fontFamily:"cmr"})),Dt("\\text","{:text*}",{allowedInText:!0},(t,e)=>({})),Dt("\\class","{name:text}{content:auto*}",{allowedInText:!0},(t,e)=>({cssClass:Lt(e[0])})),Dt("\\cssId","{id:text}{content:auto}",{allowedInText:!0},(t,e)=>({cssId:Lt(e[0]),body:e[1],type:"group"})),Dt("\\em","",{allowedInText:!0},(t,e)=>({cssClass:"ML__emph",type:"group"})),Dt("\\emph","{:auto}",{allowedInText:!0},(t,e)=>({cssClass:"ML__emph",body:e[0],type:"group",skipBoundary:!0})),ht(rt,"\\textrm"),ht(rt,"\\textit"),ht(rt,"\\textsf"),ht(rt,"\\texttt"),ht(433,"\\textnormal"),ht(rt,"\\textbf"),ht(421,"\\textup"),ht(819,"\\emph"),ht(49,"\\em"),it="Operators",Dt("\\sqrt","[index:auto]{radicand:auto}",null,function(t,e){return{type:"surd",body:e[1],index:e[0]}}),ht(lt,"\\sqrt"),it="Fractions",Dt(["\\frac","\\dfrac","\\tfrac","\\cfrac","\\binom","\\dbinom","\\tbinom"],"{numerator}{denominator}",null,function(t,e){const i={type:"genfrac",numer:e[0],denom:e[1],mathstyle:"auto"};switch(t){case"\\dfrac":case"\\frac":case"\\tfrac":case"\\cfrac":i.hasBarLine=!0;break;case"\\\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")"}switch(t){case"\\dfrac":case"\\dbinom":i.mathstyle="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyle="textstyle"}return"\\cfrac"===t&&(i.continuousFraction=!0),i}),Dt(["\\over","\\atop","\\choose"],"",{infix:!0},function(t,e){const i=e[0],s=e[1];let a=!1,o=null,n=null;switch(t){case"\\atop":break;case"\\over":a=!0;break;case"\\choose":a=!1,o="(",n=")";break;default:throw new Error("Unrecognized genfrac command")}return{type:"genfrac",numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:n,mathstyle:"auto"}}),ht(21,"\\over"),ht(12,"\\atop"),ht(1968,"\\choose"),Dt(["\\overwithdelims","\\atopwithdelims"],"{left-delim:delim}{right-delim:delim}",{infix:!0},function(t,e){return{type:"genfrac",numer:e[0],denom:e[1],hasBarLine:!1,leftDelim:e[2],rightDelim:e[3],mathstyle:"auto"}}),ht(15,"\\overwithdelims"),ht(rt,"\\atopwithdelims"),it="Fractions",Dt("\\pdiff","{numerator}{denominator}",null,function(t,e){return{type:"genfrac",numer:e[0],denom:e[1],numerPrefix:"∂",denomPrefix:"∂",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:"auto"}}),it="Quantifiers",dt("\\forall","",vt,"∀",lt),dt("\\exists","",vt,"∃",lt),dt("\\nexists",xt,vt,"∄",lt),dt("\\mid","",St,"∣",rt),dt("\\top","",vt,"⊤","RARE"),dt("\\bot","",vt,"⊥","RARE"),it="Variable Sized Symbols",Dt(["\\sum","\\prod","\\bigcup","\\bigcap","\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\\intop"],"",null,function(t){return{type:"mop",limits:"auto",symbol:!0,baseFontFamily:"cmr",body:{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[t.slice(1)]}}),Dt(["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],"",null,function(t){return{type:"mop",limits:"nolimits",symbol:!0,body:{int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑"}[t.slice(1)]}}),ht(lt,"\\sum","\\prod","\\bigcap","\\bigcup","\\int"),ht(rt,"\\bigoplus","\\smallint","\\iint","\\oint"),ht("RARE","\\bigwedge","\\bigvee"),ht(756,"\\coprod"),ht(723,"\\bigsqcup"),ht(1241,"\\bigotimes"),ht(150,"\\bigodot"),ht(174,"\\biguplus"),ht(878,"\\iiint"),ht(97,"\\intop"),it="Various",dt("\\sharp","",vt,"♯",rt),dt("\\flat","",vt,"♭",590),dt("\\natural","",vt,"♮",278),dt("\\#","",vt,"#","RARE"),dt("\\&","",vt,"&","RARE"),dt("\\clubsuit","",vt,"♣",172),dt("\\heartsuit","",vt,"♡","ARCANE"),dt("\\spadesuit","",vt,"♠","ARCANE"),dt("\\diamondsuit","",vt,"♢",nt),dt("\\differencedelta","",St,"∆",rt),it="Letters and Letter Like Forms",Dt("\\unicode","{charcode:number}",null,function(t,e){let i=parseInt(e[0]);return isFinite(i)||(i=10067),{type:"mord",body:String.fromCodePoint(i)}}),dt("\\backslash","",vt,"\\"),dt("?","",vt,"?"),dt("!","",vt,"!"),dt("\\nabla","",vt,"∇",lt),dt("\\partial","",vt,"∂",lt),dt("\\ell","",vt,"ℓ",rt),dt("\\imaginaryI","",vt,"i"),dt("\\imaginaryJ","",vt,"j"),Dt(["\\Re","\\Im"],"",null,function(t){return{type:"mop",limits:"nolimits",symbol:!1,isFunction:!0,body:{"\\Re":"ℜ","\\Im":"ℑ"}[t],baseFontFamily:"frak"}}),dt("\\hbar","",vt,"ℏ",rt),dt("\\hslash",xt,vt,"ℏ",rt),dt("\\differentialD","cmr",vt,"d"),dt("\\rd","cmr",vt,"d"),dt("\\capitalDifferentialD","cmr",vt,"D"),dt("\\rD","cmr",vt,"D"),dt("\\exponentialE","cmr",vt,"e"),dt("\\Finv",xt,vt,"Ⅎ",3),dt("\\Game",xt,vt,"⅁",1),dt("\\wp","",vt,"℘",1306),dt("\\eth",xt,vt,"ð",77),dt("\\mho",xt,vt,"℧",138),dt("\\Bbbk",xt,vt,"k"),dt("\\doubleStruckCapitalN","bb",vt,"N"),dt("\\N","bb",vt,"N"),dt("\\doubleStruckCapitalR","bb",vt,"R"),dt("\\R","bb",vt,"R"),dt("\\doubleStruckCapitalQ","bb",vt,"Q"),dt("\\Q","bb",vt,"Q"),dt("\\doubleStruckCapitalC","bb",vt,"C"),dt("\\C","bb",vt,"C"),dt("\\doubleStruckCapitalZ","bb",vt,"Z"),dt("\\Z","bb",vt,"Z"),dt("\\doubleStruckCapitalP","bb",vt,"P"),dt("\\P","bb",vt,"P"),dt("\\scriptCapitalE","scr",vt,"E"),dt("\\scriptCapitalH","scr",vt,"H"),dt("\\scriptCapitalL","scr",vt,"L"),dt("\\gothicCapitalC","frak",vt,"C"),dt("\\gothicCapitalH","frak",vt,"H"),dt("\\gothicCapitalI","frak",vt,"I"),dt("\\gothicCapitalR","frak",vt,"R"),dt("\\pounds","",vt,"£",509),dt("\\yen",xt,vt,"¥",57),dt("\\euro","",vt,"€",4),it="Crosses",dt("\\textdagger","",wt,"†"),dt("\\dagger","",wt,"†",rt),dt("\\dag","",wt,"†",rt),dt("\\ddag","",wt,"‡",500),dt("\\textdaggerdbl","",wt,"‡"),dt("\\ddagger","",wt,"‡",353),dt("\\maltese",xt,vt,"✠",24),it="Arrows",dt("\\longrightarrow","",St,"⟶",lt),dt("\\rightarrow","",St,"→",lt),dt("\\Longrightarrow","",St,"⟹",lt),dt("\\Rightarrow","",St,"⇒",lt),dt("\\longmapsto","",St,"⟼",rt),dt("\\mapsto","",St,"↦",rt),dt("\\Longleftrightarrow","",St,"⟺",rt),dt("\\rightleftarrows",xt,St,"⇄",rt),dt("\\leftarrow","",St,"←",rt),dt("\\curvearrowleft",xt,St,"↶",rt),dt("\\uparrow","",St,"↑",rt),dt("\\downarrow","",St,"↓",rt),dt("\\hookrightarrow","",St,"↪",rt),dt("\\rightharpoonup","",St,"⇀",rt),dt("\\rightleftharpoons","",St,"⇌",rt),dt("\\Leftarrow","",St,"⇐",1695),dt("\\longleftrightarrow","",St,"⟷",1599),dt("\\longleftarrow","",St,"⟵",878),dt("\\Longleftarrow","",St,"⟸",296),dt("\\searrow","",St,"↘",1609),dt("\\nearrow","",St,"↗",1301),dt("\\swarrow","",St,"↙",167),dt("\\nwarrow","",St,"↖",108),dt("\\Uparrow","",St,"⇑",257),dt("\\Downarrow","",St,"⇓",556),dt("\\updownarrow","",St,"↕",192),dt("\\Updownarrow","",St,"⇕",161),dt("\\hookleftarrow","",St,"↩",115),dt("\\leftharpoonup","",St,"↼",93),dt("\\leftharpoondown","",St,"↽",42),dt("\\rightharpoondown","",St,"⇁",80),dt("\\leftrightarrows",xt,St,"⇆",765),dt("\\dashrightarrow",xt,St,"⇢",311),dt("\\dashleftarrow",xt,St,"⇠",5),dt("\\leftleftarrows",xt,St,"⇇",8),dt("\\Lleftarrow",xt,St,"⇚",7),dt("\\twoheadleftarrow",xt,St,"↞",32),dt("\\leftarrowtail",xt,St,"↢",25),dt("\\looparrowleft",xt,St,"↫",6),dt("\\leftrightharpoons",xt,St,"⇋",205),dt("\\circlearrowleft",xt,St,"↺",105),dt("\\Lsh",xt,St,"↰",11),dt("\\upuparrows",xt,St,"⇈",15),dt("\\downharpoonleft",xt,St,"⇃",21),dt("\\multimap",xt,St,"⊸",108),dt("\\leftrightsquigarrow",xt,St,"↭",31),dt("\\twoheadrightarrow",xt,St,"↠",835),dt("\\rightarrowtail",xt,St,"↣",195),dt("\\looparrowright",xt,St,"↬",37),dt("\\curvearrowright",xt,St,"↷",209),dt("\\circlearrowright",xt,St,"↻",63),dt("\\Rsh",xt,St,"↱",18),dt("\\downdownarrows",xt,St,"⇊",6),dt("\\upharpoonright",xt,St,"↾",579),dt("\\downharpoonright",xt,St,"⇂",39),dt("\\rightsquigarrow",xt,St,"⇝",674),dt("\\leadsto",xt,St,"⇝",709),dt("\\Rrightarrow",xt,St,"⇛",62),dt("\\restriction",xt,St,"↾",29),dt("\\upharpoonleft",xt,St,"↿",nt),dt("\\rightrightarrows",xt,St,"⇉",nt),it="Negated Arrows",dt("\\nrightarrow",xt,St,"↛",324),dt("\\nRightarrow",xt,St,"⇏",107),dt("\\nleftrightarrow",xt,St,"↮",36),dt("\\nLeftrightarrow",xt,St,"⇎",20),dt("\\nleftarrow",xt,St,"↚",7),dt("\\nLeftarrow",xt,St,"⇍",5),it="Negated Relations",dt("\\nless",xt,St,"≮",146),dt("\\nleqslant",xt,St,"",58),dt("\\lneq",xt,St,"⪇",54),dt("\\lneqq",xt,St,"≨",36),dt("\\nleqq",xt,St,"",18),dt("\\unlhd",xt,wt,"⊴",253),dt("\\unrhd",xt,wt,"⊵",66),dt("\\lvertneqq",xt,St,"",6),dt("\\lnsim",xt,St,"⋦",4),dt("\\lnapprox",xt,St,"⪉",nt),dt("\\nprec",xt,St,"⊀",71),dt("\\npreceq",xt,St,"⋠",57),dt("\\precnsim",xt,St,"⋨",4),dt("\\precnapprox",xt,St,"⪹",2),dt("\\nsim",xt,St,"≁",40),dt("\\nshortmid",xt,St,"",1),dt("\\nmid",xt,St,"∤",417),dt("\\nvdash",xt,St,"⊬",266),dt("\\nvDash",xt,St,"⊭",405),dt("\\ngtr",xt,St,"≯",90),dt("\\ngeqslant",xt,St,"",23),dt("\\ngeqq",xt,St,"",12),dt("\\gneq",xt,St,"⪈",29),dt("\\gneqq",xt,St,"≩",35),dt("\\gvertneqq",xt,St,"",6),dt("\\gnsim",xt,St,"⋧",3),dt("\\gnapprox",xt,St,"⪊",nt),dt("\\nsucc",xt,St,"⊁",44),dt("\\nsucceq",xt,St,"⋡",nt),dt("\\succnsim",xt,St,"⋩",4),dt("\\succnapprox",xt,St,"⪺",nt),dt("\\ncong",xt,St,"≆",128),dt("\\nshortparallel",xt,St,"",6),dt("\\nparallel",xt,St,"∦",54),dt("\\nVDash",xt,St,"⊯",5),dt("\\nsupseteqq",xt,St,"",1),dt("\\supsetneq",xt,St,"⊋",286),dt("\\varsupsetneq",xt,St,"",2),dt("\\supsetneqq",xt,St,"⫌",49),dt("\\varsupsetneqq",xt,St,"",3),dt("\\nVdash",xt,St,"⊮",179),dt("\\precneqq",xt,St,"⪵",11),dt("\\succneqq",xt,St,"⪶",3),dt("\\nsubseteqq",xt,St,"",16),it="Various",dt("\\checkmark",xt,vt,"✓",1025),dt("\\diagup",xt,vt,"╱",440),dt("\\diagdown",xt,vt,"╲",175),dt("\\measuredangle",xt,vt,"∡",271),dt("\\sphericalangle",xt,vt,"∢",156),dt("\\backprime",xt,vt,"‵",104),dt("\\backdoubleprime",xt,vt,"‶",nt),it="Shapes",dt("\\ast","",wt,"∗",lt),dt("\\star","",wt,"⋆",rt),dt("\\diamond","",wt,"⋄",1356),dt("\\Diamond",xt,vt,"◊",695),dt("\\lozenge",xt,vt,"◊",422),dt("\\blacklozenge",xt,vt,"⧫",344),dt("\\bigstar",xt,vt,"★",168),it="Hebrew",dt("\\aleph","",vt,"ℵ",1381),dt("\\beth",xt,vt,"ℶ",54),dt("\\daleth",xt,vt,"ℸ",43),dt("\\gimel",xt,vt,"ℷ",36),it="Fences",dt("\\lbrace","",At,"{",lt),dt("\\rbrace","",Ct,"}",lt),dt("\\langle","",At,"⟨",rt),dt("\\rangle","",Ct,"⟩",rt),dt("\\lfloor","",At,"⌊",rt),dt("\\rfloor","",Ct,"⌋",rt),dt("\\lceil","",At,"⌈",rt),dt("\\rceil","",Ct,"⌉",rt),dt("\\vert","",vt,"∣",lt),dt("\\mvert","",St,"∣"),dt("\\lvert","",At,"∣",496),dt("\\rvert","",Ct,"∣",496),dt("\\|","",vt,"∥"),dt("\\Vert","",vt,"∥",lt),dt("\\mVert","",vt,"∥"),dt("\\lVert","",At,"∥",287),dt("\\rVert","",Ct,"∥",nt),dt("\\lbrack","",At,"[",574),dt("\\rbrack","",Ct,"]",213),dt("\\{","",At,"{"),dt("\\}","",Ct,"}"),dt("(","",At,"("),dt(")","",Ct,")"),dt("[","",At,"["),dt("]","",Ct,"]"),dt("\\ulcorner",xt,At,"┌",296),dt("\\urcorner",xt,Ct,"┐",310),dt("\\llcorner",xt,At,"└",137),dt("\\lrcorner",xt,Ct,"┘",199),dt("\\lgroup","",At,"⟮",24),dt("\\rgroup","",Ct,"⟯",24),dt("\\lmoustache","",At,"⎰",nt),dt("\\rmoustache","",Ct,"⎱",nt),Dt(["\\middle"],"{:delim}",null,function(t,e){return{type:"delim",delim:e[0]}}),it="Sizing";const zt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};function Et(t){let e="",i=!0;for(const s of t)"string"==typeof s.body?e+=s.body:i=!1;return i?e:""}Dt(["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],"{:delim}",null,function(t,e){return{type:"sizeddelim",size:zt[t].size,cls:zt[t].mclass,delim:e[0]}}),it="Relations",dt("=","",St,"=",lt),dt("\\ne","",St,"≠",lt),dt("\\neq","",St,"≠",rt),dt("<","",St,"<",lt),dt("\\lt","",St,"<",rt),dt(">","",St,">",lt),dt("\\gt","",St,">",rt),dt("\\le","",St,"≤",rt),dt("\\ge","",St,"≥",rt),dt("\\leqslant",xt,St,"⩽",lt),dt("\\geqslant",xt,St,"⩾",lt),dt("\\leq","",St,"≤",rt),dt("\\geq","",St,"≥",rt),dt("\\ll","",St,"≪"),dt("\\gg","",St,"≫",rt),dt("\\coloneq","",St,"≔",5),dt("\\measeq","",St,"≝"),dt("\\eqdef","",St,"≞"),dt("\\questeq","",St,"≟"),dt(":","",St,":"),dt("\\cong","",St,"≅",rt),dt("\\equiv","",St,"≡",rt),dt("\\prec","",St,"≺",rt),dt("\\preceq","",St,"⪯",rt),dt("\\succ","",St,"≻",rt),dt("\\succeq","",St,"⪰",1916),dt("\\perp","",St,"⊥",rt),dt("\\parallel","",St,"∥",rt),dt("\\propto","",St,"∝",rt),dt("\\Colon","",St,"∷"),dt("\\smile","",St,"⌣",rt),dt("\\frown","",St,"⌢",rt),dt("\\sim","",St,"∼",rt),dt("\\gtrsim",xt,St,"≳",rt),dt("\\approx","",St,"≈",lt),dt("\\approxeq",xt,St,"≊",147),dt("\\thickapprox",xt,St,"≈",377),dt("\\lessapprox",xt,St,"⪅",146),dt("\\gtrapprox",xt,St,"⪆",95),dt("\\precapprox",xt,St,"⪷",50),dt("\\succapprox",xt,St,"⪸",nt),dt("\\thicksim",xt,St,"∼",779),dt("\\succsim",xt,St,"≿",251),dt("\\precsim",xt,St,"≾",104),dt("\\backsim",xt,St,"∽",251),dt("\\eqsim",xt,St,"≂",62),dt("\\backsimeq",xt,St,"⋍",91),dt("\\simeq","",St,"≃",nt),dt("\\lesssim",xt,St,"≲",nt),dt("\\nleq",xt,St,"≰",369),dt("\\ngeq",xt,St,"≱",164),dt("\\smallsmile",xt,St,"⌣",31),dt("\\smallfrown",xt,St,"⌢",71),dt("\\bowtie","",St,"⋈",558),dt("\\asymp","",St,"≍",755),dt("\\sqsubseteq","",St,"⊑",1255),dt("\\sqsupseteq","",St,"⊒",183),dt("\\leqq",xt,St,"≦",1356),dt("\\eqslantless",xt,St,"⪕",15),dt("\\lll",xt,St,"⋘",157),dt("\\lessgtr",xt,St,"≶",281),dt("\\lesseqgtr",xt,St,"⋚",134),dt("\\lesseqqgtr",xt,St,"⪋",nt),dt("\\risingdotseq",xt,St,"≓",8),dt("\\fallingdotseq",xt,St,"≒",99),dt("\\subseteqq",xt,St,"⫅",82),dt("\\Subset",xt,St,"⋐"),dt("\\sqsubset",xt,St,"⊏",309),dt("\\preccurlyeq",xt,St,"≼",549),dt("\\curlyeqprec",xt,St,"⋞",14),dt("\\vDash",xt,St,"⊨",646),dt("\\Vvdash",xt,St,"⊪",20),dt("\\bumpeq",xt,St,"≏",13),dt("\\Bumpeq",xt,St,"≎",12),dt("\\geqq",xt,St,"≧",972),dt("\\eqslantgtr",xt,St,"⪖",13),dt("\\ggg",xt,St,"⋙",127),dt("\\gtrless",xt,St,"≷",417),dt("\\gtreqless",xt,St,"⋛",190),dt("\\gtreqqless",xt,St,"⪌",91),dt("\\supseteqq",xt,St,"⫆",6),dt("\\Supset",xt,St,"⋑",34),dt("\\sqsupset",xt,St,"⊐",71),dt("\\succcurlyeq",xt,St,"≽",442),dt("\\curlyeqsucc",xt,St,"⋟",10),dt("\\Vdash",xt,St,"⊩",276),dt("\\shortmid",xt,St,"∣",67),dt("\\shortparallel",xt,St,"∥",17),dt("\\between",xt,St,"≬",110),dt("\\pitchfork",xt,St,"⋔",66),dt("\\varpropto",xt,St,"∝",203),dt("\\backepsilon",xt,St,"∍",176),dt("\\llless",xt,St,"⋘",nt),dt("\\gggtr",xt,St,"⋙",nt),dt("\\lhd",xt,wt,"⊲",447),dt("\\rhd",xt,wt,"⊳",338),dt("\\Join","",St,"⋈",35),dt("\\doteq","",St,"≐",1450),dt("\\doteqdot",xt,St,"≑",60),dt("\\Doteq",xt,St,"≑",nt),dt("\\eqcirc",xt,St,"≖",6),dt("\\circeq",xt,St,"≗",31),dt("\\lessdot",xt,wt,"⋖",88),dt("\\gtrdot",xt,wt,"⋗",45),dt("\\~","",St,"~"),it="Logic",dt("\\leftrightarrow","",St,"↔",lt),dt("\\Leftrightarrow","",St,"⇔",lt),dt("\\to","",St,"→",lt),dt("\\models","",St,"⊨",rt),dt("\\vdash","",St,"⊢",rt),dt("\\therefore",xt,St,"∴",1129),dt("\\because",xt,St,"∵",388),dt("\\implies","",St,"⟹",1858),dt("\\gets","",St,"←",150),dt("\\dashv","",St,"⊣",299),dt("\\impliedby","",St,"⟸",nt),dt("\\biconditional","",St,"⟷",nt),dt("\\roundimplies","",St,"⥰",nt),it="Operators",dt("+","",wt,"+",lt),dt("-","",wt,"−",lt),dt("−","",wt,"−",lt),dt("\\pm","",wt,"±",rt),dt("\\mp","",wt,"∓",rt),dt("*","",wt,"∗",rt),dt("\\times","",wt,"×",rt),dt("\\div","",wt,"÷",rt),dt("\\surd","",vt,"√",rt),dt("\\divides","",wt,"∣",nt),dt("\\ltimes",xt,wt,"⋉",576),dt("\\rtimes",xt,wt,"⋊",946),dt("\\leftthreetimes",xt,wt,"⋋",34),dt("\\rightthreetimes",xt,wt,"⋌",14),dt("\\intercal",xt,wt,"⊺",478),dt("\\dotplus",xt,wt,"∔",81),dt("\\centerdot",xt,wt,"⋅",271),dt("\\doublebarwedge",xt,wt,"⩞",5),dt("\\divideontimes",xt,wt,"⋇",51),dt("\\cdot","",wt,"⋅",nt),it="Others",dt("\\infty","",vt,"∞",lt),dt("\\prime","",kt,"′",lt),dt("\\doubleprime","",vt,"″"),dt("\\angle","",vt,"∠",rt),dt("`","",vt,"‘"),dt("\\$","",vt,"$"),dt("\\%","",vt,"%"),dt("\\_","",vt,"_"),it="Greek",dt("\\alpha","",kt,"α",rt),dt("\\beta","",kt,"β",rt),dt("\\gamma","",kt,"γ",rt),dt("\\delta","",kt,"δ",rt),dt("\\epsilon","",kt,"ϵ",rt),dt("\\varepsilon","",kt,"ε"),dt("\\zeta","",kt,"ζ",rt),dt("\\eta","",kt,"η",rt),dt("\\theta","",kt,"θ",rt),dt("\\vartheta","",kt,"ϑ",rt),dt("\\iota","",kt,"ι",rt),dt("\\kappa","",kt,"κ",rt),dt("\\varkappa",xt,kt,"ϰ",rt),dt("\\lambda","",kt,"λ",rt),dt("\\mu","",kt,"μ",rt),dt("\\nu","",kt,"ν",rt),dt("\\xi","",kt,"ξ",rt),dt("\\omicron","",kt,"o"),dt("\\pi","",kt,"π",rt),dt("\\varpi","",kt,"ϖ",rt),dt("\\rho","",kt,"ρ",rt),dt("\\varrho","",kt,"ϱ",rt),dt("\\sigma","",kt,"σ",rt),dt("\\varsigma","",kt,"ς",rt),dt("\\tau","",kt,"τ",rt),dt("\\phi","",kt,"ϕ",rt),dt("\\varphi","",kt,"φ",rt),dt("\\upsilon","",kt,"υ",rt),dt("\\chi","",kt,"χ",rt),dt("\\psi","",kt,"ψ",rt),dt("\\omega","",kt,"ω",rt),dt("\\Gamma","",kt,"Γ",rt),dt("\\Delta","",kt,"Δ",rt),dt("\\Theta","",kt,"Θ",rt),dt("\\Lambda","",kt,"Λ",rt),dt("\\Xi","",kt,"Ξ",rt),dt("\\Pi","",kt,"Π",rt),dt("\\Sigma","",kt,"Σ",rt),dt("\\Upsilon","",kt,"Υ",rt),dt("\\Phi","",kt,"Φ",rt),dt("\\Psi","",kt,"Ψ",rt),dt("\\Omega","",kt,"Ω",rt),dt("\\digamma",xt,kt,"ϝ",248),it="Others",dt("\\emptyset","",vt,"∅",lt),dt("\\varnothing",xt,vt,"∅",lt),it="Set Operators",dt("\\cap","",wt,"∩",lt),dt("\\cup","",wt,"∪",lt),dt("\\setminus","",wt,"∖",rt),dt("\\smallsetminus",xt,wt,"∖",254),dt("\\complement",xt,vt,"∁",200),it="Set Relations",dt("\\in","",St,"∈",lt),dt("\\notin","",St,"∉",lt),dt("\\not","",St,"̸",rt),dt("\\ni","",St,"∋",rt),dt("\\owns","",St,"∋",18),dt("\\subset","",St,"⊂",lt),dt("\\supset","",St,"⊃",lt),dt("\\subseteq","",St,"⊆",lt),dt("\\supseteq","",St,"⊇",lt),dt("\\subsetneq",xt,St,"⊊",1945),dt("\\varsubsetneq",xt,St,"",198),dt("\\subsetneqq",xt,St,"⫋",314),dt("\\varsubsetneqq",xt,St,"",55),dt("\\nsubset",xt,St,"⊄",nt),dt("\\nsupset",xt,St,"⊅",nt),dt("\\nsubseteq",xt,St,"⊈",950),dt("\\nsupseteq",xt,St,"⊉",49),it="Spacing",dt("\\ ","",Mt," "),dt("~","",Mt," "),dt("\\space","",Mt," "),dt("\\!","",Mt,null),dt("\\,","",Mt,null),dt("\\:","",Mt,null),dt("\\;","",Mt,null),dt("\\enskip","",Mt,null),dt("\\enspace","",Mt,null,672),dt("\\quad","",Mt,null,rt),dt("\\qquad","",Mt,null,rt),Dt(["\\hspace","\\hspace*"],"{width:skip}",{allowedInText:!0},function(t,e){return{type:"spacing",width:e[0]||0}}),Dt(["\\mathop","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathord","\\mathinner"],"{:auto}",null,function(t,e){const i={type:{"\\mathop":"mop","\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[t],body:Et(e[0])||e[0],captureSelection:!0,baseFontFamily:"\\mathop"===t?"math":""};return"\\mathop"===t&&(i.limits="nolimits",i.isFunction=!0),i}),Dt(["\\operatorname","\\operatorname*"],"{operator:string}",null,function(t,e){const i={type:"mop",skipBoundary:!0,body:e[0],isFunction:!0,baseFontFamily:"cmr"};return"\\operatorname"===t?i.limits="nolimits":"\\operatorname*"===t&&(i.limits="limits"),i}),it="Punctuation",dt("\\colon","","mpunct",":",rt),dt("\\cdotp","","mpunct","⋅",rt),dt("\\ldots","","minner","…",rt),dt("\\cdots","","minner","⋯",rt),dt("\\ddots","","minner","⋱",rt),dt("\\mathellipsis","","minner","…",91),dt("\\vdots","",vt,"⋮",rt),dt("\\ldotp","","mpunct",".",18),dt(",","","mpunct",","),dt(";","","mpunct",";"),it="Logical Operators",dt("\\wedge","",wt,"∧",lt),dt("\\vee","",wt,"∨",lt),dt("\\lnot","",vt,"¬",rt),dt("\\neg","",vt,"¬",lt),dt("\\land","",wt,"∧",659),dt("\\lor","",wt,"∨",364),dt("\\barwedge",xt,wt,"⊼",21),dt("\\veebar",xt,wt,"⊻",43),dt("\\nor",xt,wt,"⊻",7),dt("\\curlywedge",xt,wt,"⋏",58),dt("\\curlyvee",xt,wt,"⋎",57),it="Boxes",dt("\\square",xt,vt,"□",rt),dt("\\Box",xt,vt,"□",rt),dt("\\blacksquare",xt,vt,"■",1679),dt("\\boxminus",xt,wt,"⊟",79),dt("\\boxplus",xt,wt,"⊞",276),dt("\\boxtimes",xt,wt,"⊠",457),dt("\\boxdot",xt,wt,"⊡",120),it="Circles",dt("\\circ","",wt,"∘",lt),dt("\\bigcirc","",wt,"◯",903),dt("\\bullet","",wt,"∙",rt),dt("\\circleddash",xt,wt,"⊝",rt),dt("\\circledast",xt,wt,"⊛",339),dt("\\oplus","",wt,"⊕",rt),dt("\\ominus","",wt,"⊖",1568),dt("\\otimes","",wt,"⊗",rt),dt("\\odot","",wt,"⊙",rt),dt("\\circledcirc",xt,wt,"⊚",93),dt("\\oslash","",wt,"⊘",497),dt("\\circledS",xt,vt,"Ⓢ",31),dt("\\circledR",xt,vt,"®",1329),it="Triangles",dt("\\triangle","",vt,"△",rt),dt("\\triangleq",xt,St,"≜",rt),dt("\\bigtriangleup","",wt,"△",1773),dt("\\vartriangle",xt,St,"△",762),dt("\\triangledown",xt,vt,"▽",520),dt("\\bigtriangledown","",wt,"▽",661),dt("\\triangleleft","",wt,"◃",534),dt("\\vartriangleleft",xt,St,"⊲",281),dt("\\trianglelefteq",xt,St,"⊴",176),dt("\\ntriangleleft",xt,St,"⋪",13),dt("\\ntrianglelefteq",xt,St,"⋬",22),dt("\\triangleright","",wt,"▹",516),dt("\\vartriangleright",xt,St,"⊳",209),dt("\\trianglerighteq",xt,St,"⊵",45),dt("\\ntriangleright",xt,St,"⋫",15),dt("\\ntrianglerighteq",xt,St,"⋭",6),dt("\\blacktriangle",xt,vt,"▲",360),dt("\\blacktriangledown",xt,vt,"▼",159),dt("\\blacktriangleleft",xt,St,"◀",101),dt("\\blacktriangleright",xt,St,"▶",271),it="Others",dt("\\/","",kt,"/"),dt("|","","textord","∣"),it="Big Operators",dt("\\sqcup","",wt,"⊔",1717),dt("\\sqcap","",wt,"⊓",735),dt("\\uplus","",wt,"⊎",597),dt("\\wr","",wt,"≀",286),dt("\\Cap",xt,wt,"⋒",2),dt("\\Cup",xt,wt,"⋓",2),dt("\\doublecap",xt,wt,"⋒",1),dt("\\doublecup",xt,wt,"⋓",1),dt("\\amalg","",wt,"⨿",nt),dt("\\And","",wt,"&"),it="Accents",Dt(["\\acute","\\grave","\\dot","\\ddot","\\mathring","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec"],"{body:auto}",null,function(t,e){return{type:"accent",accent:{"\\acute":"ˊ","\\grave":"ˋ","\\dot":"˙","\\ddot":"¨","\\mathring":"˚","\\tilde":"~","\\bar":"ˉ","\\breve":"˘","\\check":"ˇ","\\hat":"^","\\vec":"⃗"}[t],limits:"accent",skipBoundary:!0,body:e[0]}}),ht(rt,"\\bar","\\ddot","\\acute","\\tilde","\\check"),ht(1548,"\\breve"),ht(735,"\\grave"),ht(lt,"\\vec"),it="Letters and Letter Like Forms",dt("\\imath","",vt,"ı"),dt("\\jmath","",vt,"ȷ"),it="Others",dt("\\degree","",vt,"°",46),it="Others",dt("'","",vt,"′"),dt('"',"",vt,"”"),it="Others",Dt("\\^","{:string}",{allowedInText:!0},function(t,e){return{type:"mord",limits:"nolimits",symbol:!0,isFunction:!1,body:e[0]&&{a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[e[0]]||"^",baseFontFamily:"cmr"}}),Dt("\\`","{:string}",{allowedInText:!0},function(t,e){return{type:"mord",limits:"nolimits",symbol:!0,isFunction:!1,body:e[0]&&{a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[e[0]]||"`",baseFontFamily:"cmr"}}),Dt("\\'","{:string}",{allowedInText:!0},function(t,e){return{type:"mord",limits:"nolimits",symbol:!0,isFunction:!1,body:e[0]&&{a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[e[0]]||"^",baseFontFamily:"cmr"}}),Dt("\\~","{:string}",{allowedInText:!0},function(t,e){return{type:"mord",limits:"nolimits",symbol:!0,isFunction:!1,body:e[0]&&{n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[e[0]]||"´",baseFontFamily:"cmr"}}),Dt("\\c","{:string}",{allowedInText:!0},function(t,e){return{type:"mord",limits:"nolimits",symbol:!0,isFunction:!1,body:e[0]&&{c:"ç",C:"Ç"}[e[0]]||"",baseFontFamily:"cmr"}});const qt={"\\#":"#","\\&":"&","\\$":"$","\\%":"%","\\_":"_","\\euro":"€","\\maltese":"✠","\\{":"{","\\}":"}","\\nobreakspace":" ","\\ldots":"…","\\textellipsis":"…","\\backslash":"\\","`":"‘","'":"’","``":"“","''":"”","\\degree":"°","\\textasciicircum":"^","\\textasciitilde":"~","\\textasteriskcentered":"*","\\textbackslash":"\\","\\textbraceleft":"{","\\textbraceright":"}","\\textbullet":"•","\\textdollar":"$","\\textsterling":"£","–":"–","—":"—","‘":"‘","’":"’","“":"“","”":"”",'"':"”","\\ss":"ß","\\ae":"æ","\\oe":"œ","\\AE":"Æ","\\OE":"Œ","\\O":"Ø","\\i":"ı","\\j":"ȷ","\\aa":"å","\\AA":"Å"},It="undefined"!=typeof navigator&&/firefox|edge/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("\\p{Letter}","u"),Pt="undefined"!=typeof navigator&&/firefox|edge/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("[0-9\\p{Letter}]","u");var Bt={matchCodepoint:ut,commandAllowed:function(t,e){return!(!at[e]||"text"===t&&!at[e].allowedInText)||!!{text:qt,math:st}[t][e]},unicodeToMathVariant:yt,mathVariantToUnicode:function(t,e,i){if(!/[A-Za-z0-9]/.test(t))return t;if(!e&&!i)return t;const s=t.codePointAt(0);for(let t=0;t<gt.length;t++)if((!e||gt[t].variant===e)&&(!i||gt[t].style===i)&&s>=gt[t].offset&&s<gt[t].offset+gt[t].len){const e=gt[t].start+s-gt[t].offset;return String.fromCodePoint(ft[e]||e)}return t},unicodeStringToLatex:function(t,e){let i="";for(const s of e)i+=bt(t,s.codePointAt(0));return i},getInfo:function(t,e,i){if(0===t.length)return null;let s=null;if("\\"===t.charAt(0)){if(s=at[t])return"math"===e||s.allowedInText?s:null;if(s||("math"===e?s=st[t]:qt[t]&&(s={value:qt[t]})),!s){const e=t.slice(1);if(i&&i[e]){let t=i[e];"object"==typeof t&&(t=t.def);let a=0;for(/(^|[^\\])#1/.test(t)&&(a=1),/(^|[^\\])#2/.test(t)&&(a=2),/(^|[^\\])#3/.test(t)&&(a=3),/(^|[^\\])#4/.test(t)&&(a=4),/(^|[^\\])#5/.test(t)&&(a=5),/(^|[^\\])#6/.test(t)&&(a=6),/(^|[^\\])#7/.test(t)&&(a=7),/(^|[^\\])#8/.test(t)&&(a=8),/(^|[^\\])#9/.test(t)&&(a=9),s={type:"group",allowedInText:!1,params:[],infix:!1};a>=1;)s.params.push({optional:!1,type:"math",defaultValue:null,placeholder:null}),a-=1}}}else"math"===e?s=st[t]:qt[t]&&(s={value:qt[t]});return!s||"mord"!==s.type||"f"!==s.value&&"g"!==s.value&&"h"!==s.value||(s.isFunction=!0),s},getValue:function(t,e){return"math"===t?st[e]&&st[e].value?st[e].value:e:qt[e]?qt[e]:e},getEnvironmentInfo:function(t){let e=ot[t];return e||(e={params:"",parser:null,mathstyle:"displaystyle",tabular:!0,colFormat:[],lFence:".",rFence:"."}),e},suggest:function(t){if(t.length<=1)return[];const e=[];for(const i in at)Object.prototype.hasOwnProperty.call(at,i)&&i.startsWith(t)&&!at[i].infix&&e.push({match:i,frequency:at[i].frequency});for(const i in st)Object.prototype.hasOwnProperty.call(st,i)&&i.startsWith(t)&&e.push({match:i,frequency:st[i].frequency});return e.sort((t,e)=>t.frequency===e.frequency?t.match.length-e.match.length:(e.frequency||0)-(t.frequency||0)),e},FREQUENCY_VALUE:ct,TEXT_SYMBOLS:qt,MATH_SYMBOLS:st,ENVIRONMENTS:ot,RIGHT_DELIM:{"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},FUNCTIONS:at,MACROS:{iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace"},COMMAND_MODE_CHARACTERS:/[a-zA-Z0-9!@*()-=+{}[\]\\';:?\/.,~<>`|'$%#&^_" ]/,LETTER:It,LETTER_AND_DIGITS:Pt};const Ot=et.makeSymbol,Rt=et.makeSpan,Kt=et.makeVlist;function Nt(t,e,i,s,a,o){const n=Ot("Size"+i+"-Regular",Bt.getValue("math",e)),r=et.makeStyleWrap(t,Rt(n,"delimsizing size"+i),a.mathstyle,O.TEXT,o);return s&&r.setTop((1-a.mathstyle.sizeMultiplier)*a.mathstyle.metrics.axisHeight),r.setStyle("color",a.color),"number"==typeof a.opacity&&r.setStyle("opacity",a.opacity),r}function $t(t,e){let i="";return"Size1-Regular"===e?i=" delim-size1":"Size4-Regular"===e&&(i=" delim-size4"),Rt(Ot(e,Bt.getValue("math",t)),"delimsizinginner"+i)}function Wt(t,e,i,s,a,o){let n,r,l,c;n=l=c=Bt.getValue("math",e),r=null;let h="Size1-Regular";"\\vert"===e||"\\lvert"===e||"\\rvert"===e||"\\mvert"===e||"\\mid"===e?l=n=c="∣":"\\Vert"===e||"\\lVert"===e||"\\rVert"===e||"\\mVert"===e||"\\|"===e?l=n=c="∥":"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?n=l="⏐":"\\Downarrow"===e?n=l="‖":"\\updownarrow"===e?(n="↑",l="⏐",c="↓"):"\\Updownarrow"===e?(n="⇑",l="‖",c="⇓"):"["===e||"\\lbrack"===e?(n="⎡",l="⎢",c="⎣",h="Size4-Regular"):"]"===e||"\\rbrack"===e?(n="⎤",l="⎥",c="⎦",h="Size4-Regular"):"\\lfloor"===e?(l=n="⎢",c="⎣",h="Size4-Regular"):"\\lceil"===e?(n="⎡",l=c="⎢",h="Size4-Regular"):"\\rfloor"===e?(l=n="⎥",c="⎦",h="Size4-Regular"):"\\rceil"===e?(n="⎤",l=c="⎥",h="Size4-Regular"):"("===e?(n="⎛",l="⎜",c="⎝",h="Size4-Regular"):")"===e?(n="⎞",l="⎟",c="⎠",h="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(n="⎧",r="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(n="⎫",r="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e?(n="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e?(n="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e?(n="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"===e?(n="⎫",c="⎩",l="⎪",h="Size4-Regular"):"\\surd"===e?(n="",c="⎷",l="",h="Size4-Regular"):"\\ulcorner"===e?(n="┌",l=c=" "):"\\urcorner"===e?(n="┐",l=c=" "):"\\llcorner"===e?(c="└",l=n=" "):"\\lrcorner"===e&&(n="┘",l=n=" ");const d=M.getCharacterMetrics(Bt.getValue("math",n),h),p=d.height+d.depth,m=M.getCharacterMetrics(Bt.getValue("math",l),h),u=m.height+m.depth,f=M.getCharacterMetrics(Bt.getValue("math",c),h),g=f.height+f.depth;let y=0,b=1;if(null!==r){const t=M.getCharacterMetrics(Bt.getValue("math",r),h);y=t.height+t.depth,b=2}const x=p+g+y,k=Math.ceil((i-x)/(b*u)),v=x+k*b*u;let w=a.mathstyle.metrics.axisHeight;s&&(w*=a.mathstyle.sizeMultiplier);const S=v/2-w,A=[];if(A.push($t(c,h)),null===r)for(let t=0;t<k;t++)A.push($t(l,h));else{for(let t=0;t<k;t++)A.push($t(l,h));A.push($t(r,h));for(let t=0;t<k;t++)A.push($t(l,h))}A.push($t(n,h));const C=Kt(a,A,"bottom",S);return C.setStyle("color",a.color),"number"==typeof a.opacity&&C.setStyle("opacity",a.opacity),et.makeStyleWrap(t,Rt(C,"delimsizing mult"),a.mathstyle,O.TEXT,o)}const Ht=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd"],Vt=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],Ut=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],jt=[0,1.2,1.8,2.4,3],Gt=[{type:"small",mathstyle:O.SCRIPTSCRIPT},{type:"small",mathstyle:O.SCRIPT},{type:"small",mathstyle:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Zt=[{type:"small",mathstyle:O.SCRIPTSCRIPT},{type:"small",mathstyle:O.SCRIPT},{type:"small",mathstyle:O.TEXT},{type:"stack"}],Xt=[{type:"small",mathstyle:O.SCRIPTSCRIPT},{type:"small",mathstyle:O.SCRIPT},{type:"small",mathstyle:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Jt(t,e,i,s,a,o){if(!e||0===e.length||"."===e)return Yt(t,a,t);let n;"<"===e||"\\lt"===e?e="\\langle":">"!==e&&"\\gt"!==e||(e="\\rangle"),n=Ut.includes(e)?Gt:Ht.includes(e)?Xt:Zt;const r=function(t,e,i,s){for(let o=Math.min(2,3-s.mathstyle.size);o<i.length&&"stack"!==i[o].type;o++){const s=M.getCharacterMetrics(t,"small"===(a=i[o]).type?"Main-Regular":"large"===a.type?"Size"+a.size+"-Regular":"Size4-Regular");if(s.defaultMetrics)return{type:"small",mathstyle:O.SCRIPT};let n=s.height+s.depth;if("small"===i[o].type&&(n*=i[o].mathstyle.sizeMultiplier),n>e)return i[o]}var a;return i[i.length-1]}(Bt.getValue("math",e),i,n,a);return"small"===r.type?function(t,e,i,s,a,o){const n=Ot("AMS-Regular",Bt.getValue("math",e)),r=et.makeStyleWrap(t,n,a.mathstyle,i,o);return s&&r.setTop((1-a.mathstyle.sizeMultiplier/i.sizeMultiplier)*a.mathstyle.metrics.axisHeight),r.setStyle("color",a.color),"number"==typeof a.opacity&&r.setStyle("opacity",a.opacity),r}(t,e,r.mathstyle,s,a,o):"large"===r.type?Nt(t,e,r.size,s,a,o):Wt(t,e,i,s,a,o)}function Yt(t,e,i){return et.makeSpanOfType(t,"","sizing"+e.mathstyle.adjustTo(O.TEXT)+" nulldelimiter "+(i||""))}var Qt={makeSizedDelim:function(t,e,i,s,a){return"."===e?Yt(t,s,a):("<"===e||"\\lt"===e?e="\\langle":">"!==e&&"\\gt"!==e||(e="\\rangle"),Ht.includes(e)||Ut.includes(e)?Nt(t,e,i,!1,s,a):Vt.includes(e)?Wt(t,e,jt[i],!1,s,a):null)},makeCustomSizedDelim:Jt,makeLeftRightDelim:function(t,e,i,s,a,o){if("."===e)return Yt(t,a,o);const n=a.mathstyle.metrics.axisHeight*a.mathstyle.sizeMultiplier,r=5/M.METRICS.ptPerEm;let l=s+n,c=i-n,h=901*(c=Math.max(l,c))/500;return l=2*c-r,Jt(t,e,h=Math.max(h,l),!0,a,o)}};const te=et.makeSpan,ee=et.makeOrd,ie=et.makeInner,se=et.makeHlist,ae=et.makeVlist,oe=/\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5/,ne=/^([A-Za-z]|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)$/,re={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49};class le{constructor(t,e,i,s){this.mode=t,this.type=e,this.body=i,this.applyStyle(s)}getStyle(){return{color:this.phantom?"transparent":this.color,backgroundColor:this.phantom?"transparent":this.backgroundColor,fontFamily:this.baseFontFamily||this.fontFamily||this.autoFontFamily,fontShape:this.fontShape,fontSeries:this.fontSeries,fontSize:this.fontSize,cssId:this.cssId,cssClass:this.cssClass}}applyStyle(t){if(Object.assign(this,t),"none"===this.fontFamily&&(this.fontFamily=""),"auto"===this.fontShape&&(this.fontShape=""),"auto"===this.fontSeries&&(this.fontSeries=""),"none"===this.color&&(this.color=""),"none"===this.backgroundColor&&(this.backgroundColor=""),"auto"===this.fontSize&&(this.fontSize=""),this.fontSize&&(this.maxFontSize=re[this.fontSize]),"math"===this.mode){const t="string"==typeof this.body?this.body:"";this.autoFontFamily="cmr",ne.test(t)?this.autoFontFamily="math":/\\imath|\\jmath|\\pounds/.test(t)?this.autoFontFamily="mainit":oe.test(t)||"math"!==this.baseFontFamily||(this.autoFontFamily="cmr")}else"text"===this.mode&&("root"!==this.type&&(this.type=""),delete this.baseFontFamily,delete this.autoFontFamily)}getInitialBaseElement(){let t=this;return Array.isArray(this.body)&&this.body.length>0&&("first"!==this.body[0].type?t=this.body[0].getInitialBaseElement():this.body[1]&&(t=this.body[1].getInitialBaseElement())),t}getFinalBaseElement(){return Array.isArray(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const t=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(t.type)}forEach(t){if(t(this),Array.isArray(this.body))for(const e of this.body)e&&e.forEach(t);else this.body&&"object"==typeof this.body&&t(this.body);if(this.superscript)for(const e of this.superscript)e&&e.forEach(t);if(this.subscript)for(const e of this.subscript)e&&e.forEach(t);if(this.overscript)for(const e of this.overscript)e&&e.forEach(t);if(this.underscript)for(const e of this.underscript)e&&e.forEach(t);if(this.numer)for(const e of this.numer)e&&e.forEach(t);if(this.denom)for(const e of this.denom)e&&e.forEach(t);if(this.index)for(const e of this.index)e&&e.forEach(t);if(this.array)for(const e of this.array)for(const i of e)for(const e of i)e.forEach(t)}filter(t){let e=[];t(this)&&e.push(this);for(const i of["body","superscript","subscript","overscript","underscript","numer","denom","index"])if(Array.isArray(this[i]))for(const s of this[i])s&&(e=e.concat(s.filter(t)));if(Array.isArray(this.array))for(const i of this.array)for(const s of i)s&&(e=e.concat(s.filter(t)));return e}decomposeGroup(t){const e=t.clone({mathstyle:this.mathstyle}),i=ee(pe(e,this.body));return this.cssId&&(i.cssId=this.cssId),i.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),i}decomposeArray(t){let e=this.colFormat;e&&0===e.length&&(e=[{align:"l"}]),e||(e=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]);const i=[];let s=0;for(const t of e)t.align&&s++;for(const t of this.array){let e=0;for(;e<t.length;){const a=[],o=Math.min(t.length,e+s);for(;e<o;)a.push(t[e++]);i.push(a)}}1===i[i.length-1].length&&0===i[i.length-1][0].length&&i.pop();const a=O.toMathstyle(this.mathstyle)||t.mathstyle,o=(this.arraystretch||1)*S.baselineskip,n=.7*o,r=.3*o;let l=0,c=0;const h=[],d=i.length;for(let e=0;e<d;++e){const s=i[e];c=Math.max(c,s.length);let a=n,o=r;const p=[];for(let e=0;e<s.length;++e){const i=pe(t.clone({mathstyle:this.mathstyle}),s[e])||[],n=[ee(null)].concat(i);o=Math.max(o,et.depth(n)),a=Math.max(a,et.height(n)),p.push(n)}let m=e===d-1?0:this.jot||0;this.rowGaps&&this.rowGaps[e]&&(m=this.rowGaps[e])>0&&(o<(m+=r)&&(o=m),m=0),p.height=a,p.depth=o,l+=a,p.pos=l,l+=o+m,h.push(p)}const p=l/2+a.metrics.axisHeight,m=[];for(let e=0;e<c;e++){const i=[];for(const t of h){const s=t[e];s&&(s.depth=t.depth,s.height=t.height,i.push(s),i.push(t.pos-p))}i.length>0&&m.push(ae(t,i,"individualShift"))}const u=[];let f=!1,g=!1,y=0,b=!this.lFence;for(const i of e){if(i.align&&y>=m.length)break;if(i.align&&y<m.length)f?u.push(ce(2*S.arraycolsep)):(g||b)&&u.push(ce(S.arraycolsep)),u.push(te(m[y],"col-align-"+i.align)),y++,f=!0,g=!1,b=!1;else if(void 0!==i.gap)"number"==typeof i.gap?u.push(ce(i.gap)):u.push(he(t,h,p,i.gap)),f=!1,g=!1,b=!1;else if(i.rule){const e=te(null,"vertical-separator");e.setStyle("height",l,"em"),e.setStyle("margin-top",3*t.mathstyle.metrics.axisHeight-p,"em"),e.setStyle("vertical-align","top");let i=0;g?i=S.doubleRuleSep-S.arrayrulewidth:f&&(i=S.arraycolsep-S.arrayrulewidth),e.setLeft(i,"em"),u.push(e),f=!1,g=!0,b=!1}}if(f&&!this.rFence&&u.push(ce(S.arraycolsep)),!(this.lFence&&"."!==this.lFence||this.rFence&&"."!==this.rFence))return ee(u,"mtable");const x=te(u,"mtable"),k=et.height(x),v=et.depth(x);return ee([this.bind(t,Qt.makeLeftRightDelim("mopen",this.lFence,k,v,t)),x,this.bind(t,Qt.makeLeftRightDelim("mclose",this.rFence,k,v,t))])}decomposeGenfrac(t){const e="auto"===this.mathstyle?t.mathstyle:O.toMathstyle(this.mathstyle),i=t.clone({mathstyle:e});let s=[];this.numerPrefix&&s.push(ee(this.numerPrefix));const a=this.continuousFraction?e:e.fracNum();s=s.concat(pe(i.clone({mathstyle:a}),this.numer));const o=se(s,t.mathstyle.adjustTo(a));let n=[];this.denomPrefix&&n.push(ee(this.denomPrefix));const r=this.continuousFraction?e:e.fracDen();n=n.concat(pe(i.clone({mathstyle:r}),this.denom));const l=se(n,t.mathstyle.adjustTo(r)),c=this.hasBarLine?S.defaultRuleThickness/e.sizeMultiplier:0;let h,d,p;e.size===O.DISPLAY.size?(h=e.metrics.num1,d=c>0?3*c:7*S.defaultRuleThickness,p=e.metrics.denom1):(c>0?(h=e.metrics.num2,d=c):(h=e.metrics.num3,d=3*S.defaultRuleThickness),p=e.metrics.denom2);const m=o?o.depth:0,u=l?l.height:0;let f;if(0===c){const t=h-m-(u-p);t<d&&(h+=.5*(d-t),p+=.5*(d-t)),f=ae(i,[o,-h,l,p],"individualShift")}else{const t=e.metrics.axisHeight;h-m-(t+.5*c)<d&&(h+=d-(h-m-(t+.5*c))),t-.5*c-(u-p)<d&&(p+=d-(t-.5*c-(u-p)));const s=te(null," frac-line");s.applyStyle(this.getStyle()),s.height=c;const a=[];o&&(a.push(o),a.push(-h)),a.push(s),a.push(c/2-t),l&&(a.push(l),a.push(p)),f=ae(i,a,"individualShift")}f.classes+=" mfrac",f.height*=e.sizeMultiplier/t.mathstyle.sizeMultiplier,f.depth*=e.sizeMultiplier/t.mathstyle.sizeMultiplier;const g=e.size===O.DISPLAY.size?e.metrics.delim1:e.metrics.delim2,y=Qt.makeCustomSizedDelim("mopen",this.leftDelim,g,!0,t.clone({mathstyle:e})),b=Qt.makeCustomSizedDelim("mclose",this.rightDelim,g,!0,t.clone({mathstyle:e}));y.applyStyle(this.getStyle()),b.applyStyle(this.getStyle());const x=ee([y,f,b],t.parentSize!==t.size?"sizing reset-"+t.parentSize+" "+t.size:"");return this.bind(t,x)}decomposeLeftright(t){if(!this.body)return this.leftDelim?new le("math","mopen",this.leftDelim).decompose(t):this.rightDelim?new le("math","mclose",this.rightDelim).decompose(t):null;const e=t.clone(),i=pe(e,this.body),s=e.mathstyle;let a=0,o=0,n=[];if(a=et.height(i)*s.sizeMultiplier,o=et.depth(i)*s.sizeMultiplier,this.leftDelim&&(n.push(Qt.makeLeftRightDelim("mopen",this.leftDelim,a,o,e)),n[n.length-1].applyStyle(this.getStyle())),i){for(let t=0;t<i.length;t++)if(i[t].delim){const s=i[t].caret,n=/ML__selected/.test(i[t].classes);i[t]=Qt.makeLeftRightDelim("minner",i[t].delim,a,o,e),i[t].caret=s,i[t].selected(n)}n=n.concat(i)}if(this.rightDelim){let t,i=this.rightDelim;"?"===i&&(i=(i={"(":")","\\{":"\\}","\\[":"\\]","\\lbrace":"\\rbrace","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"}[this.leftDelim])||this.leftDelim,t="ML__smart-fence__close"),n.push(Qt.makeLeftRightDelim("mclose",i,a,o,e,t)),n[n.length-1].applyStyle(this.getStyle())}return this.inner?ie(n,s.cls()):n}decomposeSurd(t){const e=t.mathstyle,i=pe(t.cramp(),this.body),s=S.defaultRuleThickness/e.sizeMultiplier;let a=s;e.id<O.TEXT.id&&(a=e.metrics.xHeight);let o=s+a/4;const n=Math.max(2*a,(et.height(i)+et.depth(i))*e.sizeMultiplier)+(o+s),r=te(Qt.makeCustomSizedDelim("","\\surd",n,!1,t),"sqrt-sign");r.applyStyle(this.getStyle());const l=r.height+r.depth-s;l>et.height(i)+et.depth(i)+o&&(o=(o+l-(et.height(i)+et.depth(i)))/2),r.setTop(r.height-et.height(i)-(o+s));const c=te(null,t.mathstyle.adjustTo(O.TEXT)+" sqrt-line");c.applyStyle(this.getStyle()),c.height=s;const h=ae(t,[i,o,c,s]);if(!this.index)return this.bind(t,ee([r,h],"sqrt"));const d=t.clone({mathstyle:O.SCRIPTSCRIPT}),p=te(pe(d,this.index),e.adjustTo(O.SCRIPTSCRIPT)),m=Math.max(r.height,h.height),u=Math.max(r.depth,h.depth),f=ae(t,[p],"shift",-.6*(m-u));return this.bind(t,ee([te(f,"root"),r,h],"sqrt"))}decomposeAccent(t){const e=t.mathstyle;let i=pe(t.cramp(),this.body);(this.superscript||this.subscript)&&(i=this.attachSupsub(t,ee(i),"mord"));let s=0;Array.isArray(this.body)&&1===this.body.length&&this.body[0].isCharacterBox()&&(s=et.skew(i));const a=Math.min(et.height(i),e.metrics.xHeight),o=et.makeSymbol("Main-Regular",this.accent,"math");o.italic=0;const n="⃗"===this.accent?" accent-vec":"";let r=te(te(o),"accent-body"+n);return(r=ae(t,[i,-a,r])).children[1].setLeft(2*s),ee(r,"accent")}decomposeLine(t){const e=t.mathstyle,i=pe(t.cramp(),this.body),s=S.defaultRuleThickness/e.sizeMultiplier,a=te(null,t.mathstyle.adjustTo(O.TEXT)+" "+this.position+"-line");let o;if(a.height=s,a.maxFontSize=1,"overline"===this.position)o=ae(t,[i,3*s,a,s]);else{const e=te(i);o=ae(t,[s,a,3*s,e],"top",et.height(e))}return ee(o,this.position)}decomposeOverunder(t){const e=pe(t,this.body),i=t.clone({mathstyle:"scriptstyle"}),s=this.overscript?te(pe(i,this.overscript),t.mathstyle.adjustTo(i.mathstyle)):null,a=this.underscript?te(pe(i,this.underscript),t.mathstyle.adjustTo(i.mathstyle)):null;return de(t,e,0,0,s,a,this.mathtype||"mrel")}decomposeOverlap(t){const e=te(pe(t,this.body),"inner");return ee([e,te(null,"fix")],"left"===this.align?"llap":"rlap")}decomposeRule(t){const e=t.mathstyle,i=ee("","rule");let s=this.shift&&!isNaN(this.shift)?this.shift:0;s/=e.sizeMultiplier;const a=this.width/e.sizeMultiplier,o=this.height/e.sizeMultiplier;return i.setStyle("border-right-width",a,"em"),i.setStyle("border-top-width",o,"em"),i.setStyle("margin-top",-(o-s),"em"),i.setStyle("border-color",t.color),i.width=a,i.height=o+s,i.depth=-s,i}decomposeOp(t){const e=t.mathstyle;let i,s=!1;e.size===O.DISPLAY.size&&"string"==typeof this.body&&"\\smallint"!==this.body&&(s=!0);let a=0,o=0;if(this.symbol){const n=s?"Size2-Regular":"Size1-Regular";(i=et.makeSymbol(n,this.body,"op-symbol "+(s?"large-op":"small-op"))).type="mop",a=(i.height-i.depth)/2-e.metrics.axisHeight*e.sizeMultiplier,o=i.italic,this.bind(t,i)}else Array.isArray(this.body)?(i=et.makeOp(pe(t,this.body)),this.bind(t,i)):i=this.makeSpan(t,this.body);if(this.superscript||this.subscript){const s=this.limits||"auto";return this.alwaysHandleSupSub||"limits"===s||"auto"===s&&e.size===O.DISPLAY.size?this.attachLimits(t,i,a,o):this.attachSupsub(t,i,"mop")}return this.symbol&&i.setTop(a),i}decomposeBox(t){const e=ee(pe(t,this.body)),i=te();i.setStyle("position","absolute");const s="number"==typeof this.padding?this.padding:S.fboxsep;i.setStyle("height",e.height+e.depth+2*s,"em"),0!==s?i.setStyle("width","calc(100% + "+2*s+"em)"):i.setStyle("width","100%"),i.setStyle("top",-s,"em"),i.setStyle("left",-s,"em"),i.setStyle("z-index","-1"),this.backgroundcolor&&i.setStyle("background-color",this.backgroundcolor),this.framecolor&&i.setStyle("border",S.fboxrule+"em solid "+this.framecolor),this.border&&i.setStyle("border",this.border),e.setStyle("display","inline-block"),e.setStyle("height",e.height+e.depth,"em"),e.setStyle("vertical-align",-e.depth+s,"em");const a=te([i,e]);return a.setStyle("position","relative"),a.setStyle("vertical-align",-s+e.depth,"em"),a.height=e.height+s,a.depth=e.depth+s,a.setLeft(s),a.setRight(s),a}decomposeEnclose(t){const e=ee(pe(t,this.body)),i="auto"===this.padding?.2:this.padding;e.setStyle("padding",i,"em"),e.setStyle("display","inline-block"),e.setStyle("height",e.height+e.depth,"em"),e.setStyle("left",-i,"em"),this.backgroundcolor&&"transparent"!==this.backgroundcolor&&e.setStyle("background-color",this.backgroundcolor);let s="";if(this.notation.box&&e.setStyle("border",this.borderStyle),this.notation.actuarial&&(e.setStyle("border-top",this.borderStyle),e.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(e.setStyle("border-bottom",this.borderStyle),e.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(e.setStyle("border-radius",(et.height(e)+et.depth(e))/2,"em"),e.setStyle("border",this.borderStyle)),this.notation.circle&&(e.setStyle("border-radius","50%"),e.setStyle("border",this.borderStyle)),this.notation.top&&e.setStyle("border-top",this.borderStyle),this.notation.left&&e.setStyle("border-left",this.borderStyle),this.notation.right&&e.setStyle("border-right",this.borderStyle),this.notation.bottom&&e.setStyle("border-bottom",this.borderStyle),this.notation.horizontalstrike&&(s+='<line x1="3%" y1="50%" x2="97%" y2="50%"',s+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,s+=' stroke-linecap="round"',this.svgStrokeStyle&&(s+=` stroke-dasharray="${this.svgStrokeStyle}"`),s+="/>"),this.notation.verticalstrike&&(s+='<line x1="50%" y1="3%" x2="50%" y2="97%"',s+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,s+=' stroke-linecap="round"',this.svgStrokeStyle&&(s+=` stroke-dasharray="${this.svgStrokeStyle}"`),s+="/>"),this.notation.updiagonalstrike&&(s+='<line x1="3%" y1="97%" x2="97%" y2="3%"',s+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,s+=' stroke-linecap="round"',this.svgStrokeStyle&&(s+=` stroke-dasharray="${this.svgStrokeStyle}"`),s+="/>"),this.notation.downdiagonalstrike&&(s+='<line x1="3%" y1="3%" x2="97%" y2="97%"',s+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,s+=' stroke-linecap="round"',this.svgStrokeStyle&&(s+=` stroke-dasharray="${this.svgStrokeStyle}"`),s+="/>"),s){let t;return"none"!==this.shadow&&(t="auto"===this.shadow?"filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)":"filter: drop-shadow("+this.shadow+")"),et.makeSVG(e,s,t)}return e}decompose(t,e){let i=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type))(i="string"==typeof this.body?this.makeSpan(t,this.body):this.makeSpan(t,pe(t,this.body))).type=this.type;else if("group"===this.type||"root"===this.type)i=this.decomposeGroup(t);else if("array"===this.type)i=this.decomposeArray(t);else if("genfrac"===this.type)i=this.decomposeGenfrac(t);else if("surd"===this.type)i=this.decomposeSurd(t);else if("accent"===this.type)i=this.decomposeAccent(t);else if("leftright"===this.type)i=this.decomposeLeftright(t);else if("delim"===this.type)(i=te(null,"")).delim=this.delim;else if("sizeddelim"===this.type)i=this.bind(t,Qt.makeSizedDelim(this.cls,this.delim,this.size,t));else if("line"===this.type)i=this.decomposeLine(t);else if("overunder"===this.type)i=this.decomposeOverunder(t);else if("overlap"===this.type)i=this.decomposeOverlap(t);else if("rule"===this.type)i=this.decomposeRule(t);else if("styling"===this.type);else if("msubsup"===this.type)i=ee("​"),e&&(i.height=e[0].height,i.depth=e[0].depth);else if("mop"===this.type)i=this.decomposeOp(t);else if("space"===this.type)i=this.makeSpan(t," ");else if("spacing"===this.type)if("​"===this.body)i=this.makeSpan(t,"​");else if(" "===this.body)i="math"===this.mode?this.makeSpan(t," "):this.makeSpan(t," ");else if(this.width)i=te("​","mspace "),this.width>0?i.setWidth(this.width):i.setStyle("margin-left",this.width,"em");else{const t={qquad:"qquad",quad:"quad",enspace:"enspace",";":"thickspace",":":"mediumspace",",":"thinspace","!":"negativethinspace"}[this.body]||"quad";i=te("​","mspace "+t)}else"mathstyle"===this.type?t.setMathstyle(this.mathstyle):"box"===this.type?i=this.decomposeBox(t):"enclose"===this.type?i=this.decomposeEnclose(t):"command"===this.type||"error"===this.type?((i=this.makeSpan(t,this.body)).classes="",this.error&&(i.classes+=" ML__error"),this.suggestion&&(i.classes+=" ML__suggestion")):"placeholder"===this.type?i=this.makeSpan(t,"⬚"):"first"===this.type&&(i=this.makeSpan(t,"​"));if(!i)return i;if(this.caret&&"styling"!==this.type&&"msubsup"!==this.type&&"command"!==this.type&&"placeholder"!==this.type&&"first"!==this.type&&(Array.isArray(i)?i[i.length-1].caret=this.caret:i.caret=this.caret),!this.limits&&(this.superscript||this.subscript))if(Array.isArray(i)){const e=i[i.length-1];i[i.length-1]=this.attachSupsub(t,e,e.type)}else i=[this.attachSupsub(t,i,i.type)];return Array.isArray(i)?i:[i]}attachSupsub(t,e,i){if(!this.superscript&&!this.subscript)return e;const s=t.mathstyle;let a=null,o=null;if(this.superscript){const e=pe(t.sup(),this.superscript);a=te(e,s.adjustTo(s.sup()))}if(this.subscript){const e=pe(t.sub(),this.subscript);o=te(e,s.adjustTo(s.sub()))}let n,r=0,l=0;this.isCharacterBox()||(r=et.height(e)-s.metrics.supDrop,l=et.depth(e)+s.metrics.subDrop),n=s===O.DISPLAY?s.metrics.sup1:s.cramped?s.metrics.sup3:s.metrics.sup2;const c=O.TEXT.sizeMultiplier*s.sizeMultiplier,h=.5/S.ptPerEm/c;let d=null;if(o&&a){r=Math.max(r,n,a.depth+.25*s.metrics.xHeight),l=Math.max(l,s.metrics.sub2);const i=S.defaultRuleThickness;if(r-et.depth(a)-(et.height(o)-l)<4*i){l=4*i-(r-a.depth)+et.height(o);const t=.8*s.metrics.xHeight-(r-et.depth(a));t>0&&(r+=t,l-=t)}d=ae(t,[o,l,a,-r],"individualShift"),this.symbol&&d.children[0].setLeft(-et.italic(e))}else o&&!a?(l=Math.max(l,s.metrics.sub1,et.height(o)-.8*s.metrics.xHeight),(d=ae(t,[o],"shift",l)).children[0].setRight(h),this.isCharacterBox()&&d.children[0].setLeft(-et.italic(e))):!o&&a&&(r=Math.max(r,n,a.depth+.25*s.metrics.xHeight),(d=ae(t,[a],"shift",-r)).children[0].setRight(h));const p=te(d,"msubsup");return this.caret&&(p.caret=this.caret),et.makeSpanOfType(i,[e,p])}attachLimits(t,e,i,s){const a=this.superscript?te(pe(t.sup(),this.superscript),t.mathstyle.adjustTo(t.mathstyle.sup())):null,o=this.subscript?te(pe(t.sub(),this.subscript),t.mathstyle.adjustTo(t.mathstyle.sub())):null;return de(t,e,i,s,a,o,"mop")}bind(t,e){return"first"!==this.type&&"​"!==this.body&&(this.id=function(t){let e;return"boolean"==typeof t.generateID&&t.generateID?e=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36):"boolean"!=typeof t.generateID&&(t.generateID.overrideID?e=t.generateID.overrideID:(e=t.generateID.seed.toString(36),t.generateID.seed+=1)),e}(t),this.id&&(e.attributes||(e.attributes={}),e.attributes["data-atom-id"]=this.id)),e}makeSpan(t,e){const i="textord"===this.type?"mord":this.type,s=et.makeSpanOfType(i,e),a=this.getStyle();s.applyStyle(a);const o=a&&a.fontSize?a.fontSize:"size5";return o!==t.parentSize?(s.classes+=" sizing reset-"+t.parentSize,s.classes+=" "+o):t.parentSize!==t.size&&(s.classes+=" sizing reset-"+t.parentSize,s.classes+=" "+t.size),s.maxFontSize=Math.max(s.maxFontSize,t.sizeMultiplier||1),"text"===this.mode&&(s.classes+=" ML__text"),t.mathstyle.isTight()&&(s.isTight=!0),"math"!==this.mode&&(s.italic=0),s.setRight(s.italic),"number"==typeof t.opacity&&s.setStyle("opacity",t.opacity),this.bind(t,s),this.caret&&(this.superscript||this.subscript||(s.caret=this.caret,t.mathstyle.isTight()&&(s.isTight=!0))),s}}function ce(t){const e=te("​","arraycolsep");return e.setWidth(t,"em"),e}function he(t,e,i,s){const a=[];for(const o of e){const e=te(pe(t,s));e.depth=o.depth,e.height=o.height,a.push(e),a.push(o.pos-i)}return ae(t,a,"individualShift")}function de(t,e,i,s,a,o,n){if(!a&&!o)return e;e=te(e);let r=0,l=0;a&&(r=Math.max(S.bigOpSpacing1,S.bigOpSpacing3-a.depth)),o&&(l=Math.max(S.bigOpSpacing2,S.bigOpSpacing4-o.height));let c=null;if(o&&a){const n=S.bigOpSpacing5+et.height(o)+et.depth(o)+l+et.depth(e)+i;(c=ae(t,[S.bigOpSpacing5,o,l,e,r,a,S.bigOpSpacing5],"bottom",n)).children[0].setLeft(-s),c.children[2].setLeft(s)}else if(o&&!a){const a=et.height(e)-i;(c=ae(t,[S.bigOpSpacing5,o,l,e],"top",a)).children[0].setLeft(-s)}else if(!o&&a){const o=et.depth(e)+i;(c=ae(t,[e,r,a,S.bigOpSpacing5],"bottom",o)).children[1].setLeft(s)}return et.makeSpanOfType(n,c,"op-limits")}function pe(t,e){t instanceof K.Context||(t=new K.Context(t));const i=!t.generateID||!t.generateID.groupNumbers;let s=[];if(Array.isArray(e)){if(0===e.length)return s;if(1===e.length)(s=e[0].decompose(t))&&i&&e[0].isSelected&&s.forEach(t=>t.selected(!0));else{let a="none",o=e[1].type,n=[],r=null,l=null;for(let c=0;c<e.length;c++){"mbin"===e[c].type&&(/first|none|mrel|mpunct|mopen|mbin|mop/.test(a)||/none|mrel|mpunct|mclose/.test(o))&&(e[c].type="mord"),"​"===e[c].body&&(e[c].superscript||e[c].subscript)||(l=null),t.generateID.groupNumbers&&r&&"mord"===e[c].type&&/[0-9,.]/.test(e[c].latex)&&(t.generateID.overrideID=r);const h=e[c].decompose(t,l);if(t.generateID&&(t.generateID.overrideID=null),h){const a=[].concat.apply([],h);l=a,t.generateID&&t.generateID.groupNumbers&&("mord"===e[c].type&&/[0-9,.]/.test(e[c].latex)&&(r||(r=e[c].id)),("mord"!==e[c].type||/[0-9,.]/.test(e[c].latex)||e[c].superscript||e[c].subscript)&&r&&(r=null)),i&&e[c].isSelected?(n=n.concat(a)).forEach(t=>t.selected(!0)):(n.length>0&&(s=[...s,...n],n=[]),s=s.concat(a))}a=e[c].getFinalBaseElement().type,o=e[c+1]?e[c+1].getInitialBaseElement().type:"none"}n.length>0&&(s=[...s,...n],n=[])}}else e&&(s=e.decompose(t))&&i&&e.isSelected&&s.forEach(t=>t.selected(!0));if(!s||0===s.length)return null;if(t.mathstyle!==t.parentMathstyle){const e=t.mathstyle.sizeMultiplier/t.parentMathstyle.sizeMultiplier;for(const t of s)t.height*=e,t.depth*=e}if(t.size!==t.parentSize){const e=re[t.size]/re[t.parentSize];for(const t of s)t.height*=e,t.depth*=e}return s}var me={MathAtom:le,decompose:pe,makeRoot:function(t,e){const i=new le(t=t||"math","root",e||[]);return 0!==i.body.length&&"first"===i.body[0].type||i.body.unshift(new le("","first")),i},GREEK_REGEX:oe};const ue={m0:"#3f3d99",m1:"#993d71",m2:"#998b3d",m3:"#3d9956",m4:"#3d5a99",m5:"#993d90",m6:"#996d3d",m7:"#43993d",m8:"#3d7999",m9:"#843d99"},fe={apricot:"#FBB982",aquamarine:"#00B5BE",bittersweet:"#C04F17",black:"#221E1F",blue:"#2D2F92",bluegreen:"#00B3B8",blueviolet:"#473992",brickred:"#B6321C",brown:"#792500",burntorange:"#F7921D",cadetblue:"#74729A",carnationpink:"#F282B4",cerulean:"#00A2E3",cornflowerblue:"#41B0E4",cyan:"#00AEEF",dandelion:"#FDBC42",darkorchid:"#A4538A",emerald:"#00A99D",forestgreen:"#009B55",fuchsia:"#8C368C",goldenrod:"#FFDF42",gray:"#949698",green:"#00A64F",greenyellow:"#DFE674",junglegreen:"#00A99A",lavender:"#F49EC4",limegreen:"#8DC73E",magenta:"#EC008C",mahogany:"#A9341F",maroon:"#AF3235",melon:"#F89E7B",midnightblue:"#006795",mulberry:"#A93C93",navyblue:"#006EB8",olivegreen:"#3C8031",orange:"#F58137",orangered:"#ED135A",orchid:"#AF72B0",peach:"#F7965A",periwinkle:"#7977B8",pinegreen:"#008B72",plum:"#92268F",processblue:"#00B0F0",purple:"#99479B",rawsienna:"#974006",red:"#ED1B23",redorange:"#F26035",redviolet:"#A1246B",rhodamine:"#EF559F",royalblue:"#0071BC",royalpurple:"#613F99",rubinered:"#ED017D",salmon:"#F69289",seagreen:"#3FBC9D",sepia:"#671800",skyblue:"#46C5DD",springgreen:"#C6DC67",tan:"#DA9D76",tealblue:"#00AEB3",thistle:"#D883B7",turquoise:"#00B4CE",violet:"#58429B",violetred:"#EF58A0",white:"#FFFFFF",wildstrawberry:"#EE2967",yellow:"#FFF200",yellowgreen:"#98CC70",yelloworange:"#FAA21A"};var ge={stringToColor:function(t){const e=t.toLowerCase().split("!");let i,s,a,o=255,n=255,r=255,l=-1;const c=e.length>0&&"-"===e[0].charAt(0);c&&(e[0]=e[0].slice(1));for(let t=0;t<e.length;t++){i=o,s=n,a=r;let c=e[t].match(/([a-z0-9]*)/);c&&(c=c[1]);let h=fe[c]||ue[c];h||(h=e[t]);let d=h.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(d&&d[1]&&d[2]&&d[3])o=Math.max(0,Math.min(255,parseInt(d[1],16))),n=Math.max(0,Math.min(255,parseInt(d[2],16))),r=Math.max(0,Math.min(255,parseInt(d[3],16)));else if((d=h.match(/^#([0-9a-f]{3})$/i))&&d[1]){const t=parseInt(d[1][0],16),e=parseInt(d[1][1],16),i=parseInt(d[1][2],16);o=Math.max(0,Math.min(255,16*t+t)),n=Math.max(0,Math.min(255,16*e+e)),r=Math.max(0,Math.min(255,16*i+i))}else{if(!((d=h.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i))&&d[1]&&d[2]&&d[3]))return null;o=Math.max(0,Math.min(255,parseInt(d[1]))),n=Math.max(0,Math.min(255,parseInt(d[2]))),r=Math.max(0,Math.min(255,parseInt(d[3])))}l>=0&&(o=(1-l)*o+l*i,n=(1-l)*n+l*s,r=(1-l)*r+l*a,l=-1),t+1<e.length&&(l=Math.max(0,Math.min(100,parseInt(e[++t])))/100)}return l>=0&&(o=l*o+(1-l)*i,n=l*n+(1-l)*s,r=l*r+(1-l)*a),c&&(o=255-o,n=255-n,r=255-r),"#"+("00"+Math.round(o).toString(16)).slice(-2)+("00"+Math.round(n).toString(16)).slice(-2)+("00"+Math.round(r).toString(16)).slice(-2)},colorToString:function(t){let e=t.toUpperCase();for(const t in fe)if(fe[t]===e){e=t;break}for(const t in ue)if(ue[t]===e){e=t;break}return e},AREA_COLORS:["#d35d60","#7293cb","#e1974d","#84bb5d","#9066a7","#aD6a58","#f5a4ce","#fff590","#212121","#818787","#d4d5d2","#ffffff"],LINE_COLORS:["#cc2428","#3769b1","#da7e30","#409852","#6b4c9a","#922426","#e7298a","#ffe907","#000000","#525055","#adafaa","#ffffff"]};const ye=me.MathAtom;class be{constructor(t,e,i){this.tokens=t,this.index=0,this.args=e,this.macros=i,this.mathList=[],this.style={},this.parseMode="math",this.tabularMode=!1,this.endCount=0}swapMathList(t){const e=this.mathList;return this.mathList=t||[],e}swapParseMode(t){const e=this.parseMode;return this.parseMode=t,e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:null}peek(t){const e=this.index+(t||0);return e<this.tokens.length?this.tokens[e]:null}lastMathAtom(){const t=0===this.mathList.length?"none":this.mathList[this.mathList.length-1].type;if("mop"!==t&&"msubsup"!==t){const t=new ye(this.parseMode,"msubsup","​");t.attributes={"aria-hidden":!0},this.mathList.push(t)}return this.mathList[this.mathList.length-1]}hasToken(t){const e=this.index;return e<this.tokens.length&&this.tokens[e].type===t}hasLiteral(t){const e=this.index;return e<this.tokens.length&&"literal"===this.tokens[e].type&&(!t||this.tokens[e].value===t)}hasLiteralPattern(t){return this.hasToken("literal")&&t.test(this.tokens[this.index].value)}hasCommand(t){const e=this.index;return e<this.tokens.length&&"command"===this.tokens[e].type&&this.tokens[e].value===t}hasInfixCommand(){const t=this.index;if(t<this.tokens.length&&"command"===this.tokens[t].type){const e=Bt.getInfo("\\"+this.tokens[t].value,this.parseMode,this.macros);return e&&e.infix}return!1}hasColumnSeparator(){const t=this.index;return!!(this.tabularMode&&t<this.tokens.length)&&"literal"===this.tokens[t].type&&"&"===this.tokens[t].value}hasRowSeparator(){const t=this.index;return!!(this.tabularMode&&t<this.tokens.length)&&"command"===this.tokens[t].type&&("\\"===this.tokens[t].value||"cr"===this.tokens[t].value)}parseColumnSeparator(){return!!this.hasColumnSeparator()&&(this.index++,!0)}placeholder(){if(this.args&&"string"==typeof this.args["?"])return xe(x.tokenize(this.args["?"]),this.parseMode,null,this.macros);const t=new ye(this.parseMode,"placeholder","?",this.style);return t.captureSelection=!0,[t]}hasImplicitCommand(t){if(this.index<this.tokens.length){const e=this.tokens[this.index];if("command"===e.type)return t.includes(e.value)}return!1}parseRowSeparator(){return!!this.hasRowSeparator()&&(this.index++,!0)}parseToken(t){return!!this.hasToken(t)&&(this.index++,!0)}skipWhitespace(){let t=!1;for(;this.hasToken("space");)this.index++,t=!0;return t}skipUntilToken(t){for(;!this.end()&&!this.parseToken(t);)this.get()}parseCommand(t){return!!this.hasCommand(t)&&(this.index++,!0)}parseLiteral(t){return!!this.hasLiteral(t)&&(this.index++,!0)}parseFiller(){let t=!1,e=!1;do{const i=this.skipWhitespace(),s=this.parseCommand("relax");t=t||i||s,e=!i&&!s}while(!e);return t}parseKeyword(t){const e=this.index;let i=this.end(),s="";for(;!i;){const e=this.get();"literal"===e.type&&(s+=e.value),i=this.end()||"literal"!==e.type||s.length>=t.length}const a=t.toUpperCase()===s.toUpperCase();return a||(this.index=e),a}scanString(){let t="",e=this.end();for(;!e;){if(this.hasLiteral("]"))e=!0;else if(this.hasToken("literal"))t+=this.get().value;else if(this.skipWhitespace())t+=" ";else if(this.hasToken("command")){const e=this.get();"space"===e.value?t+=" ":t+=e.value}else e=!0;e=e||this.end()}return t}scanColor(){return ge.stringToColor(this.scanString())}scanNumber(t){const e=this.parseLiteral("-");e||this.parseLiteral("+"),this.skipWhitespace(),t=!!t;let i=10,s=/[0-9]/;this.parseLiteral("'")?(i=8,s=/[0-7]/,t=!0):(this.parseLiteral('"')||this.parseLiteral("x"))&&(i=16,s=/[0-9A-F]/,t=!0);let a="";for(;this.hasLiteralPattern(s);)a+=this.get().value;if(!t&&(this.parseLiteral(".")||this.parseLiteral(",")))for(a+=".";this.hasLiteralPattern(s);)a+=this.get().value;const o=t?parseInt(a,i):parseFloat(a);return e?-o:o}scanDimen(){const t=this.scanNumber(!1);return this.skipWhitespace(),this.parseKeyword("pt")?M.toEm(t,"pt"):this.parseKeyword("mm")?M.toEm(t,"mm"):this.parseKeyword("cm")?M.toEm(t,"cm"):this.parseKeyword("ex")?M.toEm(t,"ex"):this.parseKeyword("px")?M.toEm(t,"px"):this.parseKeyword("em")?M.toEm(t,"em"):this.parseKeyword("bp")?M.toEm(t,"bp"):this.parseKeyword("dd")?M.toEm(t,"dd"):this.parseKeyword("pc")?M.toEm(t,"pc"):this.parseKeyword("in")?M.toEm(t,"in"):this.parseKeyword("mu")?M.toEm(t,"mu"):M.toEm(t,"pt")}scanSkip(){const t=this.scanDimen();return this.skipWhitespace(),this.parseKeyword("plus")&&this.scanDimen(),this.skipWhitespace(),this.parseKeyword("minus")&&this.scanDimen(),t}scanColspec(){this.skipWhitespace();const t=[];for(;!this.end()&&!this.hasToken("}")&&!this.hasLiteral("]");)if(this.hasLiteral()){const e=this.get().value;if("lcr".includes(e))t.push({align:e});else if("|"===e)t.push({rule:!0});else if("@"===e){if(this.parseToken("{")){const e=this.swapParseMode("math");t.push({gap:this.scanImplicitGroup(t=>"}"===t.type)}),this.swapParseMode(e)}this.parseToken("}")}}return t}scanModeSet(){let t;if(this.parseCommand("(")&&(t=")"),!t&&this.parseCommand("[")&&(t="]"),!t)return null;const e=this.swapParseMode("math"),i=new ye("math","group");return i.mathstyle=")"===t?"textstyle":"displaystyle",i.body=this.scanImplicitGroup(e=>"command"===e.type&&e.value===t),this.parseCommand(t),this.swapParseMode(e),i.body&&0!==i.body.length?i:null}scanModeShift(){if(!this.hasToken("$")&&!this.hasToken("$$"))return null;const t=this.get().type,e=new ye("math","group");e.mathstyle="$"===t?"textstyle":"displaystyle",e.latexOpen="textstyle"===e.mathstyle?"$":"$$",e.latexClose=e.latexOpen;const i=this.swapParseMode("math");return e.body=this.scanImplicitGroup(e=>e.type===t),this.parseToken(t),this.swapParseMode(i),e.body&&0!==e.body.length?e:null}scanEnvironment(){if(!this.parseCommand("begin"))return null;const t=this.scanArg("string"),e=Bt.getEnvironmentInfo(t),i=[];if(e&&e.params)for(const t of e.params)if(t.optional){const e=this.scanOptionalArg(t.type);i.push(e)}else i.push(this.scanArg(t.type));const s=this.parseMode,a=this.tabularMode,o=this.swapMathList([]);this.tabularMode=e.tabular;const n=[],r=[];let l=[],c=!1;do{if(!(c=this.end())&&this.parseCommand("end")&&(c=this.scanArg("string")===t),!c)if(this.parseColumnSeparator())l.push(this.swapMathList([]));else if(this.parseRowSeparator()){l.push(this.swapMathList([]));let t=0;this.skipWhitespace(),this.parseLiteral("[")&&(t=this.scanDimen(),this.skipWhitespace(),this.parseLiteral("]")),r.push(t||0),n.push(l),l=[]}else this.mathList=this.mathList.concat(this.scanImplicitGroup())}while(!c);l.push(this.swapMathList([])),l.length>0&&n.push(l);const h=this.swapMathList(o);if(this.parseMode=s,this.tabularMode=a,!e.tabular&&0===h.length)return null;if(e.tabular&&0===n.length)return null;const d=new ye(this.parseMode,"array",h,e.parser?e.parser(t,i,n):{});return d.array=n,d.rowGaps=r,d.env={...e},d.env.name=t,d}scanImplicitGroup(t){const e=this.style;t||(t=t=>"}"===t.type||"literal"===t.type&&"&"===t.value||"command"===t.type&&/^(end|cr|\\)$/.test(t.value));let i=null,s=null;const a=this.swapMathList([]);for(;!this.end()&&!t(this.peek());)if(this.hasImplicitCommand(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"])){this.parseMode="math";const t=new ye("math","mathstyle");t.mathstyle=this.get().value,this.mathList.push(t)}else this.hasInfixCommand()&&!i?(i=this.get(),s=this.swapMathList([])):this.parseAtom();let o;if(i){const t=this.swapMathList(a),e=Bt.getInfo("\\"+i.value,"math",this.macros);o=e?[new ye(this.parseMode,e.type,e.value||i.value,e.parse?e.parse("\\"+i.value,[s,t]):null)]:[new ye(this.parseMode,"mop",i.value)]}else o=this.swapMathList(a);return this.style=e,o}scanGroup(){if(!this.parseToken("{"))return null;const t=new ye(this.parseMode,"group");return t.body=this.scanImplicitGroup(t=>"}"===t.type),this.parseToken("}"),t.latexOpen="{",t.latexClose="}",t}scanSmartFence(){if(this.skipWhitespace(),!this.parseLiteral("("))return null;const t=new ye(this.parseMode,"leftright");t.leftDelim="(",t.inner=!1;const e=this.swapMathList([]);let i=1;for(;!this.end()&&0!==i;)this.hasLiteral("(")&&(i+=1),this.hasLiteral(")")&&(i-=1),0!==i&&this.parseAtom();return 0===i&&this.parseLiteral(")"),t.rightDelim=0===i?")":"?",t.body=this.swapMathList(e),t}scanDelim(){this.skipWhitespace();const t=this.get();if(!t)return null;let e=".";"command"===t.type?e="\\"+t.value:"literal"===t.type&&(e=t.value);const i=Bt.getInfo(e,"math",this.macros);return i?"mopen"===i.type||"mclose"===i.type?e:/^(\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:null:null}scanLeftRight(){if(this.parseCommand("right")||this.parseCommand("mright")){const t=new ye(this.parseMode,"leftright");return t.rightDelim=this.scanDelim()||".",t}const t=this.style;let e="right";if(!this.parseCommand("left")){if(!this.parseCommand("mleft"))return null;e="mright"}const i=this.scanDelim()||".",s=this.swapMathList([]);for(;!this.end()&&!this.parseCommand(e);)this.parseAtom();this.style=t;const a=this.scanDelim(),o=new ye(this.parseMode,"leftright");return o.leftDelim=i,o.rightDelim=a,o.inner="right"===e,o.body=this.swapMathList(s),o}parseSupSub(){if("math"!==this.parseMode)return!1;let t=!1;for(;this.hasLiteral("^")||this.hasLiteral("_")||this.hasLiteral("'");){let e;if(this.hasLiteral("^")?e="superscript":this.hasLiteral("_")&&(e="subscript"),this.parseLiteral("^")||this.parseLiteral("_")){const i=this.scanArg();if(i){const s=this.lastMathAtom();s[e]=s[e]||[],s[e]=s[e].concat(i),t=!0}}else if(this.parseLiteral("'")){const e=this.lastMathAtom();e.superscript=e.superscript||[],e.superscript.push(new ye(e.parseMode,"mord","′")),t=!0}}return t}parseLimits(){if(this.parseCommand("limits")){const t=this.lastMathAtom();return t.limits="limits",t.explicitLimits=!0,!0}if(this.parseCommand("nolimits")){const t=this.lastMathAtom();return t.limits="nolimits",t.explicitLimits=!0,!0}return!1}scanOptionalArg(t){if(t=t&&"auto"!==t?t:this.parseMode,this.skipWhitespace(),!this.parseLiteral("["))return null;const e=this.parseMode;this.parseMode=t;const i=this.swapMathList();let s;for(;!this.end()&&!this.parseLiteral("]");)if("string"===t)s=this.scanString();else if("number"===t)s=this.scanNumber();else if("dimen"===t)s=this.scanDimen();else if("skip"===t)s=this.scanSkip();else if("colspec"===t)s=this.scanColspec();else if("color"===t)s=this.scanColor()||"#ffffff";else if("bbox"===t){const t=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const e of t){const t=ge.stringToColor(e);if(t)(s=s||{}).backgroundcolor=t;else{const t=e.match(/^\s*([0-9.]+)\s*([a-z][a-z])/);if(t)(s=s||{}).padding=M.toEm(t[1],t[2]);else{const t=e.match(/^\s*border\s*:\s*(.*)/);t&&((s=s||{}).border=t[1])}}}}else this.mathList=this.mathList.concat(this.scanImplicitGroup(t=>"literal"===t.type&&"]"===t.value));this.parseMode=e;const a=this.swapMathList(i);return s||a}scanArg(t){let e;if(t=t&&"auto"!==t?t:this.parseMode,this.parseFiller(),!this.parseToken("{")){if("delim"===t)return this.scanDelim()||".";if(/^(math|text)$/.test(t)){const e=this.parseMode;this.parseMode=t;const i=this.scanToken();return this.parseMode=e,Array.isArray(i)?i:i?[i]:null}}if(this.hasToken("#")){const t=this.get();return this.skipUntilToken("}"),"?"===t.value?this.placeholder():this.args?void 0===this.args[t.value]&&void 0!==this.args["?"]?this.placeholder():this.args[t.value]||null:null}const i=this.parseMode;this.parseMode=t;const s=this.swapMathList([]);if("string"===t)e=this.scanString(),this.skipUntilToken("}");else if("number"===t)e=this.scanNumber(),this.skipUntilToken("}");else if("dimen"===t)e=this.scanDimen(),this.skipUntilToken("}");else if("skip"===t)e=this.scanSkip(),this.skipUntilToken("}");else if("colspec"===t)e=this.scanColspec(),this.skipUntilToken("}");else if("color"===t)e=this.scanColor()||"#ffffff",this.skipUntilToken("}");else if("delim"===t)e=this.scanDelim()||".",this.skipUntilToken("}");else do{this.mathList=this.mathList.concat(this.scanImplicitGroup())}while(!this.parseToken("}")&&!this.end());this.parseMode=i;const a=this.swapMathList(s);return e||a}scanToken(){const t=this.get();if(!t)return null;let e=null;if("space"===t.type)"text"===this.parseMode&&(e=new ye("text",""," ",this.style));else if("placeholder"===t.type)(e=new ye(this.parseMode,"placeholder",t.value)).captureSelection=!0;else if("command"===t.type){if("placeholder"===t.value)(e=new ye(this.parseMode,"placeholder",this.scanArg("string"),this.style)).captureSelection=!0;else if("char"===t.value){let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),(e=new ye(this.parseMode,"math"===this.parseMode?"mord":"",String.fromCodePoint(t))).latex='{\\char"'+("000000"+t.toString(16)).toUpperCase().substr(-6)+"}"}else if("hskip"===t.value||"kern"===t.value){const i=this.scanSkip();isFinite(i)&&((e=new ye(this.parseMode,"spacing",null,this.style)).width=i),e.latex="\\"+t.value}else if(!(e=this.scanMacro(t.value))){const i=Bt.getInfo("\\"+t.value,this.parseMode,this.macros),s=[];let a="",o="";if(i&&i.params)for(const t of i.params)if(t.optional){const e=this.scanOptionalArg(t.type);s.push(e)}else if(t.type.endsWith("*"))o=t.type.slice(0,-1);else{const e=this.scanArg(t.type);if(e&&1===e.length&&"placeholder"===e[0].type&&t.placeholder&&(e[0].value=t.placeholder),e)s.push(e);else if(t.placeholder){const e=new ye(this.parseMode,"placeholder",t.placeholder);e.captureSelection=!0,s.push([e])}else s.push(this.placeholder());"math"!==t.type&&"string"==typeof e&&(a+=e)}if(i&&!i.infix){if(i.parse){const a=i.parse("\\"+t.value,s);if(a.type)e=new ye(this.parseMode,i.type,o?this.scanArg(o):null,{...this.style,...a});else{const t=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),o){const t=this.style;this.style={...this.style,...a},e=this.scanArg(o),this.style=t}else this.style={...this.style,...a};this.parseMode=t}}else{const s={...this.style};i.baseFontFamily&&(s.baseFontFamily=i.baseFontFamily),e=new ye(this.parseMode,i.type||"mop",i.value||t.value,s),i.skipBoundary&&(e.skipBoundary=!0)}if(e&&!/^(llap|rlap|class|cssId)$/.test(t.value)&&(e.latex="\\"+t.value,a&&(e.latex+="{"+a+"}"),e.isFunction&&this.smartFence)){const t=this.scanSmartFence();t&&(e=[e,t])}}i||((e=new ye(this.parseMode,"error","\\"+t.value)).latex="\\"+t.value)}}else if("literal"===t.type){const i=Bt.getInfo(t.value,this.parseMode,this.macros);if(i){const s={...this.style};i.baseFontFamily&&(s.baseFontFamily=i.baseFontFamily),e=new ye(this.parseMode,i.type,i.value||t.value,s),i.isFunction&&(e.isFunction=!0)}else e=new ye(this.parseMode,"math"===this.parseMode?"mord":"",t.value,this.style);if(e.latex=Bt.matchCodepoint(this.parseMode,t.value.codePointAt(0)),i&&i.isFunction&&this.smartFence){const t=this.scanSmartFence();t&&(e=[e,t])}}else if("#"===t.type)if("?"===t.value)e=this.placeholder();else if(this.args)if(e=this.args[t.value]||null,Array.isArray(e)&&1===e.length)e=e[0];else if(Array.isArray(e)){const t=new ye(this.parseMode,"group");t.body=e,e=t}else e=this.placeholder();return e}scanMacro(t){if(!this.macros||!this.macros[t])return null;const e={};let i,s=0;"string"==typeof this.macros[t]?(i=this.macros[t],/(^|[^\\])#1/.test(i)&&(s=1),/(^|[^\\])#2/.test(i)&&(s=2),/(^|[^\\])#3/.test(i)&&(s=3),/(^|[^\\])#4/.test(i)&&(s=4),/(^|[^\\])#5/.test(i)&&(s=5),/(^|[^\\])#6/.test(i)&&(s=6),/(^|[^\\])#7/.test(i)&&(s=7),/(^|[^\\])#8/.test(i)&&(s=8),/(^|[^\\])#9/.test(i)&&(s=9)):(i=this.macros[t].def,s=this.macros[t].args||0);for(let t=1;t<=s;t++)e[t]=this.scanArg();this.args&&"string"==typeof this.args["?"]&&(e["?"]=this.args["?"]);const a=new ye(this.parseMode,"group",xe(x.tokenize(i),this.parseMode,e,this.macros));a.captureSelection=!0,a.latex="\\"+t;let o="";for(let t=1;t<=s;t++){if(o+="{",Array.isArray(e[t]))for(let i=0;i<e[t].length;i++)o+=e[t][i].latex;o+="}"}return a.latex+=o||"",a}parseAtom(){let t=this.scanEnvironment()||this.scanModeShift()||this.scanModeSet()||this.scanGroup()||this.scanLeftRight();return!(t||!this.parseSupSub()&&!this.parseLimits())||(t||(t=this.scanToken()),Array.isArray(t)?this.mathList=this.mathList.concat(t):t&&this.mathList.push(t),null!==t)}}function xe(t,e,i,s,a){let o=[];const n=new be(t,i,s);for(n.parseMode=e||"math",a&&(n.smartFence=!0);!n.end();)o=o.concat(n.scanImplicitGroup());return o}var ke={Parser:be,parseTokens:xe};function ve(t,e){let i="";for(const e of t)i+=e.relation+":"+e.offset+"/";return e&&(i+="#"+e),i}function we(t){const e={path:[],extent:0},i=t.split("#");i.length>1&&(e.extent=parseInt(i[1]));const s=i[0].split("/");for(const t of s){const i=t.match(/([^:]*):(.*)/);i&&e.path.push({relation:i[1],offset:parseInt(i[2])})}return e}var Se={pathFromString:we,pathToString:ve,pathDistance:function(t,e){let i=-1,s=!1;for(;!s;)s=(s=(i+=1)>=t.length||i>=e.length)||!(t[i].relation===e[i].relation&&t[i].offset===e[i].offset);return i===t.length&&i===e.length?0:i+1===t.length&&i+1===e.length&&t[i].relation===e[i].relation?1:2},pathCommonAncestor:function(t,e){const i=[],s=Math.min(t.length-1,e.length-1);let a=0;for(;a<=s&&t[a].relation===e[a].relation&&t[a].offset===e[a].offset;)i.push(t[a]),a+=1;return i},clone:function(t){return we(ve(t)).path}};const Ae={Left:"moveToPreviousChar",Right:"moveToNextChar",Up:"moveUp",Down:"moveDown","Shift-Left":"extendToPreviousChar","Shift-Right":"extendToNextChar","Shift-Up":"extendUp","Shift-Down":"extendDown",Backspace:"deletePreviousChar","Alt-Del":"deletePreviousChar",Del:"deleteNextChar","Alt-Backspace":"deleteNextChar","Alt-Left":"moveToPreviousWord","Alt-Right":"moveToNextWord","Alt-Shift-Left":"extendToPreviousWord","Alt-Shift-Right":"extendToNextWord","Ctrl-Left":"moveToGroupStart","Ctrl-Right":"moveToGroupEnd","Ctrl-Shift-Left":"extendToGroupStart","Ctrl-Shift-Right":"extendToGroupEnd","math:Spacebar":"moveAfterParent","math:Shift-Spacebar":"moveBeforeParent",Home:"moveToMathFieldStart","mac:Meta-Left":"moveToMathFieldStart","Shift-Home":"extendToMathFieldStart","mac:Meta-Shift-Left":"extendToMathFieldStart",End:"moveToMathFieldEnd","mac:Meta-Right":"moveToMathFieldEnd","Shift-End":"extendToMathFieldEnd","mac:Meta-Shift-Right":"extendToMathFieldEnd",PageUp:"moveToGroupStart",PageDown:"moveToGroupEnd","math:Tab":"moveToNextPlaceholder","math:F8":"moveToNextPlaceholder","math:Shift-Tab":"moveToPreviousPlaceholder","math:Shift-F8":"moveToPreviousPlaceholder","text:Tab":"moveToNextPlaceholder","text:F8":"moveToNextPlaceholder","text:Shift-Tab":"moveToPreviousPlaceholder","text:Shift-F8":"moveToPreviousPlaceholder","math:Esc":["switch-mode","command"],"math:Backslash":["switch-mode","command"],"math:IntlBackslash":["switch-mode","command"],"math:Alt-Equal":["apply-style",{mode:"text"}],"text:Alt-Equal":["apply-style",{mode:"math"}],"command:Esc":["complete",{discard:!0}],"command:Tab":["complete",{acceptSuggestion:!0}],"command:Return":"complete","command:Enter":"complete","command:Shift-Esc":["complete",{discard:!0}],"command:Down":"nextSuggestion","ios:command:Tab":"nextSuggestion","command:Up":"previousSuggestion","!mac:Ctrl-KeyA":"selectAll","mac:Meta-KeyA":"selectAll",Cut:"cut",Copy:"copy",Paste:"paste",Clear:"delete","!mac:Ctrl-KeyZ":"undo","mac:Meta-KeyZ":"undo",Undo:"undo","!mac:Ctrl-KeyY":"redo","mac:Meta-Shift-KeyY":"redo","!mac:Ctrl-Shift-KeyZ":"redo","mac:Meta-Shift-KeyZ":"redo",Redo:"redo",EraseEof:"deleteToGroupEnd","mac:Ctrl-KeyB":"moveToPreviousChar","mac:Ctrl-KeyF":"moveToNextChar","mac:Ctrl-KeyP":"moveUp","mac:Ctrl-KeyN":"moveDown","mac:Ctrl-KeyA":"moveToMathFieldStart","mac:Ctrl-KeyE":"moveToMathFieldEnd","mac:Ctrl-Shift-KeyB":"extendToPreviousChar","mac:Ctrl-Shift-KeyF":"extendToNextChar","mac:Ctrl-Shift-KeyP":"extendUp","mac:Ctrl-Shift-KeyN":"extendDown","mac:Ctrl-Shift-KeyA":"extendToMathFieldStart","mac:Ctrl-Shift-KeyE":"extendToMathFieldEnd","mac:Ctrl-Alt-KeyB":"moveToPreviousWord","mac:Ctrl-Alt-KeyF":"moveToNextWord","mac:Ctrl-Shift-Alt-KeyB":"extendToPreviousWord","mac:Ctrl-Shift-Alt-KeyF":"extendToNextWord","mac:Ctrl-KeyH":"deletePreviousChar","mac:Ctrl-KeyD":"deleteNextChar","mac:Ctrl-KeyL":"scrollIntoView","mac:Ctrl-KeyT":"transpose","math:Shift-Quote":["switch-mode","text","","“"],"text:Shift-Quote":["switch-mode","math","”",""],"math:Ctrl-Digit2":["insert","\\sqrt{#0}"],"math:Ctrl-Digit5":"moveToOpposite","math:Ctrl-Digit6":"moveToSuperscript","math:Ctrl-Minus":"moveToSubscript","math:Alt-BracketLeft":["insert","\\left\\lbrack #0 \\right\\rbrack"],"math:Alt-Shift-BracketLeft":["insert","\\left\\lbrace #0 \\right\\rbrace"],"math:Return":"addRowAfter","math:Enter":"addRowAfter","math:Ctrl-Comma":"addColumnAfter","math:Alt-KeyQ":["insert","\\theta"],"math:Alt-KeyP":["insert","\\pi"],"math:Alt-KeyV":["insert","\\sqrt{#0}"],"math:Alt-KeyW":["insert","\\sum_{i=#?}^{#?}"],"math:Alt-KeyB":["insert","\\int_{#?}^{#?}"],"math:Alt-KeyU":["insert","\\cup"],"math:Alt-KeyN":["insert","\\cap"],"math:Alt-KeyO":["insert","\\emptyset"],"math:Alt-KeyD":["insert","\\differentialD"],"math:Alt-Shift-KeyO":["insert","\\varnothing"],"math:Alt-Shift-KeyD":["insert","\\partial"],"math:Alt-Shift-KeyP":["insert","\\prod_{i=#?}^{#?}"],"math:Alt-Shift-KeyU":["insert","\\bigcup"],"math:Alt-Shift-KeyN":["insert","\\bigcap"],"math:Alt-Shift-KeyA":["insert","\\forall"],"math:Alt-Shift-KeyE":["insert","\\exists"],"math:Alt-Digit5":["insert","\\infty"],"math:Alt-Digit6":["insert","\\wedge"],"math:Alt-Shift-Digit6":["insert","\\vee"],"math:Alt-Digit9":["insert","("],"math:Alt-Digit0":["insert",")"],"math:Alt-Shift-Backslash":["insert","|"],"math:Alt-Backslash":["insert","\\backslash"],"math:Slash":["insert","\\frac{#@}{#?}"],"math:Alt-Slash":["insert","\\frac{#?}{#@}"],"math:NumpadDivide":["insert","\\frac{#@}{#?}"],"math:Alt-NumpadDivide":["insert","\\frac{#?}{#@}"],"math:Shift-Backquote":["insert","\\~"],"math:Alt-Shift-Slash":["insert","\\/"],"Alt-Shift-KeyK":"toggleKeystrokeCaption","Alt-Space":"toggleVirtualKeyboard","mac:Ctrl-Meta-Up":["speak","parent",{withHighlighting:!1}],"!mac:Ctrl-Alt-Up":["speak","parent",{withHighlighting:!1}],"mac:Ctrl-Meta-Down":["speak","all",{withHighlighting:!1}],"!mac:Ctrl-Alt-Down":["speak","all",{withHighlighting:!1}],"mac:Ctrl-Meta-Left":["speak","left",{withHighlighting:!1}],"!mac:Ctrl-Alt-Left":["speak","left",{withHighlighting:!1}],"mac:Ctrl-Meta-Right":["speak","right",{withHighlighting:!1}],"!mac:Ctrl-Alt-Right":["speak","right",{withHighlighting:!1}],"!mac:Ctrl-Alt-Period":["speak","selection",{withHighlighting:!1}],"mac:Ctrl-Meta-Period":["speak","selection",{withHighlighting:!1}],"mac:Ctrl-Meta-Shift-Up":["speak","parent",{withHighlighting:!0}],"!mac:Ctrl-Alt-Shift-Up":["speak","parent",{withHighlighting:!0}],"mac:Ctrl-Meta-Shift-Down":["speak","all",{withHighlighting:!0}],"!mac:Ctrl-Alt-Shift-Down":["speak","all",{withHighlighting:!0}],"mac:Ctrl-Meta-Shift-Left":["speak","left",{withHighlighting:!0}],"!mac:Ctrl-Alt-Shift-Left":["speak","left",{withHighlighting:!0}],"mac:Ctrl-Meta-Shift-Right":["speak","right",{withHighlighting:!0}],"!mac:Ctrl-Alt-Shift-Right":["speak","right",{withHighlighting:!0}],"!mac:Ctrl-Alt-Shift-Period":["speak","selection",{withHighlighting:!0}],"mac:Ctrl-Meta-Shift-Period":["speak","selection",{withHighlighting:!0}]},Ce={"\\theta":"Alt-KeyQ","\\sqrt":["Alt-KeyV","Ctrl-Digit2"],"\\pi":"Alt-KeyP","\\prod":"Alt-Shift-KeyP","\\sum":"Alt-KeyW","\\int":"Alt-KeyB","\\cup":"Alt-KeyU","\\cap":"Alt-KeyN","\\bigcup":"Alt-Shift-KeyU","\\bigcap":"Alt-Shift-KeyN","\\forall":"Alt-Shift-KeyA","\\exists":"Alt-Shift-KeyE","\\infty":"Alt-Digit5","\\wedge":"Alt-Digit5","\\vee":"Alt-Shift-Digit6","\\differentialD":"Alt-keyD","\\partial":"Alt-Shift-KeyD","\\frac":"Slash","\\emptyset":"Alt-KeyO","\\varnothing":"Alt-Shift-KeyO","\\~":"~"},Me={"''":{mode:"math",value:"^{\\doubleprime}"},alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:{mode:"math",value:"\\pi"},"pi ":{mode:"text",value:"\\pi "},Pi:{mode:"math",value:"\\Pi"},theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:{mode:"math",value:"\\nabla"},grad:{mode:"math",value:"\\nabla"},del:{mode:"math",value:"\\partial"},"∞":"\\infty",oo:{mode:"math",after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":{mode:"math",value:"\\sum"},sum:{mode:"math",value:"\\sum_{#?}^{#?}"},prod:{mode:"math",value:"\\prod_{#?}^{#?}"},sqrt:{mode:"math",value:"\\sqrt"},"∆":{mode:"math",value:"\\differentialD"},"∂":{mode:"math",value:"\\differentialD"},sin:{mode:"math",value:"\\sin"},cos:{mode:"math",value:"\\cos"},tan:{mode:"math",value:"\\tan"},tanh:{mode:"math",value:"\\tanh"},log:{mode:"math",value:"\\log"},ln:{mode:"math",value:"\\ln"},exp:{mode:"math",value:"\\exp"},lim:{mode:"math",value:"\\lim_{#?}"},dx:"\\differentialD x",dy:"\\differentialD y",dt:"\\differentialD t",AA:{mode:"math",value:"\\forall"},EE:{mode:"math",value:"\\exists"},"!EE":{mode:"math",value:"\\nexists"},"&&":{mode:"math",value:"\\land"},xin:{mode:"math",after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{mode:"math",after:"nothing+letter+closefence",value:"\\in"},"!in":{mode:"math",value:"\\notin"},NN:"\\N",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",PP:"\\P",xx:"\\times","+-":"\\pm","!=":"\\ne",">=":"\\ge","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","≈":"\\approx","?=":"\\questeq","÷":"\\div","¬":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},"eta ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta "},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},"mu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu "},nu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},"nu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu "},"µ":"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega","Ω":"\\omega",forall:"\\forall",exists:{mode:"math",value:"\\exists"},"!exists":{mode:"math",value:"\\nexists"},":.":{mode:"math",value:"\\therefore"},liminf:"\\operatorname*{lim~inf}_{#?}",limsup:"\\operatorname*{lim~sup}_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:{mode:"math",value:"\\mod"},max:{mode:"math",value:"\\max"},min:{mode:"math",value:"\\min"},erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:{mode:"math",value:"\\operatorname{bessel}"},mean:{mode:"math",value:"\\operatorname{mean}"},median:{mode:"math",value:"\\operatorname{median}"},fft:{mode:"math",value:"\\operatorname{fft}"},lcm:{mode:"math",value:"\\operatorname{lcm}"},gcd:{mode:"math",value:"\\operatorname{gcd}"},randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:{mode:"math",value:"\\operatorname{Re}"},Im:{mode:"math",value:"\\operatorname{Im}"},mm:{mode:"math",after:"nothing+digit",value:"\\operatorname{mm}"},cm:{mode:"math",after:"nothing+digit",value:"\\operatorname{cm}"},km:{mode:"math",after:"nothing+digit",value:"\\operatorname{km}"},kg:{mode:"math",after:"nothing+digit",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","->":"\\to","|->":"\\mapsto","--\x3e":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot"};function _e(t,e,i){if(!i)return i;if("string"==typeof i)return i;if("string"==typeof i.mode&&i.mode!==t)return null;if(!e)return i?i.value:void 0;let s=!1,a=!1,o=!1,n=!1,r=!1,l=!1,c=!1,h=!1,d=!1,p=!1,m=!1,u=!1,f=!1,g=!1,y=e[e.length-1],b=e.length-1;for(;y&&/msubsup|placeholder/.test(y.type);)y=e[b-=1];return s=!y||"first"===y.type,y&&(a=!(f="text"===y.mode)&&"mord"===y.type&&Bt.LETTER.test(y.body),o=!f&&"mord"===y.type&&/[0-9]+$/.test(y.body),n=!f&&y.isFunction,r="genfrac"===y.type,l="surd"===y.type,c="mbin"===y.type,h="mrel"===y.type,d="mpunct"===y.type||"minner"===y.type,p=y.array,m="mopen"===y.type,u="mclose"===y.type||"leftright"===y.type,g="space"===y.type),void 0!==i.after?/nothing/.test(i.after)&&s||/letter/.test(i.after)&&a||/digit/.test(i.after)&&o||/function/.test(i.after)&&n||/frac/.test(i.after)&&r||/surd/.test(i.after)&&l||/binop/.test(i.after)&&c||/relop/.test(i.after)&&h||/punct/.test(i.after)&&d||/array/.test(i.after)&&p||/openfence/.test(i.after)&&m||/closefence/.test(i.after)&&u||/text/.test(i.after)&&f||/space/.test(i.after)&&g?i.value:null:i.value}function Te(t){let e="other";return navigator&&navigator.platform&&navigator.userAgent&&(/^(mac)/i.test(navigator.platform)?e="mac":/^(win)/i.test(navigator.platform)?e="win":/(android)/i.test(navigator.userAgent)?e="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(e="chromeos")),e===t?t:"!"+t}function Le(t){let e=t;return Array.isArray(e)&&e.length>0&&(e=e[0]+"("+e.slice(1).join("")+")"),e}function Fe(t,e){let i="";Array.isArray(t)||(t=[t]);for(const s of t){let t;const a=s.match(/(^[^:]*):/),o=a?a[1]:"";if(o===Te("mac")||o===Te("win")||o===Te("ios")||o===Te("android")||o===Te("chromeos")||o===Te("other")){const e=s.match(/:([^:]*)$/);t=e?e[1]:s}else if(!["mac","!mac","win","!win","ios","!ios","android","!android","chromeos","!chromeos","other","!other"].includes(o)){const e=s.match(/:([^:]*)$/);t=e?e[1]:s}if(t){const s="mac"===Te("mac")||"ios"===Te("ios"),a=t.length>1?t.split("-"):[t];let o="";for(const t of a)!s&&o.length>0&&(o+='<span class="ML__shortcut-join">+</span>'),"Key"===t.substr(0,3)?o+=t.substr(3,1):"Digit"===t.substr(0,5)?o+=t.substr(5,1):o+={Meta:s?"⌘":"command",Shift:s?"⇧":"shift",Alt:s?"⌥":"alt",Ctrl:s?"⌃":"control","\n":s?"⏎":"return",Return:s?"⏎":"return",Enter:s?"⌤":"enter",Tab:s?"⇥":"tab",Esc:"esc",Backspace:s?"⌫":"backspace",Del:s?"⌦":"del",PageUp:s?"⇞":"page up",PageDown:s?"⇟":"page down",Home:s?"⤒":"home",End:s?"⤓":"end",Spacebar:"space",Semicolon:";",Period:".",Comma:",",Minus:"-",Equal:"=",Quote:"'",BracketLeft:"[",BracketRight:"]",Backslash:"\\",IntlBackslash:"\\",Backquote:"`",Slash:"/",NumpadMultiply:"* &#128290;",NumpadDivide:"/ &#128290;",NumpadSubtract:"- &#128290;",NumpadAdd:"+ &#128290;",NumpadDecimal:". &#128290;",NumpadComma:", &#128290;",Help:"help",Left:"⇠",Up:"⇡",Right:"⇢",Down:"⇣"}[t]||t;i.length>0&&(i+=e||" or "),i+=o}}return i}var De={KEYBOARD_SHORTCUTS:Ae,INLINE_SHORTCUTS:Me,stringify:Fe,startsWithString:function(t,e){const i=[];for(let s=0;s<=t.length-1;s++){const a=t.substring(s);e&&e.overrideDefaultInlineShortcuts||Object.keys(Me).forEach(t=>{t.startsWith(a)&&!i.includes(t)&&i.push(t)});const o=e&&e.inlineShortcuts?e.inlineShortcuts:null;o&&Object.keys(o).forEach(t=>{t.startsWith(a)&&i.push(t)})}return i},forString:function(t,e,i,s){let a="";s&&s.overrideDefaultInlineShortcuts||(a=_e(t,e,Me[i]));const o=s&&s.inlineShortcuts?s.inlineShortcuts:null;let n;return o&&(n=_e(t,e,o[i])),n||a},selectorForKeystroke:function(t,e){for(const i of[Te("mac")+":"+t+":"+e,Te("win")+":"+t+":"+e,Te("ios")+":"+t+":"+e,Te("android")+":"+t+":"+e,Te("chromeos")+":"+t+":"+e,Te("other")+":"+t+":"+e,Te("mac")+":"+e,Te("win")+":"+e,Te("ios")+":"+e,Te("android")+":"+e,Te("chromeos")+":"+e,t+":"+e,e])if(Ae[i])return Ae[i];return""},forCommand:function(t){let e=[];if("string"==typeof t){const i=Ce[t];Array.isArray(i)?e=i.slice():i&&e.push(i)}t=Le(t);const i=new RegExp("^"+t.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");return Object.keys(Ae).forEach(t=>{if(i.test(Le(Ae[t]))){const i=t.match(/:([^:]*)$/);i&&e.push(i[1])}}),Fe(e)}};function ze(t,e){this.root=me.makeRoot(),this.path=[{relation:"body",offset:0}],this.extent=0,this.config=t?{...t}:{},this.target=e,this.suppressChangeNotifications=!1}function Ee(t){const e=Object.assign(new ze(t.config,t.target),t);return e.path=Se.clone(t.path),e}function qe(t,e){let i=0;for(let s=0;s<e.row;s++)for(let e=0;e<t[s].length;e++)i+=1;return i+e.col}function Ie(t,e){if("string"==typeof e){const t=e.match(/cell([0-9]*)$/);t&&(e=parseInt(t[1]))}const i={row:0,col:0};for(;e>0;)i.col+=1,(!t[i.row]||i.col>=t[i.row].length)&&(i.col=0,i.row+=1),e-=1;return i}function Pe(t,e){let i;return"object"!=typeof e&&(e=Ie(t,e)),Array.isArray(t[e.row])&&(i=t[e.row][e.col]||null),!i||0!==i.length&&"first"===i[0].type||i.unshift(je()),i}function Be(t){let e=0,i=1;for(const s of t)e+=1,s.length>i&&(i=s.length);return e*i}function Oe(t,e,i){if(!t)return[];e||(e=",");let s,a=[];for(let o of t)o&&o.length>0&&"first"===o[0].type&&(o=o.slice(1)),o&&o.length>0&&(s?a.push(s):s=new me.MathAtom("math","mpunct",e,i),a=a.concat(o));return a}function Re(t,e,i){const s={...e};if(s.row+=i,s.row<0){if(s.col+=i,s.row=t.length-1,s.col<0)return null;for(;s.row>=0&&!Pe(t,s);)s.row-=1;if(s.row<0)return null}else if(s.row>=t.length){for(s.col+=i,s.row=0;s.row<t.length&&!Pe(t,s);)s.row+=1;if(s.row>t.length-1)return null}return s}function Ke(t){return!!t&&("mord"===t.type&&/[0-9.]/.test(t.body)||"mpunct"===t.type&&","===t.body)}function Ne(t,e){if(!t)return!1;if(Array.isArray(t)){for(const i of t)if(Ne(i,e))return!0}else{if(t===e)return!0;if(["body","numer","denom","index","subscript","superscript","underscript","overscript"].some(function(i){return i===e||Ne(t[i],e)}))return!0;if(t.array)for(let i=Be(t.array);i>=0;i--)if(Ne(Pe(t.array,i),e))return!0}return!1}function $e(t){if(t)return 1===t.length&&"leftright"===t[0].type&&"("===t[0].leftDelim&&(t=t[0].body),t}function We(t,e){return t?t.length<=1?t:(e&&"ASCIIMath"===e.format||(t=t.replace(/\\\\([^\s\n])/g,"\\$1")),e&&"ASCIIMath"===e.format||!/\\/.test(t)?He(t=(t=(t=(t=(t=(t=t.replace(/\u2061/gu,"")).replace(/\u3016/gu,"{")).replace(/\u3017/gu,"}")).replace(/([^\\])sinx/g,"$1\\sin x")).replace(/([^\\])cosx/g,"$1\\cos x ")).replace(/\u2013/g,"-"),e):t):""}function He(t,e){if(!t)return"";let i,s=!1;if(s||"^"!==t[0]&&"_"!==t[0]||(i=Ve(t.substr(1),{...e,noWrap:!0}),t=t[0]+"{"+i.match+"}",t+=He(i.rest,e),s=!0),s||(i=t.match(/^(sqrt|\u221a)(.*)/))&&(t="\\sqrt{"+(i=Ve(i[2],{...e,noWrap:!0})).match+"}",t+=He(i.rest,e),s=!0),s||(i=t.match(/^(\\cbrt|\u221b)(.*)/))&&(t="\\sqrt[3]{"+(i=Ve(i[2],{...e,noWrap:!0})).match+"}",t+=He(i.rest,e),s=!0),s||(i=t.match(/^abs(.*)/))&&(t="\\left|"+(i=Ve(i[1],{...e,noWrap:!0})).match+"\\right|",t+=He(i.rest,e),s=!0),s||(i=t.match(/^["”“](.*?)["”“](.*)/))&&(t="\\text{"+i[1]+"}",t+=He(i[2],e),s=!0),s||(i=t.match(/^([^a-zA-Z({[_^\\\s"]+)(.*)/))&&(t=Ue(i[1],e),t+=He(i[2],e),s=!0),!s&&/^(f|g|h)[^a-zA-Z]/.test(t)&&(i=Ve(t.substring(1),e),t=t[0],t+=i.match,t+=He(i.rest,e),s=!0),s||(i=t.match(/^([a-zA-Z]+)(.*)/))&&(t=Ue(i[1],e),t+=He(i[2],e),s=!0),!s)if((i=Ve(t,{...e,noWrap:!0})).match&&"/"===i.rest[0]){const a=Ve(i.rest.substr(1),{...e,noWrap:!0});a.match&&(t="\\frac{"+i.match+"}{"+a.match+"}"+He(a.rest,e)),s=!0}else i.match&&/^(\(|\{|\[)$/.test(t[0])?(t="\\left"+t[0]+i.match+"\\right"+{"(":")","{":"}","[":"]"}[t[0]]+He(i.rest,e),s=!0):i.match&&(t=i.match,t+=He(i.rest,e),s=!0);return s||(i=t.match(/^(\s+)(.*)$/))&&(t=" "+He(i[2],e),s=!0),t}function Ve(t,e){let i="",s=t=t.trim();const a=t.charAt(0),o={"(":")","{":"}","[":"]"}[a];if(o){let n=1,r=1;for(;r<t.length&&n>0;)t[r]===a&&n++,t[r]===o&&n--,r++;0===n?(i=e.noWrap&&"("===a&&")"===o?He(t.substring(1,r-1),e):"\\mleft"+a+He(t.substring(1,r-1),e)+"\\mright"+o,s=t.substring(r)):(i=t.substring(1,r),s="")}else{let a=t.match(/^([a-zA-Z]+)/);if(a){let i=De.forString("math",null,t,e);if(i)return{match:i=(i=i.replace("_{#?}","")).replace("^{#?}",""),rest:t.substring(i.length)}}if(a=t.match(/^([a-zA-Z])/))return{match:a[1],rest:t.substring(1)};if(a=t.match(/^(-)?\d+(\.\d*)?/))return{match:a[0],rest:t.substring(a[0].length)};/^\\(left|right)/.test(t)||(a=t.match(/^(\\[a-zA-Z]+)/))&&(s=t.substring(a[1].length),i=a[1])}return{match:i,rest:s}}function Ue(t,e){let i=De.forString("math",null,t,e);return i?(i=(i=i.replace("_{#?}","")).replace("^{#?}",""),i+=" "):i=t,i}function je(){return new me.MathAtom("","first")}ze.prototype._announce=function(t,e,i){"function"==typeof this.config.onAnnounce&&this.config.onAnnounce(this.target,t,e,i)},ze.prototype.filter=function(t,e){e=e<0?-1:1;const i=[],s=new ze;s.path=Se.clone(this.path),s.extent=this.extent,s.root=this.root,e>=0?s.collapseForward():(s.collapseBackward(),s.move(1));const a=s.anchor();do{t.bind(s)(s.path,s.anchor())&&i.push(s.toString()),e>=0?s.next({iterateAll:!0}):s.previous({iterateAll:!0})}while(a!==s.anchor());return i},ze.prototype.forEach=function(t){this.root.forEach(t)},ze.prototype.forEachSelected=function(t,e){(e=e||{}).recursive=void 0!==e.recursive&&e.recursive;const i=this.siblings(),s=this.startOffset()+1,a=this.endOffset()+1;if(e.recursive)for(let e=s;e<a;e++)i[e]&&"first"!==i[e].type&&i[e].forEach(t);else for(let e=s;e<a;e++)i[e]&&"first"!==i[e].type&&t(i[e])},ze.prototype.toString=function(){return Se.pathToString(this.path,this.extent)},ze.prototype.adjustPlaceholder=function(){const t=this.siblings();if(t&&t.length<=1){let e;const i=this.relation();if("numer"===i?e="numerator":"denom"===i?e="denominator":"surd"===this.parent().type&&"body"===i?e="radicand":"overunder"===this.parent().type&&"body"===i?e="base":"underscript"!==i&&"overscript"!==i||(e="annotation"),e){const e=[new me.MathAtom("math","placeholder","⬚",this.anchorStyle())];Array.prototype.splice.apply(t,[1,0].concat(e))}}},ze.prototype.selectionWillChange=function(){"function"!=typeof this.config.onSelectionWillChange||this.suppressChangeNotifications||this.config.onSelectionWillChange(this.target)},ze.prototype.selectionDidChange=function(){"function"!=typeof this.config.onSelectionDidChange||this.suppressChangeNotifications||this.config.onSelectionDidChange(this.target)},ze.prototype.contentWillChange=function(){"function"!=typeof this.config.onContentWillChange||this.suppressChangeNotifications||this.config.onContentWillChange(this.target)},ze.prototype.contentDidChange=function(){"function"!=typeof this.config.onContentDidChange||this.suppressChangeNotifications||this.config.onContentDidChange(this.target)},ze.prototype.setPath=function(t,e){if("string"==typeof t)t=Se.pathFromString(t);else if(Array.isArray(t)){const i=Se.clone(t),s=this.path;this.path=i,0===e&&"placeholder"===this.anchor().type&&(i[i.length-1].offset=0,e=1),t={path:i,extent:e||0},this.path=s}const i=0!==Se.pathDistance(this.path,t.path),s=t.extent!==this.extent;return(i||s)&&(i&&this.adjustPlaceholder(),this.selectionWillChange(),this.path=Se.clone(t.path),this.siblings().length<this.anchorOffset()?(this.path=[{relation:"body",offset:0}],this.extent=0):this.setExtent(t.extent),this.selectionDidChange()),i||s},ze.prototype.wordBoundary=function(t,e){e=e<0?-1:1;const i=new ze;i.path=Se.clone(t),i.root=this.root;let s=0;for(;i.sibling(s)&&"text"===i.sibling(s).mode&&Bt.LETTER_AND_DIGITS.test(i.sibling(s).body);)s+=e;return i.sibling(s)||(s-=e),i.path[i.path.length-1].offset+=s,i.path},ze.prototype.wordBoundaryOffset=function(t,e){e=e<0?-1:1;const i=this.siblings();if(!i[t])return t;if("text"!==i[t].mode)return t;let s;if(Bt.LETTER_AND_DIGITS.test(i[t].body)){let a,o=t;do{a="text"===i[o].mode&&Bt.LETTER_AND_DIGITS.test(i[o].body),o+=e}while(i[o]&&a);s=i[o]?o-2*e:o-e}else if(/\s/.test(i[t].body)){let a=t;for(;i[a]&&"text"===i[a].mode&&/\s/.test(i[a].body);)a+=e;if(i[a]){let t=!0;do{t="text"===i[a].mode&&!/\s/.test(i[a].body),a+=e}while(i[a]&&t);s=i[a]?a-2*e:a-e}else s=a-e}else{let a=t;for(;i[a]&&"text"===i[a].mode&&!/\s/.test(i[a].body);)a+=e;s=i[a]?a:a-e;let o=!0;for(;i[a]&&o;)(o="text"===i[a].mode&&/\s/.test(i[a].body))&&(s=a),a+=e;s=i[a]?a-2*e:a-e}return s-(e>0?0:1)},ze.prototype.setRange=function(t,e,i){i=i||{};const s=Se.pathDistance(t,e);if(0===s)return i.extendToWordBoundary?(t=this.wordBoundary(t,-1),e=this.wordBoundary(e,1),this.setRange(t,e)):this.setPath(Se.clone(t),0);if(1===s){const s=e[e.length-1].offset-t[t.length-1].offset;return i.extendToWordBoundary?(t=this.wordBoundary(t,s<0?1:-1),e=this.wordBoundary(e,s<0?-1:1),this.setRange(t,e)):this.setPath(Se.clone(t),s)}let a=Se.pathCommonAncestor(t,e);const o=a.length;if(t.length===o||e.length===o||t[o].relation!==e[o].relation)return this.setPath(a,-1);a.push(t[o]),a=Se.clone(a);let n=e[o].offset-t[o].offset+1;return n<=0?e.length>o+1?(a[o].relation=e[o].relation,a[o].offset=e[o].offset,a[a.length-1].offset-=1,n=2-n):(a[o].relation=e[o].relation,a[o].offset=e[o].offset,n=1-n):e.length<=t.length?a[a.length-1].offset-=1:e.length>t.length&&(a[o].offset-=1),this.setPath(a,n)},ze.prototype.ancestor=function(t){if(t>this.path.length)return null;let e=this.root;for(let i=0;i<this.path.length-t;i++){const t=this.path[i];if(e.array)e=Pe(e.array,t.relation)[t.offset];else{if(!e[t.relation])return null;{0!==e[t.relation].length&&"first"===e[t.relation][0].type||e[t.relation].unshift(je());const i=Math.min(t.offset,e[t.relation].length-1);e=e[t.relation][i]}}}return e},ze.prototype.anchor=function(){if(this.parent().array)return Pe(this.parent().array,this.relation())[this.anchorOffset()];const t=this.siblings();return t[Math.min(t.length-1,this.anchorOffset())]},ze.prototype.parent=function(){return this.ancestor(1)},ze.prototype.relation=function(){return this.path.length>0?this.path[this.path.length-1].relation:""},ze.prototype.anchorOffset=function(){return this.path.length>0?this.path[this.path.length-1].offset:0},ze.prototype.focusOffset=function(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0},ze.prototype.startOffset=function(){return Math.min(this.focusOffset(),this.anchorOffset())},ze.prototype.endOffset=function(){return Math.max(this.focusOffset(),this.anchorOffset())},ze.prototype.insertFirstAtom=function(){this.siblings()},ze.prototype.siblings=function(){if(0===this.path.length)return[];let t;return this.parent().array?t=Pe(this.parent().array,this.relation()):"string"==typeof(t=this.parent()[this.relation()]||[])&&(t=[]),0!==t.length&&"first"===t[0].type||t.unshift(je()),t},ze.prototype.sibling=function(t){return this.siblings()[this.startOffset()+t]},ze.prototype.isCollapsed=function(){return 0===this.extent},ze.prototype.setExtent=function(t){this.extent=t},ze.prototype.collapseForward=function(){return 0!==this.extent&&(this.setSelection(this.endOffset()),!0)},ze.prototype.collapseBackward=function(){return 0!==this.extent&&(this.setSelection(this.startOffset()),!0)},ze.prototype.selectGroup_=function(){const t=this.siblings();if("text"===this.anchorMode()){let e=this.startOffset(),i=this.endOffset();for(;t[e]&&"text"===t[e].mode&&Bt.LETTER_AND_DIGITS.test(t[e].body);)e-=1;for(;t[i]&&"text"===t[i].mode&&Bt.LETTER_AND_DIGITS.test(t[i].body);)i+=1;if(e>=(i-=1))return void this.setSelection(this.endOffset()-1,1);this.setSelection(e,i-e)}else if("mord"===this.sibling(0).type&&/[0-9,.]/.test(this.sibling(0).body)){let e=this.startOffset(),i=this.endOffset();for(;Ke(t[e]);)e-=1;for(;Ke(t[i]);)i+=1;i-=1,this.setSelection(e,i-e)}else this.setSelection(0,"end")},ze.prototype.selectAll_=function(){this.path=[{relation:"body",offset:0}],this.setSelection(0,"end")},ze.prototype.deleteAll_=function(){this.selectAll_(),this.delete_()},ze.prototype.contains=function(t){if(this.isCollapsed())return!1;const e=this.siblings(),i=this.startOffset(),s=this.endOffset();for(let a=i;a<s;a++)if(Ne(e[a],t))return!0;return!1},ze.prototype.getSelectedAtoms=function(){if(this.isCollapsed())return null;const t=[],e=this.siblings(),i=this.startOffset()+1,s=this.endOffset()+1;for(let a=i;a<s;a++)e[a]&&"first"!==e[a].type&&t.push(e[a]);return t},ze.prototype.commandOffsets=function(){const t=this.siblings();if(t.length<=1)return null;let e=Math.min(this.endOffset(),t.length-1);if("command"!==t[e].type)return null;for(;e>0&&"command"===t[e].type;)e-=1;let i=this.startOffset()+1;for(;i<=t.length-1&&"command"===t[i].type;)i+=1;return i>e?{start:e+1,end:i}:null},ze.prototype.extractCommandStringAroundInsertionPoint=function(t){let e="";const i=this.commandOffsets();if(i){const s=t?this.anchorOffset()+1:i.end,a=this.siblings();for(let t=i.start;t<s;t++)e+=a[t].body||""}return e},ze.prototype.decorateCommandStringAroundInsertionPoint=function(t){const e=this.commandOffsets();if(e){const i=this.siblings();for(let s=e.start;s<e.end;s++)i[s].error=t}},ze.prototype.commitCommandStringBeforeInsertionPoint=function(){const t=this.commandOffsets();if(t){const e=this.siblings(),i=this.anchorOffset()+1;for(let s=t.start;s<i;s++)e[s]&&(e[s].suggestion=!1)}},ze.prototype.spliceCommandStringAroundInsertionPoint=function(t){const e=this.commandOffsets();if(e){if(this.contentWillChange(),t){Array.prototype.splice.apply(this.siblings(),[e.start,e.end-e.start].concat(t));let i=[];for(const e of t)i=i.concat(e.filter(t=>"placeholder"===t.type));this.setExtent(0),this.path[this.path.length-1].offset=e.start-1,0!==i.length&&this.leap(1,!1)||this.setSelection(e.start+t.length-1)}else this.siblings().splice(e.start,e.end-e.start),this.setSelection(e.start-1,0);this.contentDidChange()}},ze.prototype.removeCommandString=function(){this.contentWillChange();const t=this.suppressChangeNotifications;this.suppressChangeNotifications=!0,function t(e){if(e)if(Array.isArray(e))for(let i=e.length-1;i>=0;i--)"command"===e[i].type?e.splice(i,1):t(e[i]);else if(t(e.body),t(e.superscript),t(e.subscript),t(e.underscript),t(e.overscript),t(e.numer),t(e.denom),t(e.index),e.array)for(let i=Be(e.array);i>=0;i--)t(Pe(e.array,i))}(this.root.body),this.suppressChangeNotifications=t,this.contentDidChange()},ze.prototype.extractArgBeforeInsertionPoint=function(){const t=this.siblings();if(t.length<=1)return[];const e=[];let i=this.startOffset();if("text"===t[i].mode)for(;i>=1&&"text"===t[i].mode;)e.unshift(t[i]),i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop)$/.test(t[i].type);)e.unshift(t[i]),i--;return e},ze.prototype.setSelection=function(t,e,i){t=t||0,e=e||0;const s=this.path[this.path.length-1].relation;i||(i=s);const a=this.parent();if(!a&&"body"!==i)return!1;const o=i.startsWith("cell");if(!o&&!a[i]||o&&!a.array)return!1;const n=i!==s;this.path[this.path.length-1].relation=i;const r=this.siblings().length;this.path[this.path.length-1].relation=s;const l=this.extent;"end"===e?e=r-t-1:"start"===e&&(e=-t),this.setExtent(e);const c=this.extent!==l;this.setExtent(l),t<0&&(t=r+t),t=Math.max(0,Math.min(t,r-1));const h=this.path[this.path.length-1].offset;return(n||h!==t||c)&&(n&&this.adjustPlaceholder(),this.selectionWillChange(),this.path[this.path.length-1].relation=i,this.path[this.path.length-1].offset=t,this.setExtent(e),this.selectionDidChange()),!0},ze.prototype.next=function(t){t=t||{};const e={body:"numer",numer:"denom",denom:"index",index:"overscript",overscript:"underscript",underscript:"subscript",subscript:"superscript"};if(this.anchorOffset()===this.siblings().length-1){this.adjustPlaceholder();let i=e[this.relation()];const s=this.parent();for(;i&&!s[i];)i=e[i];if(i)return void this.setSelection(0,0,i);if(this.parent().array){const t=Be(this.parent().array);let e=parseInt(this.relation().match(/cell([0-9]*)$/)[1])+1;for(;e<t;){if(Pe(this.parent().array,e)&&this.setSelection(0,0,"cell"+e))return void this.selectionDidChange();e+=1}}if(1===this.path.length)(this.suppressChangeNotifications||!this.config.onMoveOutOf||this.config.onMoveOutOf(this,"forward"))&&(this.path[0].offset=0);else{const e=!t.iterateAll&&this.parent().skipBoundary;this.path.pop(),e&&this.next(t)}return void this.selectionDidChange()}this.setSelection(this.anchorOffset()+1);const i=this.anchor();if(i&&!i.captureSelection){let s;if(i.array){let t=0;s="";const e=Be(i.array);for(;!s&&t<e;)Pe(i.array,t)&&(s="cell"+t.toString()),t+=1;return this.path.push({relation:s,offset:0}),void this.setSelection(0,0,s)}for(s="body";s;){if(Array.isArray(i[s]))return this.path.push({relation:s,offset:0}),this.insertFirstAtom(),void(!t.iterateAll&&i.skipBoundary&&this.next(t));s=e[s]}}},ze.prototype.previous=function(t){const e={numer:"body",denom:"numer",index:"denom",overscript:"index",underscript:"overscript",subscript:"underscript",superscript:"subscript"};if(!(t=t||{}).iterateAll&&1===this.anchorOffset()&&this.parent()&&this.parent().skipBoundary&&this.setSelection(0),this.anchorOffset()<1){let t=e[this.relation()];for(;t&&!this.setSelection(-1,0,t);)t=e[t];const i=this.parent()?this.parent().type:"none";if("body"!==t||"msubsup"!==i&&"mop"!==i||(t=null),t)return;if(this.adjustPlaceholder(),this.selectionWillChange(),this.relation().startsWith("cell")){let t=parseInt(this.relation().match(/cell([0-9]*)$/)[1])-1;for(;t>=0;){if(Pe(this.parent().array,t)&&this.setSelection(-1,0,"cell"+t))return void this.selectionDidChange();t-=1}}return 1===this.path.length?(this.suppressChangeNotifications||!this.config.onMoveOutOf||this.config.onMoveOutOf.bind(this)(-1))&&(this.path[0].offset=this.root.body.length-1):(this.path.pop(),this.setSelection(this.anchorOffset()-1)),void this.selectionDidChange()}const i=this.anchor();if(!i.captureSelection){let t;if(i.array){t="";const e=Be(i.array);let s=e-1;for(;!t&&s<e;)Pe(i.array,s)&&(t="cell"+s.toString()),s-=1;return s+=1,this.path.push({relation:t,offset:Pe(i.array,s).length-1}),void this.setSelection(-1,0,t)}for(t="superscript";t;){if(Array.isArray(i[t]))return this.path.push({relation:t,offset:i[t].length-1}),void this.setSelection(-1,0,t);t=e[t]}}this.setSelection(this.anchorOffset()-1),!t.iterateAll&&this.sibling(0)&&this.sibling(0).skipBoundary&&this.previous(t)},ze.prototype.move=function(t,e){const i=(e=e||{extend:!1}).extend||!1;if(this.removeSuggestion(),i)this.extend(t,e);else{const e=Ee(this);if(t>0)for(this.collapseForward()&&t--;t>0;)this.next(),t--;else if(t<0)for(this.collapseBackward()&&t++;0!==t;)this.previous(),t++;this._announce("move",e)}},ze.prototype.up=function(t){const e=(t=t||{extend:!1}).extend||!1;this.collapseBackward();const i=this.relation();if("denom"===i)e?(this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange()):this.setSelection(this.anchorOffset(),0,"numer"),this._announce("moveUp");else if(this.parent().array){let e=Ie(this.parent().array,i);(e=Re(this.parent().array,e,-1))&&Pe(e)?(this.path[this.path.length-1].relation="cell"+qe(this.parent().array,e),this.setSelection(this.anchorOffset()),this._announce("moveUp")):this.move(-1,t)}else this._announce("line")},ze.prototype.down=function(t){const e=(t=t||{extend:!1}).extend||!1;this.collapseForward();const i=this.relation();if("numer"===i)e?(this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange()):this.setSelection(this.anchorOffset(),0,"denom"),this._announce("moveDown");else if(this.parent().array){let e=Ie(this.parent().array,i);(e=Re(this.parent().array,e,1))&&Pe(e)?(this.path[this.path.length-1].relation="cell"+qe(this.parent().array,e),this.setSelection(this.anchorOffset()),this._announce("moveDown")):this.move(1,t)}else this._announce("line")},ze.prototype.extend=function(t){let e=this.path[this.path.length-1].offset,i=0;const s=Ee(this),a=e+(i=this.extent+t);if(a<0&&0!==i){if(this.path.length>1)return this.selectionWillChange(),this.path.pop(),this.setExtent(-1),this.selectionDidChange(),void this._announce("move",s);e=this.path[this.path.length-1].offset,i=this.extent}else if(a>=this.siblings().length){if(this.path.length>1)return this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange(),void this._announce("move",s);this.isCollapsed()&&(e-=1),i-=1}this.setSelection(e,i),this._announce("move",s)},ze.prototype.skip=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=t<0?-1:1;const s=Ee(this),a=this.siblings(),o=this.focusOffset();let n=o+t;if(i&&(n=Math.min(Math.max(0,n),a.length-1)),n<0||n>=a.length)this.move(t,e);else{if(a[n]&&"text"===a[n].mode){if((n=this.wordBoundaryOffset(n,t))<0&&!i)return void this.setSelection(0);if(n>a.length)return this.setSelection(a.length-1),void this.move(t,e)}else{const e=a[n]?a[n].type:"";if("mopen"===e&&t>0||"mclose"===e&&t<0){let i="mopen"===e?1:-1;for(n+=t>0?1:-1;n>=0&&n<a.length&&0!==i;)"mopen"===a[n].type?i+=1:"mclose"===a[n].type&&(i-=1),n+=t;0!==i&&(n=o+t),t>0&&(n-=1)}else{for(;a[n]&&"math"===a[n].mode&&a[n].type===e;)n+=t;n-=t>0?1:0}}if(i){const t=this.anchorOffset();this.setSelection(t,n-t)}else this.setSelection(n);this._announce("move",s)}},ze.prototype.jump=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=t<0?-1:1;const s=this.siblings();let a=this.focusOffset();t>0&&(a=Math.min(a+1,s.length-1));const o=t<0?0:s.length-1;i?this.extend(o-a):this.move(o-a)},ze.prototype.jumpToMathFieldBoundary=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=(t=t||1)<0?-1:1;const s=Ee(this),a=[{relation:"body",offset:this.path[0].offset}];let o;i?t<0?a[0].offset>0&&(o=-a[0].offset):a[0].offset<this.siblings().length-1&&(o=this.siblings().length-1-a[0].offset):(a[0].offset=t<0?0:this.root.body.length-1,o=0),this.setPath(a,o),this._announce("move",s)},ze.prototype.leap=function(t,e){t=(t=t||1)<0?-1:1,e=e||!0;const i=this.suppressChangeNotifications;this.suppressChangeNotifications=!0;const s=Ee(this),a=this.extent;this.move(t),"placeholder"===this.anchor().type&&this.move(t);const o=this.filter((t,e)=>"placeholder"===e.type||t.length>1&&1===this.siblings().length,t);if(0===o.length){if(this.setPath(s,a),e)if(this.config.onTabOutOf)this.config.onTabOutOf(this.target,t>0?"forward":"backward");else if(document.activeElement){const e='a[href]:not([disabled]),\n button:not([disabled]),\n textarea:not([disabled]),\n input[type=text]:not([disabled]),\n select:not([disabled]),\n [contentEditable="true"],\n [tabindex]:not([disabled]):not([tabindex="-1"])',i=Array.prototype.filter.call(document.querySelectorAll(e),t=>(t.offsetWidth>0||t.offsetHeight>0)&&!t.contains(document.activeElement)||t===document.activeElement);let s=i.indexOf(document.activeElement)+t;s<0&&(s=i.length-1),s>=i.length&&(s=0),i[s].focus()}return this.suppressChangeNotifications=i,!1}return this.selectionWillChange(),this.setPath(o[0]),"placeholder"===this.anchor().type&&this.setExtent(-1),this._announce("move",s),this.selectionDidChange(),this.suppressChangeNotifications=i,!0},ze.prototype.anchorMode=function(){const t=this.isCollapsed()?this.anchor():this.sibling(1);let e;if(t){if("commandliteral"===t.type||"command"===t.type)return"command";e=t.mode}let i=1,s=this.ancestor(i);for(;!e&&s;)s&&(e=s.mode),i+=1,s=this.ancestor(i);return e},ze.prototype.anchorStyle=function(){const t=this.isCollapsed()?this.anchor():this.sibling(1);let e;if(t&&"first"!==t.type){if("commandliteral"===t.type||"command"===t.type)return{};e={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let i=1,s=this.ancestor(i);for(;!e&&s;)s&&(e={color:s.color,backgroundColor:s.backgroundColor,fontFamily:s.fontFamily,fontShape:s.fontShape,fontSeries:s.fontSeries,fontSize:s.fontSize}),i+=1,s=this.ancestor(i);return e},ze.prototype.simplifyParen=function(t){if(t&&this.config.removeExtraneousParentheses){for(let e=0;t[e];e++)if("leftright"===t[e].type&&"("===t[e].leftDelim&&Array.isArray(t[e].body)){let i=0,s=0,a=0;for(let o=0;t[e].body[o];o++)"genfrac"===t[e].body[o].type&&(i++,s=o),"first"!==t[e].body[o].type&&a++;0===a&&1===i&&(t[e]=t[e].body[s])}t.forEach(t=>{if("genfrac"===t.type&&(this.simplifyParen(t.numer),this.simplifyParen(t.denom),t.numer=$e(t.numer),t.denom=$e(t.denom)),t.superscript&&(this.simplifyParen(t.superscript),t.superscript=$e(t.superscript)),t.subscript&&(this.simplifyParen(t.subscript),t.subscript=$e(t.subscript)),t.underscript&&(this.simplifyParen(t.underscript),t.underscript=$e(t.underscript)),t.overscript&&(this.simplifyParen(t.overscript),t.overscript=$e(t.overscript)),t.index&&(this.simplifyParen(t.index),t.index=$e(t.index)),"surd"===t.type?(this.simplifyParen(t.body),t.body=$e(t.body)):t.body&&Array.isArray(t.body)&&this.simplifyParen(t.body),t.array)for(let e=Be(t.array);e>=0;e--)this.simplifyParen(Pe(t.array,e))})}},ze.prototype.insert=function(t,e){if((e=e||{}).smartFence&&this._insertSmartFence(t,e.style))return;const i=this.suppressChangeNotifications;e.suppressChangeNotifications&&(this.suppressChangeNotifications=!0),this.contentWillChange();const s=this.suppressChangeNotifications;this.suppressChangeNotifications=!0,e.insertionMode||(e.insertionMode="replaceSelection"),e.selectionMode||(e.selectionMode="placeholder"),e.format||(e.format="auto"),e.macros=e.macros||this.config.macros;const a=e.mode||this.anchorMode();let o;const n=[this.getSelectedAtoms()];void 0!==e.placeholder&&(n["?"]=e.placeholder),"replaceSelection"!==e.insertionMode||this.isCollapsed()?"replaceAll"===e.insertionMode?(this.root.body.splice(1),this.path=[{relation:"body",offset:0}],this.extent=0):"insertBefore"===e.insertionMode?this.collapseBackward():"insertAfter"===e.insertionMode&&this.collapseForward():this.delete_();const r=this.siblings(),l=this.startOffset();if(l+1<r.length&&r[l+1]&&"placeholder"===r[l+1].type?this.delete_(1):l>0&&r[l]&&"placeholder"===r[l].type&&this.delete_(-1),"math"===a&&"ASCIIMath"===e.format)t=We(t,{...this.config,format:"ASCIIMath"}),o=ke.parseTokens(x.tokenize(t),"math",null,e.macros,!1),this.simplifyParen(o);else if("text"!==a&&"auto"===e.format)if("command"===a){o=[];for(const e of t)Bt.COMMAND_MODE_CHARACTERS.test(e)&&o.push(new me.MathAtom("command","command",e))}else""===t?o=[new me.MathAtom("command","command","\\")]:(t=We(t,this.config),n[0]?t=t.replace(/(^|[^\\])#@/g,"$1#0"):/(^|[^\\])#@/.test(t)?(t=t.replace(/(^|[^\\])#@/g,"$1#0"),n[0]=this.extractArgBeforeInsertionPoint(),this._deleteAtoms(-n[0].length),Array.isArray(n[0])&&0===n[0].length&&(n[0]=void 0)):t=t.replace(/(^|[^\\])#@/g,"$1#?"),o=ke.parseTokens(x.tokenize(t),a,n,e.macros,e.smartFence),this.simplifyParen(o));else"latex"===e.format?o=ke.parseTokens(x.tokenize(t),a,n,e.macros,e.smartFence):"text"!==a&&"text"!==e.format||(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"\\textbackslash ")).replace(/#/g,"\\#")).replace(/\$/g,"\\$")).replace(/%/g,"\\%")).replace(/&/g,"\\&")).replace(/_/g,"\\_")).replace(/{/g,"\\textbraceleft ")).replace(/}/g,"\\textbraceright ")).replace(/\^/g,"\\textasciicircum ")).replace(/~/g,"\\textasciitilde ")).replace(/£/g,"\\textsterling "),o=ke.parseTokens(x.tokenize(t),"text",n,e.macros,!1));!function t(e,i){e&&i&&(Array.isArray(e)?e.forEach(e=>t(e,i)):"object"==typeof e&&(e.color||e.backgroundColor||e.fontFamily||e.fontShape||e.fontSeries||e.fontSize||(e.applyStyle(i),t(e.body,i),t(e.numer,i),t(e.denom,i),t(e.index,i),t(e.overscript,i),t(e.underscript,i),t(e.subscript,i),t(e.superscript,i))))}(o,e.style);const c=this.parent();if(this.config.removeExtraneousParentheses&&c&&"leftright"===c.type&&"("===c.leftDelim&&o&&1===o.length&&"genfrac"===o[0].type?(this.path.pop(),this.siblings()[this.anchorOffset()]=o[0]):Array.prototype.splice.apply(this.siblings(),[this.anchorOffset()+1,0].concat(o)),this.insertFirstAtom(),this.suppressChangeNotifications=s,"placeholder"===e.selectionMode){let t=[];for(const e of o)t=t.concat(e.filter(t=>"placeholder"===t.type));0!==t.length&&this.leap(1,!1)?this._announce("move"):this.setSelection(this.anchorOffset()+o.length)}else"before"===e.selectionMode||("after"===e.selectionMode?this.setSelection(this.anchorOffset()+o.length):"item"===e.selectionMode&&this.setSelection(this.anchorOffset(),o.length));this.contentDidChange(),this.suppressChangeNotifications=i},ze.prototype._insertSmartFence=function(t,e){const i=this.parent();if("leftright"===i.type&&"|"!==i.leftDelim&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return this.insert("\\,\\middle"+t+"\\, ",{mode:"math",format:"latex",style:e}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["!==t&&"\\["!==t||(t="\\lbrack"),"]"!==t&&"\\]"!==t||(t="\\rbrack");const s=Bt.RIGHT_DELIM[t];if(s&&("leftright"!==i.type||"|"!==i.leftDelim)){let i="";const a=this.isCollapsed()||"placeholder"===this.anchor().type;i=this.sibling(0).isFunction?"\\mleft"+t+"\\mright":"\\left"+t+"\\right",i+=a?"?":s;let o=[];return a&&(o=this.siblings().splice(this.anchorOffset()+1,this.siblings().length)),this.insert(i,{mode:"math",format:"latex",style:e}),a&&(this.sibling(0).body=o,this.move(-1)),!0}let a;if(Object.keys(Bt.RIGHT_DELIM).forEach(e=>{t===Bt.RIGHT_DELIM[e]&&(a=e)}),a){if(i&&"leftright"===i.type&&this.endOffset()===this.siblings().length-1)return this.contentWillChange(),i.rightDelim=t,this.move(1),this.contentDidChange(),!0;const s=this.siblings();let a;for(a=this.endOffset();a>=0&&("leftright"!==s[a].type||"?"!==s[a].rightDelim);a--);if(a>=0)return this.contentWillChange(),s[a].rightDelim=t,s[a].body=s[a].body.concat(s.slice(a+1,this.endOffset()+1)),s.splice(a+1,this.endOffset()-a),this.setSelection(a),this.contentDidChange(),!0;if(i&&"leftright"===i.type&&"?"===i.rightDelim){this.contentWillChange(),i.rightDelim=t;const e=s.slice(this.endOffset()+1);return s.splice(this.endOffset()+1),this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.endOffset()+1,0].concat(e)),this.contentDidChange(),!0}const o=this.ancestor(2);return o&&"leftright"===o.type&&"?"===o.rightDelim&&this.endOffset()===s.length-1?(this.move(1),this._insertSmartFence(t,e)):(this.insert(t,{mode:"math",format:"latex",style:e}),!0)}return!1},ze.prototype.positionInsertionPointAfterCommitedCommand=function(){const t=this.siblings(),e=this.commandOffsets();let i=e.start;for(;i<e.end&&!t[i].suggestion;)i++;this.setSelection(i-1)},ze.prototype.removeSuggestion=function(){const t=this.siblings();for(let e=t.length-1;e>=0;e--)t[e].suggestion&&t.splice(e,1)},ze.prototype.insertSuggestion=function(t,e){this.removeSuggestion();const i=[],s=t.substr(e);for(const t of s){const e=new me.MathAtom("command","command",t);e.suggestion=!0,i.push(e)}Array.prototype.splice.apply(this.siblings(),[this.anchorOffset()+1,0].concat(i))},ze.prototype._deleteAtoms=function(t){t>0?this.siblings().splice(this.anchorOffset()+1,t):(this.siblings().splice(this.anchorOffset()+t+1,-t),this.setSelection(this.anchorOffset()+t))},ze.prototype.delete=function(t){if(0===(t=t||0))this.delete_(0);else if(t>0)for(;t>0;)this.delete_(1),t--;else for(;t<0;)this.delete_(-1),t++},ze.prototype.delete_=function(t){this.contentWillChange(),this.selectionWillChange();const e=this.suppressChangeNotifications;if(this.suppressChangeNotifications=!0,t=(t=t||0)<0?-1:t>0?1:t,this.removeSuggestion(),this.parent().array&&t<0&&0===this.startOffset()){const t=this.parent().array;if(function(t){const e={col:0,row:0};for(;e.row<t.length&&!Pe(t,e);)e.row+=1;return Pe(t,e)?"cell"+qe(t,e):""}(t)===this.relation()){const e=function(t,e,i){e||(e=[";",","]);let s,a=[];for(const i of t)s?a.push(s):s=new me.MathAtom("math","mpunct",e[0],void 0),a=a.concat(Oe(i,e[1]));return a}(t);this.path.pop(),this.siblings().splice(this.anchorOffset(),1,...e),this.setSelection(this.anchorOffset()-1,e.length)}else{const e=Ie(t,this.relation());if(0===e.col){const i=Re(t,e,-1);i.col=t[i.row].length-1,this.path[this.path.length-1].relation="cell"+qe(t,i);const s=t[i.row][i.col].length,a=Oe(t[e.row]);t[i.row][i.col]=t[i.row][i.col].concat(a),this.setSelection(s-1,a.length),function(t,e){t.splice(e,1)}(t,e.row)}else if(0===function(t,e){let i=0;const s={col:e,row:0};for(;s.row<t.length;){const e=Pe(t,s);if(e&&e.length>0){let t=e.length;"first"===e[0].type&&(t-=1),t>0&&(i+=1)}s.row+=1}return i}(t,e.col)){!function(t,e){let i=0;for(;i<t.length;)t[i][e]&&t[i].splice(e,1),i+=1}(t,e.col),e.col-=1,this.path[this.path.length-1].relation="cell"+qe(t,e);const i=t[e.row][e.col];this.setSelection(i.length-1,0)}}return this.suppressChangeNotifications=e,this.selectionDidChange(),void this.contentDidChange()}const i=this.siblings();if(this.isCollapsed()){const e=this.anchorOffset();if(t<0)if(0!==e){const t=this.sibling(0);"leftright"===t.type?(t.rightDelim="?",this.move(-1)):!t.captureSelection&&/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(t.type)?this.move(-1):(this._announce("delete",null,i.slice(e,e+1)),i.splice(e,1),this.setSelection(e-1))}else{const t=this.relation();if("superscript"===t||"subscript"===t){const e=this.parent()[t].filter(t=>"placeholder"!==t.type&&"first"!==t.type);this.parent()[t]=null,this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(e)),this.setSelection(this.anchorOffset()-1),this._announce("deleted: "+t)}else if("denom"===t){const t=this.parent().numer.filter(t=>"placeholder"!==t.type&&"first"!==t.type),e=this.parent().denom.filter(t=>"placeholder"!==t.type&&"first"!==t.type);this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(e)),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(t)),this.setSelection(this.anchorOffset()+t.length-1),this._announce("deleted: denominator")}else if("body"===t){const t=this.siblings().filter(t=>"placeholder"!==t.type);this.path.length>1&&(t.shift(),this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(t)),this.setSelection(this.anchorOffset()-1),this._announce("deleted: root"))}else this.move(-1),this.delete(-1)}else if(t>0)if(e!==i.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(this.sibling(1).type)?this.move(1):(this._announce("delete",null,i.slice(e+1,e+2)),i.splice(e+1,1));else if("numer"===this.relation()){const t=this.parent().numer.filter(t=>"placeholder"!==t.type&&"first"!==t.type),e=this.parent().denom.filter(t=>"placeholder"!==t.type&&"first"!==t.type);this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(e)),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(t)),this.setSelection(this.anchorOffset()+t.length-1),this._announce("deleted: numerator")}else this.move(1),this.delete(1)}else{const t=this.startOffset()+1,e=this.endOffset()+1;this._announce("deleted",null,i.slice(t,e)),i.splice(t,e-t),this.setSelection(t-1)}this.suppressChangeNotifications=e,this.selectionDidChange(),this.contentDidChange()},ze.prototype.moveToNextPlaceholder_=function(){this.leap(1)},ze.prototype.moveToPreviousPlaceholder_=function(){this.leap(-1)},ze.prototype.moveToNextChar_=function(){this.move(1)},ze.prototype.moveToPreviousChar_=function(){this.move(-1)},ze.prototype.moveUp_=function(){this.up()},ze.prototype.moveDown_=function(){this.down()},ze.prototype.moveToNextWord_=function(){this.skip(1)},ze.prototype.moveToPreviousWord_=function(){this.skip(-1)},ze.prototype.moveToGroupStart_=function(){this.setSelection(0)},ze.prototype.moveToGroupEnd_=function(){this.setSelection(-1)},ze.prototype.moveToMathFieldStart_=function(){this.jumpToMathFieldBoundary(-1)},ze.prototype.moveToMathFieldEnd_=function(){this.jumpToMathFieldBoundary(1)},ze.prototype.deleteNextChar_=function(){this.delete_(1)},ze.prototype.deletePreviousChar_=function(){this.delete_(-1)},ze.prototype.deleteNextWord_=function(){this.extendToNextBoundary(),this.delete_()},ze.prototype.deletePreviousWord_=function(){this.extendToPreviousBoundary(),this.delete_()},ze.prototype.deleteToGroupStart_=function(){this.extendToGroupStart(),this.delete_()},ze.prototype.deleteToGroupEnd_=function(){this.extendToMathFieldStart(),this.delete_()},ze.prototype.deleteToMathFieldEnd_=function(){this.extendToMathFieldEnd(),this.delete_()},ze.prototype.transpose_=function(){},ze.prototype.extendToNextChar_=function(){this.extend(1)},ze.prototype.extendToPreviousChar_=function(){this.extend(-1)},ze.prototype.extendToNextWord_=function(){this.skip(1,{extend:!0})},ze.prototype.extendToPreviousWord_=function(){this.skip(-1,{extend:!0})},ze.prototype.extendUp_=function(){this.up({extend:!0})},ze.prototype.extendDown_=function(){this.down({extend:!0})},ze.prototype.extendToNextBoundary_=function(){this.skip(1,{extend:!0})},ze.prototype.extendToPreviousBoundary_=function(){this.skip(-1,{extend:!0})},ze.prototype.extendToGroupStart_=function(){this.setExtent(-this.anchorOffset())},ze.prototype.extendToGroupEnd_=function(){this.setExtent(this.siblings().length-this.anchorOffset())},ze.prototype.extendToMathFieldStart_=function(){this.jumpToMathFieldBoundary(-1,{extend:!0})},ze.prototype.extendToMathFieldEnd_=function(){this.jumpToMathFieldBoundary(1,{extend:!0})},ze.prototype.moveToSuperscript_=function(){if(this.collapseForward(),!this.anchor().superscript)if(this.anchor().subscript)this.anchor().superscript=[je()];else{const t=this.sibling(1);t&&t.superscript?this.path[this.path.length-1].offset+=1:t&&t.subscript?(this.path[this.path.length-1].offset+=1,this.anchor().superscript=[je()]):("limits"!==this.anchor().limits&&(this.siblings().splice(this.anchorOffset()+1,0,new me.MathAtom(this.parent().anchorMode,"msubsup","​",this.anchorStyle())),this.path[this.path.length-1].offset+=1),this.anchor().superscript=[je()])}this.path.push({relation:"superscript",offset:0}),this.selectGroup_()},ze.prototype.moveToSubscript_=function(){if(this.collapseForward(),!this.anchor().subscript)if(this.anchor().superscript)this.anchor().subscript=[je()];else{const t=this.sibling(1);t&&t.subscript?this.path[this.path.length-1].offset+=1:t&&t.superscript?(this.path[this.path.length-1].offset+=1,this.anchor().subscript=[je()]):("limits"!==this.anchor().limits&&(this.siblings().splice(this.anchorOffset()+1,0,new me.MathAtom(this.parent().anchorMode,"msubsup","​",this.anchorStyle())),this.path[this.path.length-1].offset+=1),this.anchor().subscript=[je()])}this.path.push({relation:"subscript",offset:0}),this.selectGroup_()},ze.prototype.moveToOpposite_=function(){const t={superscript:"subscript",subscript:"superscript",denom:"numer",numer:"denom"}[this.relation()];t||this.moveToSuperscript_(),this.parent()[t]||(this.parent()[t]=[je()]),this.setSelection(0,"end",t)},ze.prototype.moveBeforeParent_=function(){this.path.length>1?(this.path.pop(),this.setSelection(this.anchorOffset()-1)):this._announce("plonk")},ze.prototype.moveAfterParent_=function(){if(this.path.length>1){const t=Ee(this);this.path.pop(),this.setExtent(0),this._announce("move",t)}else this._announce("plonk")},ze.prototype._addCell=function(t){const e=this.parent();if(e&&"array"===e.type&&Array.isArray(e.array)){const i=this.relation();if(e.array){const s=Ie(e.array,i);"after row"===t||"before row"===t?(s.col=0,s.row=s.row+("after row"===t?1:0),e.array.splice(s.row,0,[[]])):(s.col+="after column"===t?1:0,e.array[s.row].splice(s.col,0,[]));const a=qe(e.array,s);this.path.pop(),this.path.push({relation:"cell"+a.toString(),offset:0}),this.insertFirstAtom()}}},ze.prototype.convertParentToArray=function(){const t=this.parent();if("leftright"===t.type){t.type="array";const e={"(":"pmatrix","\\lbrack":"bmatrix","\\lbrace":"cases"}[t.leftDelim]||"matrix",i=Bt.getEnvironmentInfo(e),s=[[t.body]];i.parser&&Object.assign(t,i.parser(e,[],s)),t.tabularMode=i.tabular,t.parseMode=this.anchorMode(),t.env={...i},t.env.name=e,t.array=s,t.rowGaps=[0],delete t.body,this.path[this.path.length-1].relation="cell0"}},ze.prototype.addRowAfter_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell("after row"),this.contentDidChange()},ze.prototype.addRowBefore_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell("before row"),this.contentDidChange()},ze.prototype.addColumnAfter_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell("after column"),this.contentDidChange()},ze.prototype.addColumnBefore_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell("before column"),this.contentDidChange()},ze.prototype._applyStyle=function(t){if(this.isCollapsed())return;const e=this;function i(t,i){let s=!0;return e.forEachSelected(e=>{s=s&&e[t]===i},{recursive:!0}),s}t.color&&i("color",t.color)&&(t.color="none"),t.backgroundColor&&i("backgroundColor",t.backgroundColor)&&(t.backgroundColor="none"),t.fontFamily&&i("fontFamily",t.fontFamily)&&(t.fontFamily="none"),t.series&&(t.fontSeries=t.series),t.fontSeries&&i("fontSeries",t.fontSeries)&&(t.fontSeries="auto"),t.shape&&(t.fontShape=t.shape),t.fontShape&&i("fontShape",t.fontShape)&&(t.fontShape="auto"),t.size&&(t.fontSize=t.size),t.fontSize&&i("fontSize",t.fontSize)&&(t.fontSize="size5"),this.contentWillChange(),this.forEachSelected(e=>e.applyStyle(t),{recursive:!0}),this.contentDidChange()};var Ge={EditableMathlist:ze,parseMathString:We};const Ze={"#":"#","|":"|","[":"BracketLeft","]":"BracketRight","-":"Minus","+":"Plus","=":"Equal","/":"Slash","\\":"Backslash"},Xe={Space:"Spacebar"," ":"Spacebar",Escape:"Esc",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},Je={q:"KeyQ",w:"KeyW",e:"KeyE",r:"KeyR",t:"KeyT",y:"KeyY",u:"KeyU",i:"KeyI",o:"KeyO",p:"KeyP",a:"KeyA",s:"KeyS",d:"KeyD",f:"KeyF",g:"KeyG",h:"KeyH",j:"KeyJ",k:"KeyK",l:"KeyL",z:"KeyZ",x:"KeyX",c:"KeyC",v:"KeyV",b:"KeyB",n:"KeyN",m:"KeyM",1:"Digit1",2:"Digit2",3:"Digit3",4:"Digit4",5:"Digit5",6:"Digit6",7:"Digit7",8:"Digit8",9:"Digit9",0:"Digit0","!":"Shift-Digit1","@":"Shift-Digit2","#":"Shift-Digit3",$:"Shift-Digit4","%":"Shift-Digit5","^":"Shift-Digit6","&":"Shift-Digit7","*":"Shift-Digit8","(":"Shift-Digit9",")":"Shift-Digit0","-":"Minus",_:"Shift-Minus","/":"Slash","\\":"Backslash","|":"Shift-Backslash","?":"Shift-Slash"," ":"Spacebar"};function Ye(t){let e,i=!0;"Unidentified"===t.key&&t.target&&(e=Je[t.target.value]||t.target.value),e||(Ze[t.key]?(e=Ze[t.key],i=!1):e=Xe[t.key],e||(e=Je[t.key.toLowerCase()]||t.key)),!e&&t.code&&(e=Xe[t.code]||t.code);const s=[];return t.ctrlKey&&s.push("Ctrl"),t.metaKey&&s.push("Meta"),i&&t.altKey&&s.push("Alt"),i&&t.shiftKey&&s.push("Shift"),0===s.length?e:(s.push(e),s.join("-"))}function Qe(t,e){let i,s=null,a=null,o=!1,n=!1;function r(t){clearTimeout(i),i=setTimeout(function(){clearTimeout(i),t()})}function l(){if(function(t){return t.selectionStart!==t.selectionEnd}(t))return;const i=t.value;t.value="",i.length>0&&e.typedText(i)}const c=t||e.container;c.addEventListener("keydown",function(i){if("function"==typeof e.allowDeadKey&&e.allowDeadKey()||"Dead"!==i.key&&"Unidentified"!==i.key&&229!==i.keyCode)n=!1;else{n=!0,o=!1;const i=e.blur,s=e.focus;e.blur=null,e.focus=null,t.blur(),t.focus(),e.blur=i,e.focus=s}return!(!o&&"CapsLock"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(s=i,a=null,e.keystroke(Ye(i),i))},!0),c.addEventListener("keypress",function(t){o||(s&&a&&e.keystroke(Ye(s),s),a=t,r(l))},!0),c.addEventListener("keyup",function(){o||!s||a||l()},!0),c.addEventListener("paste",function(){t.focus();const i=t.value;t.value="",i.length>0&&e.paste(i)},!0),c.addEventListener("copy",function(t){e.copy&&e.copy(t)},!0),c.addEventListener("cut",function(t){e.cut&&e.cut(t)},!0),c.addEventListener("blur",function(){s=null,a=null,e.blur&&e.blur()},!0),c.addEventListener("focus",function(){e.focus&&e.focus()},!0),c.addEventListener("compositionstart",()=>{o=!0},!0),c.addEventListener("compositionend",()=>{o=!1,r(l)},!0),c.addEventListener("input",()=>{if(n){const i=e.blur,s=e.focus;e.blur=null,e.focus=null,t.blur(),t.focus(),e.blur=i,e.focus=s,n=!1,o=!1,r(l)}else o||r(l)})}var ti={delegateKeyboardEvents:Qe,select:Qe.select,keyboardEventToString:Ye,eventToChar:function(t){if(!t)return"";let e;return"Unidentified"===t.key&&t.target&&(e=t.target.value),e=e||t.key||t.code,/^(Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(e)&&(e=""),e},charToEvent:function(t){return{key:t,metaKey:!1,ctrlKey:!1,altKey:!1,shiftKey:!1}}},ei={UndoManager:class{constructor(t){this.mathlist=t,this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,this.reset()}reset(){this.stack=[],this.index=-1}startRecording(){this.record=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(t){this.canUndo()&&(t&&"function"==typeof t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,"undo"),this.restore(this.stack[this.index-1],t),this.index-=1,t&&"function"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,"undo"),this.canCoalesce=!1)}redo(t){this.canRedo()&&(t&&"function"===t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,"redo"),this.index+=1,this.restore(this.stack[this.index],t),t&&"function"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,"redo"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(t){this.record&&(t&&"function"===t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,"snapshot"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.mathlist.root.toLatex(),selection:this.mathlist.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),t&&"function"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,"snapshot"),this.canCoalesce=!1)}snapshotAndCoalesce(t){this.canCoalesce&&this.pop(),this.snapshot(t),this.canCoalesce=!0}save(){return{latex:this.mathlist.root.toLatex(),selection:this.mathlist.toString()}}restore(t,e){const i=this.mathlist.suppressChangeNotifications;void 0!==e.suppressChangeNotifications&&(this.mathlist.suppressChangeNotifications=e.suppressChangeNotifications),this.mathlist.insert(t?t.latex:"",{mode:"math",insertionMode:"replaceAll",selectionMode:"after",format:"latex",...e}),this.mathlist.setPath(t?t.selection:[{relation:"body",offset:0}]),this.mathlist.suppressChangeNotifications=i}}};const ii={"\\mathrm":"\\mathrm{x=+3.14, x\\in A}","\\mathbf":"\\mathbf{x=+3.14, x\\in A}","\\bf":"\\bf{x=+3.14, x\\in A}","\\bm":"\\bm{x=+3.14, x\\in A}","\\bold":"\\bold{x=+3.14, x\\in A}","\\mathit":"\\mathbb{x=+3.14}","\\mathbb":"\\mathbb{ABCD}","\\Bbb":"\\mathbb{ABCD}","\\frak":"\\frak{ABCD}","\\mathfrak":"\\mathfrak{ABCD}","\\mathscr":"\\mathscr{ABCD}","\\mathsf":"\\mathsf{ABab01}","\\mathtt":"\\mathtt{x=+3.14, x\\in A}","\\mathcal":"\\mathcal{ABCD}","\\boldsymbol":"\\boldsymbol{ABab01+=}","\\text":"\\text{ABC abc}","\\textrm":"\\textrm{ABC abc}","\\textnormal":"\\textnormal{ABC abc}","\\textit":"\\textit{ABC abc}","\\textbf":"\\textbf{ABC abc}","\\texttt":"\\texttt{ABC abc}","\\textsf":"\\textsf{ABC abc}","\\textcolor":"{\\textcolor{m0}A}{\\textcolor{m1}B}{\\textcolor{m2}C }{\\textcolor{m3}a}{\\textcolor{m4}b}{\\textcolor{m5}c}{\\textcolor{m6}8}","\\color":"{\\color{m0}A}{\\color{m1}B}{\\color{m2}C}{\\color{m3}a}{\\color{m4}b}{\\color{m5}c}{\\color{m6}8}","\\underline":'\\underline{\\unicode{"2B1A}}',"\\overline":'\\overline{\\unicode{"2B1A}}',"\\vec":'\\vec{\\unicode{"25CC}}',"\\check":'\\check{\\unicode{"25CC}}',"\\acute":'\\acute{\\unicode{"25CC}}',"\\breve":'\\breve{\\unicode{"25CC}}',"\\tilde":'\\tilde{\\unicode{"25CC}}',"\\hat":'\\hat{\\unicode{"25CC}}',"\\ddot":'\\ddot{\\unicode{"25CC}}',"\\dot":'\\dot{\\unicode{"25CC}}',"\\bar":'\\bar{\\unicode{"25CC}}',"\\!":'\\unicode{"203A}\\!\\unicode{"2039}',"\\,":'\\unicode{"203A}\\,\\unicode{"2039}',"\\:":'\\unicode{"203A}\\:\\unicode{"2039}',"\\;":'\\unicode{"203A}\\;\\unicode{"2039}',"\\quad":'\\unicode{"203A}\\quad\\unicode{"2039}',"\\qquad":'\\unicode{"203A}\\qquad\\unicode{"2039}',"\\enskip":'\\unicode{"203A}\\enskip\\unicode{"2039}',"\\space":'\\unicode{"203A}\\space\\unicode{"2039}',"\\frac":'\\frac{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\dfrac":'\\dfrac{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\cfrac":'\\cfrac{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\tfrac":'\\tfrac{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\dbinom":'\\dbinom{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\tbinom":'\\tbinom{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\binom":'\\binom{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\pdiff":'\\pdiff{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\in":"n\\in\\N","\\notin":"n\\notin\\N","\\not":"B \\not A","\\ni":"N\\in n","\\owns":"N\\owns n","\\subset":"A\\subset B","\\supset":"B\\supset A","\\subseteq":"A\\subseteq B","\\supseteq":"B\\supseteq A","\\nsubseteq":"A\\nsubseteq B","\\nsupseteq":"B\\nsupseteq A","\\subsetneq":"A\\subsetneq B","\\supsetneq":"B\\supsetneq A","\\varsubsetneq":"A\\varsubsetneq B","\\varsupsetneq":"B\\varsupsetneq A","\\nsubseteqq":"A\\varsupsetneq B","\\subsetneqq":"A\\subsetneqq B","\\varsubsetneqq":"A\\varsubsetneqq B","\\nsubset":"A\\nsubset B","\\nsupset":"B\\nsupset A","\\complement":"A^\\complement","\\bigcup":'\\bigcup_{\\unicode{"2B1A}}',"\\bigcap":'\\bigcap_{\\unicode{"2B1A}}',"\\sqrt":'\\sqrt{\\unicode{"2B1A}}',"\\prod":'\\prod_{\\unicode{"2B1A}}^{\\unicode{"2B1A}}',"\\sum":'\\sum_{\\unicode{"2B1A}}^{\\unicode{"2B1A}}',"\\int":'\\int_{\\unicode{"2B1A}}^{\\unicode{"2B1A}}',"\\stackrel":'\\stackrel{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\stackbin":'\\stackbin{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\underset":'\\underset{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\overset":'\\overset{\\unicode{"2B1A}}{\\unicode{"2B1A}}',"\\prime":'\\unicode{"2B1A}^{\\prime}',"\\boxed":'\\boxed{\\unicode{"2B1A}}',"\\colorbox":'\\colorbox{#fbc0bd}{\\unicode{"2B1A}}',"\\bbox":'\\bbox[#ffd400, solid 2px #ffd400]{\\unicode{"2B1A}}',"\\enclose":'\\enclose{updiagonalstrike,roundedbox}[1px solid red, mathbackground="#fbc0bd"]{23+45}',"\\fcolorbox":'\\fcolorbox{#cd0030}{#ffd400}{\\unicode{"2B1A}}',"\\ ":'\\char"2423',"\\top":"{\\color{red}P}\\top","\\bot":"{\\color{#0F0}P}\\bot","\\mid":"P(p\\mid q)","\\rlap":"\\rlap{x}o","\\llap":"o\\llap{/}"},si={"\\text":"roman text","\\textrm":"roman text","\\textnormal":"roman text","\\textit":"italic text","\\textbf":"bold text","\\texttt":"monospaced text","\\textsf":"sans-serif text","\\mathrm":["roman","(upright)"],"\\mathbf":"bold","\\bf":"bold","\\bold":"bold","\\mathit":"italic","\\mathbb":"blackboard","\\Bbb":"blackboard","\\mathscr":"script","\\mathtt":["typewriter","(monospaced)"],"\\mathsf":"sans-serif","\\mathcal":"caligraphic","\\frak":["fraktur","(gothic)"],"\\mathfrak":["fraktur","(gothic)"],"\\textcolor":"text color","\\color":"color","\\forall":"for all","\\exists":"there exists","\\nexists":"there does not exist","\\frac":"fraction","\\dfrac":"display fraction","\\cfrac":"continuous fraction","\\tfrac":"text fraction","\\binom":"binomial coefficient","\\dbinom":"display binomial coefficient","\\tbinom":"text binomial coefficient","\\pdiff":"partial differential","\\vec":"vector","\\check":"caron","\\acute":"acute","\\breve":"breve","\\tilde":"tilde","\\dot":"dot","\\hat":["hat","circumflex"],"\\ddot":"double dot","\\bar":"bar","\\prime":"prime","\\doubleprime":"double prime","\\varnothing":"empty set","\\emptyset":"empty set","\\subseteq":"subset of or <br>equal to","\\supseteq":"superset of or <br>equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or <br>similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["&#189; em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'<a target="_blank" href="https://en.wikipedia.org/wiki/Cardinal_number">Wikipedia <big>&#x203A;</big></a>'],"\\beth":["beth","beth number",'<a target="_blank" href="https://en.wikipedia.org/wiki/Beth_number">Wikipedia <big>&#x203A;</big></a>'],"\\gimel":["gimel","gimel function",'<a target="_blank" href="https://en.wikipedia.org/wiki/Gimel_function">Wikipedia <big>&#x203A;</big></a>'],"\\O":"empty set","\\N":"set of <br>natural numbers","\\Z":"set of <br>integers","\\Q":"set of <br>rational numbers","\\C":"set of <br>complex numbers","\\R":"set of <br>real numbers","\\P":"set of <br>prime numbers","\\lesseqqgtr":"less than, equal to or<br> greater than","\\gnapprox":"greater than and <br>not approximately","\\lnapprox":"lesser than and <br>not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'<a target="_blank" href="https://en.wikipedia.org/wiki/D%27Alembert_operator">Wikipedia <big>&#x203A;</big></a>'],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'<a target="_blank" href="https://en.wikipedia.org/wiki/Weierstrass%27s_elliptic_functions">Wikipedia <big>&#x203A;</big></a>'],"\\wr":["wreath product",'<a target="_blank" href="https://en.wikipedia.org/wiki/Wreath_product">Wikipedia <big>&#x203A;</big></a>'],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'<a target="_blank" href="https://en.wikipedia.org/wiki/Siemens_(unit)">Wikipedia <big>&#x203A;</big></a>'],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'<a target="_blank" href="https://en.wikipedia.org/wiki/Double_turnstile">Wikipedia <big>&#x203A;</big></a>'],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'<a target="_blank" href="https://en.wikipedia.org/wiki/Turnstile_(symbol)">Wikipedia <big>&#x203A;</big></a>'],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'<a target="_blank" href="https://en.wikipedia.org/wiki/Semidirect_product">Wikipedia <big>&#x203A;</big></a>'],"\\rtimes":["semi direct product",'<a target="_blank" href="https://en.wikipedia.org/wiki/Semidirect_product">Wikipedia <big>&#x203A;</big></a>'],"\\leftthreetimes":["semi direct product",'<a target="_blank" href="https://en.wikipedia.org/wiki/Semidirect_product">Wikipedia <big>&#x203A;</big></a>'],"\\rightthreetimes":["semi direct product",'<a target="_blank" href="https://en.wikipedia.org/wiki/Semidirect_product">Wikipedia <big>&#x203A;</big></a>'],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function ai(t){let e=si[t]||"";return Array.isArray(e)&&(e=e.join("<br>")),e}function oi(t,e){t.popover.innerHTML=e;const i=t._getCaretPosition();i&&(t.popover.style.left=i.x-t.popover.offsetWidth/2+"px",t.popover.style.top=i.y+5+"px"),t.popover.classList.add("is-visible")}function ni(t){t.popover.classList.remove("is-visible")}var ri={getNote:ai,SAMPLES:ii,NOTES:si,showPopoverWithLatex:function(t,e,i){if(!e||0===e.length)return void ni(t);const s=e,a=function(t,e){const i=ke.parseTokens(x.tokenize(t),"math",null,e.config.macros),s=me.decompose({mathstyle:"displaystyle",macros:e.config.macros},i),a=et.makeSpan(s,"ML__base"),o=et.makeSpan("","ML__strut");o.setStyle("height",a.height,"em");const n=et.makeSpan("","ML__strut--bottom");return n.setStyle("height",a.height+a.depth,"em"),n.setStyle("vertical-align",-a.depth,"em"),et.makeSpan([o,n,a],"ML__mathlive").toMarkup()}(ii[s]||e,t),o=ai(s),n=De.forCommand(s);let r=i?'<div class="ML__popover__prev-shortcut" role="button" aria-label="Previous suggestion"><span><span>&#x25B2;</span></span></div>':"";r+='<span class="ML__popover__content" role="button">',r+='<div class="ML__popover__command">'+a+"</div>",o&&(r+='<div class="ML__popover__note">'+o+"</div>"),n&&(r+='<div class="ML__popover__shortcut">'+n+"</div>"),r+="</span>",oi(t,r+=i?'<div class="ML__popover__next-shortcut" role="button" aria-label="Next suggestion"><span><span>&#x25BC;</span></span></div>':"");let l=t.popover.getElementsByClassName("ML__popover__content");l&&l.length>0&&t._attachButtonHandlers(l[0],["complete",{acceptSuggestion:!0}]),(l=t.popover.getElementsByClassName("ML__popover__prev-shortcut"))&&l.length>0&&t._attachButtonHandlers(l[0],"previousSuggestion"),(l=t.popover.getElementsByClassName("ML__popover__next-shortcut"))&&l.length>0&&t._attachButtonHandlers(l[0],"nextSuggestion")},showPopover:oi,hidePopover:ni,updatePopoverPosition:function t(e,i){if(e.popover.classList.contains("is-visible"))if(i&&i.deferred)window.requestAnimationFrame(()=>t(e));else if(e.mathlist.anchor()&&"command"===e.mathlist.anchor().type){const t=e._getCaretPosition();t&&(e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",e.popover.style.top=t.y+5+"px")}else ni(e)}};function li(t,e,i){let s="";if(Array.isArray(e)&&e.length>0){if("first"===e[0].type&&0===(e=e.slice(1)).length)return"";s=function t(e,i,s,a){if(0===s.length)return"";if(0===i.length)return s.map(t=>t.toLatex(a)).join("");let o="",n="",r="";const l=i[0];let c=s[0][l];"fontFamily"===l&&(c=s[0].fontFamily||s[0].baseFontFamily);const h=function(t,e,i){let s=0;if("fontFamily"===e)for(;t[s]&&("mop"===t[s].type||(t[s].fontFamily||t[s].baseFontFamily)===i);)s++;else for(;t[s]&&("mop"===t[s].type||t[s][e]===i);)s++;return s}(s,l,c);if("text"===s[0].mode){if("fontShape"===l&&s[0].fontShape)"it"===s[0].fontShape?(n="\\textit{",r="}"):"sl"===s[0].fontShape?(n="\\textsl{",r="}"):"sc"===s[0].fontShape?(n="\\textsc{",r="}"):"n"===s[0].fontShape?(n="\\textup{",r="}"):(n="\\text{\\fontshape{"+s[0].fontShape+"}",r="}");else if("fontSeries"===l&&s[0].fontSeries)"b"===s[0].fontSeries?(n="\\textbf{",r="}"):"l"===s[0].fontSeries?(n="\\textlf{",r="}"):"m"===s[0].fontSeries?(n="\\textmd{",r="}"):(n="\\text{\\fontseries{"+s[0].fontSeries+"}",r="}");else if("mode"===l){let t=!0;for(let e=0;e<h;e++)if(!(s[e].fontSeries||s[e].fontShape||s[e].fontFamily||s[e].baseFontFamily)){t=!1;break}t||(n="\\text{",r="}")}else if("fontSize"===l&&s[0].fontSize)n="{\\"+({size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[s[0].fontSize]||"")+" ",r="}";else if("fontFamily"===l&&(s[0].fontFamily||s[0].baseFontFamily)){const t={cmr:"textrm",cmtt:"texttt",cmss:"textsf"}[s[0].fontFamily||s[0].baseFontFamily]||"";t?(n="\\"+t+"{",r="}"):(n+="{\\fontfamily{"+(s[0].fontFamily||s[0].baseFontFamily)+"}",r="}")}}else if("math"===s[0].mode)if("fontSeries"===l)"b"===s[0].fontSeries?(n="\\mathbf{",r="}"):s[0].fontSeries&&"n"!==s[0].fontSeries&&(n="{\\fontSeries{"+s[0].fontSeries+"}",r="}");else if("fontShape"===l)"it"===s[0].fontShape?(n="\\mathit{",r="}"):"n"===s[0].fontShape?(n="{\\upshape ",r="}"):s[0].fontShape&&"n"!==s[0].fontShape&&(n="{\\fontShape{"+s[0].fontShape+"}",r="}");else if("fontSize"===l&&s[0].fontSize)n="{\\"+({size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[s[0].fontSize]||"")+" ",r="}";else if("fontFamily"===l&&(s[0].fontFamily||s[0].baseFontFamily)&&!/^(math|main|mainrm)$/.test(s[0].fontFamily||s[0].baseFontFamily)){const o={cal:"mathcal",frak:"mathfrak",bb:"mathbb",scr:"mathscr",cmr:"mathrm",cmtt:"mathtt",cmss:"mathsf"}[s[0].fontFamily||s[0].baseFontFamily]||"";if(o){if(/^\\operatorname{/.test(s[0].latex))return s[0].latex+t(e,i,s.slice(h),a);s[0].isFunction||(n="\\"+o+"{",r="}"),i=[]}else n+="{\\fontfamily{"+(s[0].fontFamily||s[0].baseFontFamily)+"}",r="}"}return"color"!==l||!s[0].color||"none"===s[0].color||e&&e.color===s[0].color||(n="\\textcolor{"+ge.colorToString(s[0].color)+"}{",r="}"),"backgroundColor"!==l||!s[0].backgroundColor||"none"===s[0].backgroundColor||e&&e.backgroundColor===s[0].backgroundColor||(n="\\colorbox{"+ge.colorToString(s[0].backgroundColor)+"}{",r="}"),o+=n,o+=t(e,i.slice(1),s.slice(0,h),a),(o+=r)+t(e,i,s.slice(h),a)}(t,["mode","color","backgroundColor","fontSize","fontFamily","fontShape","fontSeries"],e,i)}else"number"==typeof e||"boolean"==typeof e?s=e.toString():"string"==typeof e?s=e.replace(/\s/g,"~"):e&&"function"==typeof e.toLatex&&(s=e.toLatex(i));return s}function ci(t){const e=ci.locale.substring(0,2);let i="";return ci.strings[ci.locale]&&(i=ci.strings[ci.locale][t]),!i&&ci.strings[e]&&(i=ci.strings[e][t]),i||(i=ci.strings.en[t]),i||(i=t),i}me.MathAtom.prototype.toLatex=function(t){t=void 0!==t&&t;let e,i="",s=0,a=0;const o=this.latex?this.latex.match(/^(\\[^{\s0-9]+)/):null,n=o?o[1]:null;switch(this.type){case"group":i+=this.latexOpen||(this.cssId||this.cssClass?"":"{"),this.cssId&&(i+="\\cssId{"+this.cssId+"}{"),"ML__emph"===this.cssClass?i+="\\emph{"+li(this,this.body,t)+"}":(this.cssClass&&(i+="\\class{"+this.cssClass+"}{"),i+=t?li(this,this.body,!0):this.latex||li(this,this.body,!1),this.cssClass&&(i+="}")),this.cssId&&(i+="}"),i+=this.latexClose||(this.cssId||this.cssClass?"":"}");break;case"array":if(i+="\\begin{"+this.env.name+"}","array"===this.env.name){if(i+="{",this.colFormat)for(a=0;a<this.colFormat.length;a++)this.colFormat[a].align?i+=this.colFormat[a].align:this.colFormat[a].rule&&(i+="|");i+="}"}for(s=0;s<this.array.length;s++){for(e=0;e<this.array[s].length;e++)e>0&&(i+=" & "),i+=li(this,this.array[s][e],t);s<this.array.length-1&&(i+=" \\\\ ")}i+="\\end{"+this.env.name+"}";break;case"root":i=li(this,this.body,t);break;case"genfrac":/^(choose|atop|over)$/.test(this.body)?(i+="{",i+=li(this,this.numer,t),i+="\\"+this.body+" ",i+=li(this,this.denom,t),i+="}"):(i+=n,i+=`{${li(this,this.numer,t)}}{${li(this,this.denom,t)}}`);break;case"surd":i+="\\sqrt",this.index&&(i+="[",i+=li(this,this.index,t),i+="]"),i+=`{${li(this,this.body,t)}}`;break;case"leftright":this.inner?(i+="\\left"+(this.leftDelim||"."),this.leftDelim&&this.leftDelim.length>1&&(i+=" "),i+=li(this,this.body,t),i+="\\right"+(this.rightDelim||"."),this.rightDelim&&this.rightDelim.length>1&&(i+=" ")):(i+="\\mleft"+(this.leftDelim||"."),this.leftDelim&&this.leftDelim.length>1&&(i+=" "),i+=li(this,this.body,t),i+="\\mright"+(this.rightDelim||"."),this.rightDelim&&this.rightDelim.length>1&&(i+=" "));break;case"delim":case"sizeddelim":i+=n+"{"+this.delim+"}";break;case"rule":i+=n,this.shift&&(i+=`[${li(this,this.shift,t)}em]`),i+=`{${li(this,this.width,t)}em}{${li(this,this.height,t)}em}`;break;case"line":case"overlap":case"accent":i+=`${n}{${li(this,this.body,t)}}`;break;case"overunder":i+=`${n}{${li(this,this.overscript||this.underscript,t)}}{${li(parent,this.body,t)}}`;break;case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":case"":/^\\(mathbin|mathrel|mathopen|mathclose|mathpunct|mathord|mathinner)/.test(n)?i+=n+"{"+li(this,this.body,t)+"}":'\\char"'===n?i+=this.latex+" ":"\\unicode"===n?(i+='\\unicode{"',i+=("000000"+this.body.charCodeAt(0).toString(16)).toUpperCase().substr(-6),i+="}"):(this.latex||"string"==typeof this.body)&&(this.latex&&"\\"===this.latex[0]?(i+=this.latex,/[a-zA-Z0-9]$/.test(this.latex)&&(i+=" ")):i+=n||("​"!==this.body?this.latex||this.body:""));break;case"mop":"​"!==this.body&&("\\mathop"===n?i+=n+"{"+li(this,this.body,t)+"}":"\\operatorname"===n?i+=n+"{"+this.body+"}":this.latex&&"\\"===this.latex[0]?(i+=this.latex,/[a-zA-Z0-9]$/.test(this.latex)&&(i+=" ")):i+=n||("​"!==this.body?this.latex||this.body:"")),this.explicitLimits&&("limits"===this.limits&&(i+="\\limits "),"nolimits"===this.limits&&(i+="\\nolimits "));break;case"box":if("\\bbox"===n){if(i+=n,isFinite(this.padding)||void 0!==this.border||void 0!==this.backgroundcolor){const t=[];isFinite(this.padding)&&t.push(Math.floor(100*this.padding)/100+"em"),this.border&&t.push("border:"+this.border),this.backgroundcolor&&t.push(ge.colorToString(this.backgroundcolor)),i+=`[${t.join(",")}]`}i+=`{${li(this,this.body,t)}}`}else"\\boxed"===n?i+=`\\boxed{${li(this,this.body,t)}}`:(i+=n,this.framecolor&&(i+=`{${ge.colorToString(this.framecolor)}}`),this.backgroundcolor&&(i+=`{${ge.colorToString(this.backgroundcolor)}}`),i+=`{${li(this,this.body,t)}}`);break;case"spacing":i+=n,"\\hspace"===n||"\\hspace*"===n?(i+="{",this.width?i+=this.width+"em":i+="0em",i+="}"):(i+=" ",this.width&&(i+=this.width+"em "));break;case"enclose":if(i+=n,"\\enclose"===n){i+="{";let t="";for(const e in this.notation)Object.prototype.hasOwnProperty.call(this.notation,e)&&this.notation[e]&&(i+=t+e,t=" ");i+="}";let e="";t="",this.backgroundcolor&&"transparent"!==this.backgroundcolor&&(e+=t+'mathbackground="'+ge.colorToString(this.backgroundcolor)+'"',t=","),this.shadow&&"auto"!==this.shadow&&(e+=t+'shadow="'+this.shadow+'"',t=","),1!==this.strokeWidth||"solid"!==this.strokeStyle?(e+=t+this.borderStyle,t=","):this.strokeColor&&"currentColor"!==this.strokeColor&&(e+=t+'mathcolor="'+ge.colorToString(this.strokeColor)+'"',t=","),e&&(i+=`[${e}]`)}i+=`{${li(this,this.body,t)}}`;break;case"mathstyle":i+="\\"+this.mathstyle+" ";break;case"space":i+=this.latex;break;case"placeholder":i+="\\placeholder{"+(this.value||"")+"}";break;case"first":case"command":case"msubsup":break;case"error":i+=this.latex}if(this.superscript){let e=li(this,this.superscript,t);1===e.length?("′"===e?e="\\prime ":"″"===e&&(e="\\doubleprime "),i+="^"+e):i+="^{"+e+"}"}if(this.subscript){const e=li(this,this.subscript,t);1===e.length?i+="_"+e:i+="_{"+e+"}"}return i},ci.plural=function(t,e,i){(i=i||{}).type=i.type||"cardinal";const s=ci.locale.substring(0,2),a="ordinal"===i.type?ci.ordinal:ci.cardinal;let o,n="ordinal"===i.type?ci._ordinalPluralCategories.indexOf(a.select(t)):ci._cardinalPluralCategories.indexOf(a.select(t));return ci.strings[ci.locale]&&(o=ci.strings[ci.locale][e]),!o&&ci.strings[s]&&(o=ci.strings[s][e]),o||((o=ci.strings.en[e])||(o=e),n="ordinal"===i.type?ci._ordinalPluralCategories.indexOf(ci._ordinalEnglish.select(t)):ci._cardinalPluralCategories.indexOf(ci._cardinalEnglish.select(t))),o.split(";")[n]||o.split(";")[0]},ci.merge=function(t,e){if(t&&e){const i=ci._locale;ci.locale=t,ci.strings[t]={...ci.strings[t],...e},ci.locale=i}else t&&!e&&(e=t,Object.keys(e).forEach(t=>ci.merge(t,e[t])))},Object.defineProperty(ci,"locale",{set(t){ci._locale=t,ci._ordinal=null,ci._cardinal=null},get:()=>(ci._locale||(ci._locale="undefined"==typeof navigator?"en":navigator.language.slice(0,5)),ci._locale)}),Object.defineProperty(ci,"ordinal",{get:()=>(ci._ordinal||(ci._ordinalEnglish=new Intl.PluralRules("en",{type:"ordinal"}),ci._ordinalEnglishPluralCategories=ci._ordinalEnglish.resolvedOptions().pluralCategories,ci._ordinal=new Intl.PluralRules(ci.locale,{type:"ordinal"}),ci._ordinalPluralCategories=ci._ordinal.resolvedOptions().pluralCategories),ci._ordinal)}),Object.defineProperty(ci,"cardinal",{get:()=>(ci._cardinal||(ci._cardinalEnglish=new Intl.PluralRules("en",{type:"cardinal"}),ci._cardinalEnglishPluralCategories=ci._cardinalEnglish.resolvedOptions().pluralCategories,ci._cardinal=new Intl.PluralRules(ci.locale,{type:"cardinal"}),ci._cardinaPluralCategories=ci._ordinal.resolvedOptions().pluralCategories),ci._cardinal)}),ci.strings={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Symbols and Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Symbole und römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Σύμβολα και ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Símbolos y letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"علائم و حروف لاتین","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres et symboles romains","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Simboli e lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"LaTeXコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"記号とローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Symbole i litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки LaTeX","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Символы и римские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать"}};const hi={numeric:{tooltip:"keyboard.tooltip.numeric",layer:"math",label:"123",layers:["math"]},roman:{tooltip:"keyboard.tooltip.roman",layer:"lower-roman",label:"ABC",layers:["lower-roman","upper-roman","symbols"]},greek:{tooltip:"keyboard.tooltip.greek",layer:"lower-greek",label:"&alpha;&beta;&gamma;",classes:"tex-math",layers:["lower-greek","upper-greek"]},functions:{tooltip:"keyboard.tooltip.functions",layer:"functions",label:"<i>f</i>&thinsp;()",classes:"tex",layers:["functions"]},command:{tooltip:"keyboard.tooltip.command",command:"enterCommandMode",label:"<svg><use xlink:href='#svg-command' /></svg>",layers:["lower-command","upper-command","symbols-command"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"<b>b</b><i>i</i>𝔹"}},di={"\\varphi ":{label:"&Phi;",insert:"\\Phi "},"\\varsigma ":{label:"&Sigma;",insert:"\\Sigma "},"\\epsilon ":{label:"&#x0190;",insert:'{\\char"0190}'},"\\rho ":{label:"&#x3A1",insert:'{\\char"3A1}'},"\\tau ":{label:"&#x3A4;",insert:'{\\char"3A4}'},"\\upsilon ":{label:"&Upsilon;",insert:"\\Upsilon "},"\\theta ":{label:"&Theta;",insert:"\\Theta "},"\\iota ":{label:"&Iota;",insert:'{\\char"399}'},"\\omicron ":{label:"&#x039F;",insert:'{\\char"39F}'},"\\pi ":{label:"&Pi;",insert:"\\Pi "},"\\alpha ":{label:"&Alpha;",insert:'{\\char"391}'},"\\sigma ":{label:"&Sigma;",insert:"\\Sigma "},"\\delta ":{label:"&Delta;",insert:"\\Delta "},"\\phi ":{label:"&#x03a6;",insert:"\\Phi "},"\\gamma ":{label:"&Gamma;",insert:"\\Gamma "},"\\eta ":{label:"&Eta;",insert:'{\\char"397}'},"\\xi ":{label:"&Xi;",insert:"\\Xi "},"\\kappa ":{label:"&Kappa;",insert:'{\\char"39A}'},"\\lambda ":{label:"&Lambda;",insert:"\\Lambda "},"\\zeta ":{label:"&Zeta;",insert:'{\\char"396}'},"\\chi ":{label:"&Chi;",insert:'{\\char"3A7}'},"\\psi ":{label:"&Psi;",insert:"\\Psi "},"\\omega ":{label:"&Omega;",insert:"\\Omega "},"\\beta ":{label:"&Beta;",insert:'{\\char"392}'},"\\nu ":{label:"&Nu;",insert:'{\\char"39D}'},"\\mu ":{label:"&Mu;",insert:'{\\char"39C}'}},pi={0:["\\emptyset","\\varnothing","\\infty",{latex:"#?_0",insert:"#@_0"},"\\circ","\\bigcirc","\\bullet"],2:["\\frac{1}{2}",{latex:"#?^2",insert:"#@^2"}],3:["\\frac{1}{3}",{latex:"#?^3",insert:"#@^3"}],".":[",",";","\\colon",{latex:":",aside:"ratio"},{latex:"\\cdotp",aside:"center dot",classes:"box"},{latex:"\\cdots",aside:"center ellipsis",classes:"box"},{latex:"\\ldotp",aside:"low dot",classes:"box"},{latex:"\\ldots",aside:"low ellipsis",classes:"box"},{latex:"\\vdots",aside:"",classes:"box"},{latex:"\\ddots",aside:"",classes:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",classes:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",classes:"small"},"\\dotplus","\\oplus"],"-":["\\pm","\\mp","\\ominus","\\vert #0 \\vert"],"/":["\\divideontimes","/","\\div"],"(":["\\left( #0\\right)","\\left[ #0\\right]","\\left\\{ #0\\right\\}","\\left\\langle #0\\right\\rangle","\\lfloor","\\llcorner","(","\\lbrack","\\lvert","\\lVert","\\lgroup","\\langle","\\lceil","\\ulcorner","\\lmoustache","\\lbrace"],")":["\\rfloor","\\lrcorner",")","\\rbrack","\\rvert","\\rVert","\\rgroup","\\rangle","\\rceil","\\urcorner","\\rmoustache","\\rbrace"],"=":["\\cong","\\asymp","\\equiv","\\differencedelta","\\varpropto","\\thickapprox","\\approxeq","\\thicksim","\\backsim","\\eqsim","\\simeq","\\Bumpeq","\\bumpeq","\\doteq","\\Doteq","\\fallingdotseq","\\risingdotseq","\\coloneq","\\eqcirc","\\circeq","\\triangleq","\\between"],"!=":["\\neq","\\ncong","","\\nsim"],"<":["\\leq","\\leqq","\\lneqq","\\ll","\\nless","\\nleq","\\precsim","\\lesssim","\\lessgtr","\\prec","\\preccurlyeq","\\lessdot","\\nprec"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\ngtr","\\ngeq","\\succsim","\\gtrsim","\\gtrless","\\succ","\\succcurlyeq","\\gtrdot","\\nsucc"],set:["\\in","\\owns","\\subset","\\nsubset","\\supset","\\nsupset"],"!set":["\\notin","\\backepsilon"],subset:[],supset:[],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",classes:"small"},{latex:"\\int",classes:"small"},{latex:"\\smallint",classes:"small"},{latex:"\\iint",classes:"small"},{latex:"\\iiint",classes:"small"},{latex:"\\oint",classes:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",classes:"small"},{latex:"\\frac{\\partial}{\\partial x}",classes:"small"},"\\capitalDifferentialD","\\rd","\\partial"],nabla:["\\nabla\\times","\\nabla\\cdot","\\nabla^{2}"],"!":["!!","\\Gamma","\\Pi"],accents:["\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],B:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],D:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"}],g:[{latex:"\\gimel",aside:"gimel"}],G:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\N",aside:"set of natural numbers"}],p:[{latex:"\\P",aside:"set of primes"}],q:[{latex:"\\Q",aside:"set of rational numbers"}],r:[{latex:"\\R",aside:"set of real numbers"}],z:[{latex:"\\Z",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",classes:"small"},{latex:"g(#?)",classes:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"],"n-var":["i","j","p","k","a","u"],ii:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"],logic:[{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},{latex:"\\ni",aside:"such that"},{latex:"\\Colon",aside:"such that"},{latex:"\\implies",aside:"implies"},{latex:"\\impliedby",aside:"implied by"},{latex:"\\iff",aside:"if and only if"},{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"},{latex:"\\therefore",aside:"therefore"},{latex:"\\because",aside:"because"},{latex:"^\\biconditional",aside:"biconditional"},"\\leftrightarrow","\\Leftrightarrow","\\to","\\models","\\vdash","\\gets","\\dashv","\\roundimplies"],"set-operators":["\\cap","\\cup","\\setminus","\\smallsetminus","\\complement"],"set-relations":["\\in","\\notin","\\ni","\\owns","\\subset","\\supset","\\subseteq","\\supseteq","\\subsetneq","\\supsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>⁻³⧸₁₈ em"},{latex:'\\unicode{"203A}\\,\\unicode{"2039}',insert:"\\,",aside:"thin space<br>³⧸₁₈ em"},{latex:'\\unicode{"203A}\\:\\unicode{"2039}',insert:"\\:",aside:"medium space<br>⁴⧸₁₈ em"},{latex:'\\unicode{"203A}\\;\\unicode{"2039}',insert:"\\;",aside:"thick space<br>⁵⧸₁₈ em"},{latex:'\\unicode{"203A}\\ \\unicode{"2039}',insert:"\\ ",aside:"⅓ em"},{latex:'\\unicode{"203A}\\enspace\\unicode{"2039}',insert:"\\enspace",aside:"½ em"},{latex:'\\unicode{"203A}\\quad\\unicode{"2039}',insert:"\\quad",aside:"1 em"},{latex:'\\unicode{"203A}\\qquad\\unicode{"2039}',insert:"\\qquad",aside:"2 em"}],delete:[{label:'<span class="warning"><svg><use xlink:href="#svg-trash" /></svg></span>',command:'"deleteAll"'}],"->|":[]};let mi={};const ui={math:"\n <div class='rows'>\n <ul>\n <li class='keycap tex' data-alt-keys='x-var'><i>x</i></li>\n <li class='keycap tex' data-alt-keys='n-var'><i>n</i></li>\n <li class='separator w5'></li>\n <row name='numpad-1'/>\n <li class='separator w5'></li>\n <li class='keycap tex' data-key='ee' data-alt-keys='ee'>e</li>\n <li class='keycap tex' data-key='ii' data-alt-keys='ii'>i</li>\n <li class='keycap tex' data-latex='\\pi' data-alt-keys='numeric-pi'></li>\n </ul>\n <ul>\n <li class='keycap tex' data-key='<' data-alt-keys='<'>&lt;</li>\n <li class='keycap tex' data-key='>' data-alt-keys='>'>&gt;</li>\n <li class='separator w5'></li>\n <row name='numpad-2'/>\n <li class='separator w5'></li>\n <li class='keycap tex' data-alt-keys='x2' data-insert='#@^{2}'><span><i>x</i>&thinsp;²</span></li>\n <li class='keycap tex' data-alt-keys='^' data-insert='#@^{#?}'><span><i>x</i><sup>&thinsp;<small>&#x2b1a;</small></sup></span></li>\n <li class='keycap tex' data-alt-keys='sqrt' data-insert='\\sqrt{#0}' data-latex='\\sqrt{#0}'></li>\n </ul>\n <ul>\n <li class='keycap tex' data-alt-keys='(' >(</li>\n <li class='keycap tex' data-alt-keys=')' >)</li>\n <li class='separator w5'></li>\n <row name='numpad-3'/>\n <li class='separator w5'></li>\n <li class='keycap tex small' data-alt-keys='int' data-latex='\\int_0^\\infty'><span></span></li>\n <li class='keycap tex' data-latex='\\forall' data-alt-keys='logic' ></li>\n <li class='action font-glyph bottom right' data-alt-keys='delete' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'>&#x232b;</li></ul>\n </ul>\n <ul>\n <li class='keycap' data-alt-keys='foreground-color' data-command='[\"applyStyle\",{\"color\":\"#cc2428\"}]'><span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'></span></li>\n <li class='keycap' data-alt-keys='background-color' data-command='[\"applyStyle\",{\"backgroundColor\":\"#fff590\"}]'><span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span></li>\n <li class='separator w5'></li>\n <row name='numpad-4'/>\n <li class='separator w5'></li>\n <arrows/>\n </ul>\n </div>\n ","lower-roman":"\n <div class='rows'>\n <ul>\n <row name='numpad-1' class='if-wide'/>\n <row name='lower-1' shift-layer='upper-roman'/>\n </ul>\n <ul>\n <row name='numpad-2' class='if-wide'/>\n <row name='lower-2' shift-layer='upper-roman''/>\n </ul>\n <ul>\n <row name='numpad-3' class='if-wide'/>\n <row name='lower-3' shift-layer='upper-roman''/>\n </ul>\n <ul>\n <row name='numpad-4' class='if-wide'/>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='symbols'>&infin;≠</li>\n <li class='keycap' data-alt-keys=','>,</li>\n <li class='keycap w50' data-key=' ' data-alt-keys='space'>&nbsp;</li>\n <arrows/>\n </ul>\n </div>","upper-roman":"\n <div class='rows'>\n <ul>\n <row name='numpad-1' class='if-wide'/>\n <row name='upper-1' shift-layer='lower-roman'/>\n </ul>\n <ul>\n <row name='numpad-2' class='if-wide'/>\n <row name='upper-2' shift-layer='lower-roman'/>\n </ul>\n <ul>\n <row name='numpad-3' class='if-wide'/>\n <row name='upper-3' shift-layer='lower-roman'/>\n </ul>\n <ul>\n <row name='numpad-4' class='if-wide'/>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='symbols'>&infin;≠</li>\n <li class='keycap' data-alt-keys='.'>;</li>\n <li class='keycap w50' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>",symbols:"\n <div class='rows'>\n <ul>\n <row name='numpad-1' class='if-wide'/>\n <li class='keycap tex' data-alt-keys='(' data-insert='\\lbrace '>{</li>\n <li class='keycap tex' data-alt-keys=')' data-insert='\\rbrace '>}</li>\n <li class='separator w5'></li>\n <li class='keycap tex' data-alt-keys='set' data-insert='\\in '>&#x2208;</li>\n <li class='keycap tex' data-alt-keys='!set' data-insert='\\notin '>&#x2209;</li>\n <li class='keycap tex' data-insert='\\Re '>&#x211c;<aside>Real</aside></li>\n <li class='keycap tex' data-insert='\\Im '>&#x2111;<aside>Imaginary</aside></li>\n <li class='keycap w15' data-insert='\\ulcorner#0\\urcorner '><span><sup>&#x250c;</sup><span><span style='color:#ddd'>o</span><sup>&#x2510;</sup></span><aside>ceil</aside></li>\n <li class='keycap tex' data-alt-keys='nabla' data-insert='\\nabla '>&#x2207;<aside>nabla</aside></li>\n <li class='keycap tex' data-alt-keys='infinity' data-insert='\\infty '>&#x221e;</li>\n\n </ul>\n <ul>\n <row name='numpad-2' class='if-wide'/>\n <li class='keycap tex' data-alt-keys='(' data-insert='\\lbrack '>[</li>\n <li class='keycap tex' data-alt-keys=')' data-insert='\\rbrack '>]</li>\n <li class='separator w5'></li>\n <li class='keycap tex' data-alt-keys='subset' data-insert='\\subset '>&#x2282;</li>\n <li class='keycap tex' data-alt-keys='supset' data-insert='\\supset '>&#x2283;</li>\n <li class='keycap tex' data-key='!' data-alt-keys='!'>!<aside>factorial</aside></li>\n <li class='keycap' data-insert='^{\\prime} '><span><sup><span><span style='color:#ddd'>o</span>&#x2032</sup></span><aside>prime</aside></li>\n <li class='keycap w15' data-insert='\\llcorner#0\\lrcorner '><span><sub>&#x2514;</sub><span style='color:#ddd'>o</span><sub>&#x2518;</sub></span><aside>floor</aside></li>\n <li class='keycap tex' data-insert='\\partial '>&#x2202;<aside>partial<br>derivative</aside></li>\n <li class='keycap tex' data-insert='\\emptyset '>&#x2205;<aside>empty set</aside></li>\n\n </ul>\n <ul>\n <row name='numpad-3' class='if-wide'/>\n <li class='keycap tex' data-alt-keys='(' data-insert='\\langle '>&#x27e8;</li>\n <li class='keycap tex' data-alt-keys=')' data-insert='\\rangle '>&#x27e9;</li>\n <li class='separator w5'></li>\n <li class='keycap tex' data-insert='\\subseteq '>&#x2286;</li>\n <li class='keycap tex' data-insert='\\supseteq '>&#x2287;</li>\n <li class='keycap tex' data-alt-keys='accents' data-insert='\\vec{#@}' data-latex='\\vec{#?}' data-aside='vector'></li>\n <li class='keycap tex' data-alt-keys='accents' data-insert='\\bar{#@}' data-latex='\\bar{#?}' data-aside='bar'></li>\n <li class='keycap tex' data-alt-keys='absnorm' data-insert='\\lvert #@ \\rvert ' data-latex='\\lvert #? \\rvert' data-aside='abs'></li>\n <li class='keycap tex' data-insert='\\ast '>&#x2217;<aside>asterisk</aside></li>\n\n <li class='action font-glyph bottom right w15'\n data-shifted='<span class=\"warning\"><svg><use xlink:href=\"#svg-trash\" /></svg></span>'\n data-shifted-command='\"deleteAll\"'\n data-alt-keys='delete' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'\n >&#x232b;</li>\n </ul>\n <ul>\n <row name='numpad-4' class='if-wide'/>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='lower-roman'>abc</li>\n <li class='keycap tex' data-insert='\\cdot '>&#x22c5;<aside>centered dot</aside></li>\n <li class='keycap tex' data-insert='\\colon '>:<aside>colon</aside></li>\n <li class='keycap tex' data-insert='\\circ '>&#x2218;<aside>circle</aside></li>\n <li class='keycap tex' data-insert='\\approx '>&#x2248;<aside>approx.</aside></li>\n <li class='keycap tex' data-insert='\\ne '>&#x2260;</li>\n <li class='keycap tex' data-insert='\\pm '>&#x00b1;</li>\n <arrows/>\n </ul>\n </div>","lower-greek":"\n <div class='rows'>\n <ul><li class='keycap tex' data-insert='\\varphi '><i>&#x03c6;</i><aside>phi var.</aside></li>\n <li class='keycap tex' data-insert='\\varsigma '><i>&#x03c2;</i><aside>sigma var.</aside></li>\n <li class='keycap tex' data-insert='\\epsilon '><i>&#x03f5;</i></li>\n <li class='keycap tex' data-insert='\\rho '><i>&rho;</i></li>\n <li class='keycap tex' data-insert='\\tau '><i>&tau;</i></li>\n <li class='keycap tex' data-insert='\\upsilon '><i>&upsilon;</i></li>\n <li class='keycap tex' data-insert='\\theta '><i>&theta;</i></li>\n <li class='keycap tex' data-insert='\\iota '><i>&iota;</i></li>\n <li class='keycap tex' data-insert='\\omicron '>&omicron;</i></li>\n <li class='keycap tex' data-insert='\\pi '><i>&pi;</i></li>\n </ul>\n <ul><li class='keycap tex' data-insert='\\alpha ' data-shifted='&Alpha;' data-shifted-command='[\"insert\",\"{\\\\char\\\"391}\"]'><i>&alpha;</i></li>\n <li class='keycap tex' data-insert='\\sigma '><i>&sigma;</i></li>\n <li class='keycap tex' data-insert='\\delta '><i>&delta;</i></li>\n <li class='keycap tex' data-insert='\\phi '><i>&#x03d5;</i></i></li>\n <li class='keycap tex' data-insert='\\gamma '><i>&gamma;</i></li>\n <li class='keycap tex' data-insert='\\eta '><i>&eta;</i></li>\n <li class='keycap tex' data-insert='\\xi '><i>&xi;</i></li>\n <li class='keycap tex' data-insert='\\kappa '><i>&kappa;</i></li>\n <li class='keycap tex' data-insert='\\lambda '><i>&lambda;</i></li>\n </ul>\n <ul><li class='shift modifier font-glyph bottom left w15 layer-switch' data-layer='upper-greek'>&#x21e7;</li>\n <li class='keycap tex' data-insert='\\zeta '><i>&zeta;</i></li>\n <li class='keycap tex' data-insert='\\chi '><i>&chi;</i></li>\n <li class='keycap tex' data-insert='\\psi '><i>&psi;</i></li>\n <li class='keycap tex' data-insert='\\omega '><i>&omega;</i></li>\n <li class='keycap tex' data-insert='\\beta '><i>&beta;</i></li>\n <li class='keycap tex' data-insert='\\nu '><i>&nu;</i></li>\n <li class='keycap tex' data-insert='\\mu '><i>&mu;</i></li>\n <li class='action font-glyph bottom right w15'\n data-shifted='<span class=\"warning\"><svg><use xlink:href=\"#svg-trash\" /></svg></span>'\n data-shifted-command='\"deleteAll\"'\n data-alt-keys='delete' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'\n >&#x232b;</li>\n </ul>\n <ul>\n <li class='keycap ' data-key=' '>&nbsp;</li>\n <li class='keycap'>,</li>\n <li class='keycap tex' data-insert='\\varepsilon '><i>&#x03b5;</i><aside>epsilon var.</aside></li>\n <li class='keycap tex' data-insert='\\vartheta '><i>&#x03d1;</i><aside>theta var.</aside></li>\n <li class='keycap tex' data-insert='\\varkappa '><i>&#x3f0;</i><aside>kappa var.</aside></li>\n <li class='keycap tex' data-insert='\\varpi '><i>&#x03d6;<aside>pi var.</aside></i></li>\n <li class='keycap tex' data-insert='\\varrho '><i>&#x03f1;</i><aside>rho var.</aside></li>\n <arrows/>\n </ul>\n </div>","upper-greek":"\n <div class='rows'>\n <ul><li class='keycap tex' data-insert='\\Phi '>&Phi;<aside>phi</aside></li>\n <li class='keycap tex' data-insert='\\Sigma '>&Sigma;<aside>sigma</aside></li>\n <li class='keycap tex' data-insert='{\\char\"0190}'>&#x0190;<aside>epsilon</aside></li>\n <li class='keycap tex' data-insert='{\\char\"3A1}'>&#x3A1;<aside>rho</aside></li>\n <li class='keycap tex' data-insert='{\\char\"3A4}'>&#x3A4;<aside>tau</aside></li>\n <li class='keycap tex' data-insert='\\Upsilon '>&Upsilon;<aside>upsilon</aside></li>\n <li class='keycap tex' data-insert='\\Theta '>&Theta;<aside>theta</aside></li>\n <li class='keycap tex' data-insert='{\\char\"399}'>&Iota;<aside>iota</aside></li>\n <li class='keycap tex' data-insert='{\\char\"39F}'>&#x039F;<aside>omicron</aside></li>\n <li class='keycap tex' data-insert='\\Pi '>&Pi;<aside>pi</aside></li></ul>\n <ul><li class='keycap tex' data-insert='{\\char\"391}'>&#x391;<aside>alpha</aside></li>\n <li class='keycap tex' data-insert='\\Sigma '>&Sigma;<aside>sigma</aside></li>\n <li class='keycap tex' data-insert='\\Delta '>&Delta;<aside>delta</aside></li>\n <li class='keycap tex' data-insert='\\Phi '>&#x03a6;<aside>phi</aside></li>\n <li class='keycap tex' data-insert='\\Gamma '>&Gamma;<aside>gamma</aside></li>\n <li class='keycap tex' data-insert='{\\char\"397}'>&Eta;<aside>eta</aside></li>\n <li class='keycap tex' data-insert='\\Xi '>&Xi;<aside>xi</aside></li>\n <li class='keycap tex' data-insert='{\\char\"39A}'>&Kappa;<aside>kappa</aside></li>\n <li class='keycap tex' data-insert='\\Lambda '>&Lambda;<aside>lambda</aside></li></ul>\n <ul><li class='shift modifier font-glyph bottom left selected w15 layer-switch' data-layer='lower-greek'>&#x21e7;</li>\n <li class='keycap tex' data-insert='{\\char\"396}'>&Zeta;<aside>zeta</aside></li>\n <li class='keycap tex' data-insert='{\\char\"3A7}'>&Chi;<aside>chi</aside></li>\n <li class='keycap tex' data-insert='\\Psi '>&Psi;<aside>psi</aside></li>\n <li class='keycap tex' data-insert='\\Omega '>&Omega;<aside>omega</aside></li>\n <li class='keycap tex' data-insert='{\\char\"392}'>&Beta;<aside>beta</aside></li>\n <li class='keycap tex' data-insert='{\\char\"39D}'>&Nu;<aside>nu</aside></li>\n <li class='keycap tex' data-insert='{\\char\"39C}'>&Mu;<aside>mu</aside></li>\n <li class='action font-glyph bottom right w15' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'>&#x232b;</li></ul>\n <ul>\n <li class='separator w10'>&nbsp;</li>\n <li class='keycap'>.</li>\n <li class='keycap w50' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>","lower-command":"\n <div class='rows'>\n <ul><row name='lower-1' class='tt' shift-layer='upper-command'/></ul>\n <ul><row name='lower-2' class='tt' shift-layer='upper-command'/></ul>\n <ul><row name='lower-3' class='tt' shift-layer='upper-command'/></ul>\n <ul>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='symbols-command'>01#</li>\n <li class='keycap tt' data-shifted='[' data-shifted-command='[\"insertAndUnshiftKeyboardLayer\", \"[\"]'>{</li>\n <li class='keycap tt' data-shifted=']' data-shifted-command='[\"insertAndUnshiftKeyboardLayer\", \"]\"]'>}</li>\n <li class='keycap tt' data-shifted='(' data-shifted-command='[\"insertAndUnshiftKeyboardLayer\", \"(\"]'>^</li>\n <li class='keycap tt' data-shifted=')' data-shifted-command='[\"insertAndUnshiftKeyboardLayer\", \")\"]'>_</li>\n <li class='keycap w20' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>","upper-command":"\n <div class='rows'>\n <ul><row name='upper-1' class='tt' shift-layer='lower-command'/></ul>\n <ul><row name='upper-2' class='tt' shift-layer='lower-command'/></ul>\n <ul><row name='upper-3' class='tt' shift-layer='lower-command'/></ul>\n <ul>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='symbols-command'01#</li>\n <li class='keycap tt'>[</li>\n <li class='keycap tt'>]</li>\n <li class='keycap tt'>(</li>\n <li class='keycap tt'>)</li>\n <li class='keycap w20' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>","symbols-command":"\n <div class='rows'>\n <ul><li class='keycap tt'>1</li><li class='keycap tt'>2</li><li class='keycap tt'>3</li><li class='keycap tt'>4</li><li class='keycap tt'>5</li><li class='keycap tt'>6</li><li class='keycap tt'>7</li><li class='keycap tt'>8</li><li class='keycap tt'>9</li><li class='keycap tt'>0</li></ul>\n <ul><li class='keycap tt'>!</li><li class='keycap tt'>@</li><li class='keycap tt'>#</li><li class='keycap tt'>$</li><li class='keycap tt'>%</li><li class='keycap tt'>^</li><li class='keycap tt'>&</li><li class='keycap tt'>*</li><li class='keycap tt'>+</li><li class='keycap tt'>=</li></ul>\n <ul>\n <li class='keycap tt'>\\</li>\n <li class='keycap tt'>|</li>\n <li class='keycap tt'>/</li>\n <li class='keycap tt'>`</li>\n <li class='keycap tt'>;</li>\n <li class='keycap tt'>:</li>\n <li class='keycap tt'>?</li>\n <li class='keycap tt'>'</li>\n <li class='keycap tt'>\"</li>\n <li class='action font-glyph bottom right'\n data-shifted='<span class=\"warning\"><svg><use xlink:href=\"#svg-trash\" /></svg></span>'\n data-shifted-command='\"deleteAll\"'\n data-alt-keys='delete' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'\n >&#x232b;</li>\n </ul>\n <ul>\n <li class='layer-switch font-glyph modifier bottom left' data-layer='lower-command'>abc</li>\n <li class='keycap tt'>&lt;</li>\n <li class='keycap tt'>&gt;</li>\n <li class='keycap tt'>~</li>\n <li class='keycap tt'>,</li>\n <li class='keycap tt'>.</li>\n <li class='keycap' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>",functions:"\n <div class='rows'>\n <ul><li class='separator'></li>\n <li class='fnbutton' data-insert='\\sin'></li>\n <li class='fnbutton' data-insert='\\sin^{-1}'></li>\n <li class='fnbutton' data-insert='\\ln'></li>\n <li class='fnbutton' data-insert='\\exponentialE^{#?}'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{lcm}(#?)' data-latex='\\operatorname{lcm}()'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{ceil}(#?)' data-latex='\\operatorname{ceil}()'></li>\n <li class='bigfnbutton' data-insert='\\lim_{n\\to\\infty}'></li>\n <li class='bigfnbutton' data-insert='\\int'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{abs}(#?)' data-latex='\\operatorname{abs}()'></li>\n </ul>\n <ul><li class='separator'></li>\n <li class='fnbutton' data-insert='\\cos'></li>\n <li class='fnbutton' data-insert='\\cos^{-1}'></li>\n <li class='fnbutton' data-insert='\\ln_{10}'></li>\n <li class='fnbutton' data-insert='10^{#?}'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{gcd}(#?)' data-latex='\\operatorname{gcd}()'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{floor}(#?)' data-latex='\\operatorname{floor}()'></li>\n <li class='bigfnbutton' data-insert='\\sum_{n\\mathop=0}^{\\infty}'></li>\n <li class='bigfnbutton' data-insert='\\int_{0}^{\\infty}'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{sign}(#?)' data-latex='\\operatorname{sign}()'></li>\n </ul>\n <ul><li class='separator'></li>\n <li class='fnbutton' data-insert='\\tan'></li>\n <li class='fnbutton' data-insert='\\tan^{-1}'></li>\n <li class='fnbutton' data-insert='\\log_{#?}'></li>\n <li class='fnbutton' data-insert='\\sqrt[#?]{#0}'></li>\n <li class='bigfnbutton' data-insert='#0 \\mod' data-latex='\\mod'></li>\n <li class='bigfnbutton' data-insert='\\operatorname{round}(#?) ' data-latex='\\operatorname{round}()'></li>\n <li class='bigfnbutton' data-insert='\\prod_{n\\mathop=0}^{\\infty}' data-latex='{\\tiny \\prod_{n=0}^{\\infty}}'></li>\n <li class='bigfnbutton' data-insert='\\frac{\\differentialD #0}{\\differentialD x}'></li>\n <li class='action font-glyph bottom right' data-command='[\"performWithFeedback\",\"deletePreviousChar\"]'>&#x232b;</li></ul>\n <ul><li class='separator'></li>\n <li class='fnbutton'>(</li>\n <li class='fnbutton'>)</li>\n <li class='fnbutton' data-insert='^{#?} ' data-latex='x^{#?} '></li>\n <li class='fnbutton' data-insert='_{#?} ' data-latex='x_{#?} '></li>\n <li class='keycap w20 ' data-key=' '>&nbsp;</li>\n <arrows/>\n </ul>\n </div>",style:"\n <div class='rows'>\n <ul>\n <li class='keycap' data-alt-keys='foreground-color' data-command='[\"applyStyle\",{\"color\":\"#cc2428\"}]'><span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428'></span></li>\n <li class='keycap' data-alt-keys='background-color' data-command='[\"applyStyle\",{\"backgroundColor\":\"#fff590\"}]'><span style='border-radius: 50%;width:22px;height:22px; background:#fff590'></span></li>\n <li class='separator w5'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"size\":\"size3\"}]' data-latex='\\scriptsize\\text{small}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"size\":\"size5\"}]' data-latex='\\scriptsize\\text{normal}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"size\":\"size9\"}]' data-latex='\\huge\\text{big}'></li>\n <li class='separator w5'></li>\n <li class='keycap' data-latex='\\langle' data-command='[\"insert\", \"\\\\langle\", {\"smartFence\":true}]'></li>\n </ul>\n <ul>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"l\"}]' data-latex='\\fontseries{l}\\text{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"m\"}]' data-latex='\\fontseries{m}\\text{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"b\"}]' data-latex='\\fontseries{b}\\text{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"bx\"}]' data-latex='\\fontseries{bx}\\text{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"sb\"}]' data-latex='\\fontseries{sb}\\text{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"series\":\"c\"}]' data-latex='\\fontseries{c}\\text{Ab}'></li>\n </ul>\n <ul>\n <li class='keycap' data-command='[\"applyStyle\",{\"shape\":\"up\"}]' data-latex='\\textup{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"shape\":\"it\"}]' data-latex='\\textit{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"shape\":\"sl\"}]' data-latex='\\textsl{Ab}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"shape\":\"sc\"}]' data-latex='\\textsc{Ab}'></li>\n <li class='separator w5'></li>\n <li class='keycap' data-insert='\\emph{#?} ' data-latex='\\text{\\emph{emph}}'></li>\n </ul>\n <ul>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"cmr\"}]' data-latex='\\textrm{Az}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"cmtt\"}]' data-latex='\\texttt{Az}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"cmss\"}]' data-latex='\\textsf{Az}'></li>\n\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"bb\"}]' data-latex='\\mathbb{AZ}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"scr\"}]' data-latex='\\mathscr{AZ}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"cal\"}]' data-latex='\\mathcal{A1}'></li>\n <li class='keycap' data-command='[\"applyStyle\",{\"fontFamily\":\"frak\"}]' data-latex='\\mathfrak{Az}'></li>\n </ul>\n </div>"};function fi(t,e,i){t=t.replace(/(^|[^\\])#@/g,"$1#?");const s=ke.parseTokens(x.tokenize(t),"math",e,i.config.macros),a=me.decompose({mathstyle:"displaystyle",macros:i.config.macros},s),o=et.makeSpan(a,"ML__base"),n=et.makeSpan("","ML__strut");n.setStyle("height",o.height,"em");const r=et.makeSpan("","ML__strut--bottom");return r.setStyle("height",o.height+o.depth,"em"),r.setStyle("vertical-align",-o.depth,"em"),et.makeSpan([n,r,o],"ML__mathlive").toMarkup()}function gi(t,e,i){let s="<div class='left'>";const a=e.replace(/\s+/g," ").split(" ");if(a.length>1){const e=Object.assign({},hi,t.config.customVirtualKeyboards||{});for(const t of a){if(!e[t])break;s+="<div class='",t===i?s+="selected ":e[t].command?s+="action ":s+="layer-switch ",s+=(e[t].classes||"")+"'",e[t].tooltip&&(s+="data-tooltip='"+ci(e[t].tooltip)+"' ",s+="data-placement='top' data-delay='1s'"),t!==i&&(e[t].command&&(s+="data-command='\""+e[t].command+"\"'"),e[t].layer&&(s+="data-layer='"+e[t].layer+"'")),s+=">"+e[t].label+"</div>"}}return s+="</div>","<div class='keyboard-toolbar' role='toolbar'>"+(s+=`\n <div class='right'>\n <div class='action'\n data-command='"copyToClipboard"'\n data-tooltip='${ci("tooltip.copy to clipboard")}' data-placement='top' data-delay='1s'>\n <svg><use xlink:href='#svg-copy' /></svg>\n </div>\n <div class='action disabled'\n data-command='"undo"'\n data-tooltip='${ci("tooltip.undo")}' data-placement='top' data-delay='1s'>\n <svg><use xlink:href='#svg-undo' /></svg>\n </div>\n <div class='action disabled'\n data-command='"redo"'\n data-tooltip='${ci("tooltip.redo")}' data-placement='top' data-delay='1s'>\n <svg><use xlink:href='#svg-redo' /></svg>\n </div>\n </div>\n `)+"</div>"}function yi(t,e,i){for(let s=0;s<e.length;++s){const a=e[s];a.getAttribute("data-latex")?a.innerHTML=fi(a.getAttribute("data-latex").replace(/&quot;/g,'"'),{"?":'{\\color{#555}{\\tiny \\char"2B1A}}'},t):""===a.innerHTML&&a.getAttribute("data-insert")?a.innerHTML=fi(a.getAttribute("data-insert").replace(/&quot;/g,'"'),{"?":'{\\color{#555}{\\tiny \\char"2B1A}}'},t):a.getAttribute("data-content")&&(a.innerHTML=a.getAttribute("data-content").replace(/&quot;/g,'"')),a.getAttribute("data-aside")&&(a.innerHTML+="<aside>"+a.getAttribute("data-aside").replace(/&quot;/g,'"')+"</aside>"),a.getAttribute("data-classes")&&a.classList.add(a.getAttribute("data-classes"));let o,n=a.getAttribute("data-insert");if(n&&(n=n.replace(/&quot;/g,'"')),n&&di[n]&&(a.setAttribute("data-shifted",di[n].label),a.setAttribute("data-shifted-command",JSON.stringify(["insertAndUnshiftKeyboardLayer",di[n].insert]))),o=a.getAttribute("data-command")?JSON.parse(a.getAttribute("data-command")):a.getAttribute("data-insert")?["insert",a.getAttribute("data-insert"),{focus:!0,feedback:!0,mode:"math",format:"auto",resetStyle:!0}]:a.getAttribute("data-latex")?["insert",a.getAttribute("data-latex"),{focus:!0,feedback:!0,mode:"math",format:"auto",resetStyle:!0}]:["typedText",a.getAttribute("data-key")||a.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(o=[i,o]),a.getAttribute("data-alt-keys")){const t=mi[a.getAttribute("data-alt-keys")];t&&(o={default:o,pressAndHoldStart:["showAlternateKeys",a.getAttribute("data-alt-keys"),t],pressAndHoldEnd:"hideAlternateKeys"})}t._attachButtonHandlers(a,o)}}function bi(t,e){const i={qwerty:{"lower-1":"qwertyuiop","lower-2":" asdfghjkl ","lower-3":"^zxcvbnm~","upper-1":"QWERTYUIOP","upper-2":" ASDFGHJKL ","upper-3":"^ZXCVBNM~","numpad-1":"789/","numpad-2":"456*","numpad-3":"123-","numpad-4":"0.=+"},azerty:{"lower-1":"azertyuiop","lower-2":"qsdfghjklm","lower-3":"^ wxcvbn ~","upper-1":"AZERTYUIOP","upper-2":"QSDFGHJKLM","upper-3":"^ WXCVBN ~"},qwertz:{"lower-1":"qwertzuiop","lower-2":" asdfghjkl ","lower-3":"^yxcvbnm~","upper-1":"QWERTZUIOP","upper-2":" ASDFGHJKL","upper-3":"^YXCVBNM~"},dvorak:{"lower-1":"^ pyfgcrl ","lower-2":"aoeuidhtns","lower-3":"qjkxbmwvz~","upper-1":"^ PYFGCRL ","upper-2":"AOEUIDHTNS","upper-3":"QJKXBMWVZ~"},colemak:{"lower-1":" qwfpgjluy ","lower-2":"arstdhneio","lower-3":"^zxcvbkm~","upper-1":" QWFPGNLUY ","upper-2":"ARSTDHNEIO","upper-3":"^ZXCVBKM~"}},s=i[t.config.virtualKeyboardLayout]?i[t.config.virtualKeyboardLayout]:i.qwerty;let a,o=e,n=(o=o.replace(/<arrows\/>/g,"\n <li class='action' data-command='[\"performWithFeedback\",\"moveToPreviousChar\"]'\n data-shifted='<svg><use xlink:href=\"#svg-angle-double-left\" /></svg>'\n data-shifted-command='[\"performWithFeedback\",\"extendToPreviousChar\"]'>\n <svg><use xlink:href='#svg-arrow-left' /></svg>\n </li>\n <li class='action' data-command='[\"performWithFeedback\",\"moveToNextChar\"]'\n data-shifted='<svg><use xlink:href=\"#svg-angle-double-right\" /></svg>'\n data-shifted-command='[\"performWithFeedback\",\"extendToNextChar\"]'>\n <svg><use xlink:href='#svg-arrow-right' /></svg>\n </li>\n <li class='action' data-command='[\"performWithFeedback\",\"moveToNextPlaceholder\"]'>\n <svg><use xlink:href='#svg-tab' /></svg></li>")).match(/(<row\s+)(.*)((?:<\/row|\/)>)/);for(;n;){a="";const t=n[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['"])(.*?)\1/g),e={};for(const i of t){const t=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['"])(.*?)\2/);e[t[1]]=t[3]}let r=s[e.name];if(r||(r=i.qwerty[e.name]),r)for(const t of r){let i=e.class||"";i&&(i=" "+i),"~"===t?(a+="<li class='action font-glyph bottom right ",a+=r.length-(r.match(/ /g)||[]).length/2==10?"w10":"w15",a+='\' data-shifted=\'<span class="warning"><svg><use xlink:href="#svg-trash" /></svg></span>\'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deletePreviousChar"]\'\n >&#x232b;</li>'):" "===t?a+="<li class='separator w5'></li>":"^"===t?a+="<li class='shift modifier font-glyph bottom left w15 layer-switch' data-layer='"+e["shift-layer"]+"'>&#x21e7;</li>":"/"===t?a+="<li class='keycap"+i+"' data-alt-keys='/' data-insert='\\frac{#0}{#?}'>&divide;</li>":"*"===t?a+="<li class='keycap"+i+"' data-alt-keys='*' data-insert='\\times '>&times;</li>":"-"===t?a+="<li class='keycap"+i+"' data-alt-keys='*' data-key='-' data-alt-keys='-'>&#x2212;</li>":/tt/.test(i)?a+="<li class='keycap"+i+"' data-alt-keys='"+t+'\' data-command=\'["typedText","'+t+'",{"commandMode":true, "focus":true, "feedback":true}]\'>'+t+"</li>":a+="<li class='keycap"+i+"' data-alt-keys='"+t+"'>"+t+"</li>"}n=(o=o.replace(new RegExp(n[1]+n[2]+n[3]),a)).match(/(<row\s+)(.*)((?:<\/row|\/)>)/)}return o}var xi={make:function(t,e){let i='<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">\n\n <symbol id="svg-command" viewBox="0 0 640 512">\n <path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>\n </symbol>\n\n <symbol id="svg-undo" viewBox="0 0 512 512">\n <path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>\n </symbol>\n <symbol id="svg-redo" viewBox="0 0 512 512">\n <path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>\n </symbol>\n <symbol id="svg-arrow-left" viewBox="0 0 192 512">\n <path d="M25.1 247.5l117.8-116c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L64.7 256l102.2 100.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.7 4.7-12.3 4.7-17 0L25 264.5c-4.6-4.7-4.6-12.3.1-17z"/>\n </symbol>\n <symbol id="svg-arrow-right" viewBox="0 0 192 512">\n <path d="M166.9 264.5l-117.8 116c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17L127.3 256 25.1 155.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0l117.8 116c4.6 4.7 4.6 12.3-.1 17z"/>\n </symbol>\n <symbol id="svg-tab" viewBox="0 0 448 512">\n <path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>\n </symbol>\n <symbol id="svg-copy" viewBox="0 0 448 512">\n <path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM352 32.491a15.88 15.88 0 0 1 7.431 4.195l51.882 51.883A15.885 15.885 0 0 1 415.508 96H352V32.491zM288 464c0 8.822-7.178 16-16 16H48c-8.822 0-16-7.178-16-16V144c0-8.822 7.178-16 16-16h80v240c0 26.51 21.49 48 48 48h112v48zm128-96c0 8.822-7.178 16-16 16H176c-8.822 0-16-7.178-16-16V48c0-8.822 7.178-16 16-16h144v72c0 13.2 10.8 24 24 24h72v240z"/>\n </symbol>\n <symbol id="svg-angle-double-right" viewBox="0 0 320 512">\n <path d="M166.9 264.5l-117.8 116c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17L127.3 256 25.1 155.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0l117.8 116c4.6 4.7 4.6 12.3-.1 17zm128-17l-117.8-116c-4.7-4.7-12.3-4.7-17 0l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17L255.3 256 153.1 356.4c-4.7 4.7-4.7 12.3 0 17l7.1 7.1c4.7 4.7 12.3 4.7 17 0l117.8-116c4.6-4.7 4.6-12.3-.1-17z"/>\n </symbol>\n <symbol id="svg-angle-double-left" viewBox="0 0 320 512">\n <path d="M153.1 247.5l117.8-116c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L192.7 256l102.2 100.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.7 4.7-12.3 4.7-17 0L153 264.5c-4.6-4.7-4.6-12.3.1-17zm-128 17l117.8 116c4.7 4.7 12.3 4.7 17 0l7.1-7.1c4.7-4.7 4.7-12.3 0-17L64.7 256l102.2-100.4c4.7-4.7 4.7-12.3 0-17l-7.1-7.1c-4.7-4.7-12.3-4.7-17 0L25 247.5c-4.6 4.7-4.6 12.3.1 17z"/>\n </symbol>\n <symbol id="svg-trash" viewBox="0 0 448 512">\n <path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>\n </symbol>\n </svg>\n ';pi["foreground-color"]=[];for(const t of ge.LINE_COLORS)pi["foreground-color"].push({classes:"small-button",content:'<span style="border-radius:50%;width:32px;height:32px; box-sizing: border-box; border: 3px solid '+t+'"></span>',command:'["applyStyle",{"color":"'+t+'"}]'});pi["background-color"]=[];for(const t of ge.AREA_COLORS)pi["background-color"].push({classes:"small-button",content:'<span style="border-radius:50%;width:32px;height:32px; background:'+t+'"></span>',command:'["applyStyle",{"backgroundColor":"'+t+'"}]'});mi={...pi},Object.keys(mi).forEach(t=>{mi[t]=mi[t].slice()});const s="abcdefghijklmnopqrstuvwxyz";for(let t=0;t<26;t++){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[t];mi[e]||(mi[e]=[]),mi[e].unshift({latex:"\\mathbb{"+e+"}",aside:"blackboard",insert:"\\mathbb{"+e+"}"}),mi[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),mi[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathsf{"+e+"}"}),mi[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),mi[e].unshift({latex:"\\mathcal{"+e+"}",aside:"script",insert:"\\mathcal{"+e+"}"}),mi[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"}),mi[e].unshift({latex:"\\mathbb{"+s[t]+"}",aside:"blackboard",insert:"\\mathbb{"+s[t]+"}"}),mi[e].unshift({latex:"\\mathbf{"+s[t]+"}",aside:"bold",insert:"\\mathbf{"+s[t]+"}"}),mi[e].unshift({latex:"\\mathsf{"+s[t]+"}",aside:"sans",insert:"\\mathsf{"+s[t]+"}"}),mi[e].unshift({latex:"\\mathcal{"+s[t]+"}",aside:"script",insert:"\\mathcal{"+s[t]+"}"}),mi[e].unshift({latex:"\\mathfrak{"+s[t]+"}",aside:"fraktur",insert:"\\mathfrak{"+s[t]+"}"})}for(let t=0;t<=26;t++){const e=s[t];mi[e]||(mi[e]=[]),mi[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathbb{"+e+"}"}),mi[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),mi[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),mi[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"})}for(let t=0;t<10;t++){const e="0123456789"[t];mi[e]||(mi[e]=[]),mi[e].unshift({latex:"\\mathbf{"+e+"}",aside:"bold",insert:"\\mathbf{"+e+"}"}),mi[e].unshift({latex:"\\mathsf{"+e+"}",aside:"sans",insert:"\\mathsf{"+e+"}"}),mi[e].unshift({latex:"\\mathtt{"+e+"}",aside:"monospace",insert:"\\mathtt{"+e+"}"}),mi[e].unshift({latex:"\\mathcal{"+e+"}",aside:"script",insert:"\\mathcal{"+e+"}"}),mi[e].unshift({latex:"\\mathfrak{"+e+"}",aside:"fraktur",insert:"\\mathfrak{"+e+"}"})}let a=t.config.virtualKeyboards;a||(a="all"),a=a.replace(/\ball\b/i,"numeric roman greek functions command");const o=Object.assign({},ui,t.config.customVirtualKeyboardLayers||{}),n=Object.assign({},hi,t.config.customVirtualKeyboards||{}),r=a.replace(/\s+/g," ").split(" ");for(const e of r){if(!n[e])break;let s=n[e].layers||[];n[e].layer&&s.push(n[e].layer),s=Array.from(new Set(s));for(const n of s){if(!o[n])break;if("object"==typeof o[n]){let t="";if(o[n].styles&&(t+=`<style>${o[n].styles}</style>`),o[n].backdrop&&(t+=`<div class='${o[n].backdrop}'>`),o[n].container&&(t+=`<div class='${o[n].container}'>`),o[n].rows){t+="<div class='rows'>";for(const e of o[n].rows){t+="<ul>";for(const i of e)t+="<li",i.class&&(t+=` class="${i.class}"`),i.key&&(t+=` data-key="${i.key}"`),i.command&&("string"==typeof i.command?t+=` data-command='"${i.command}"'`:(t+=" data-command='",t+=JSON.stringify(i.command),t+="'")),i.insert&&(t+=` data-insert="${i.insert}"`),i.latex&&(t+=` data-latex="${i.latex}"`),i.aside&&(t+=` data-aside="${i.aside}"`),i.altKeys&&(t+=` data-alt-keys="${i.altKeys}"`),i.shifted&&(t+=` data-shifted="${i.shifted}"`),i.shiftedCommand&&(t+=` data-shifted-command="${i.shiftedCommand}"`),t+=`>${i.label?i.label:""}</li>`;t+="</ul>"}t+="</div>",o[n].container&&(t+="</div'>"),o[n].backdrop&&(t+="</div'>")}o[n]=t}i+="<div tabindex=\"-1\" class='keyboard-layer' id='"+n+"'>",i+=gi(t,a,e);const s="function"==typeof o[n]?o[n]():o[n];i+=bi(t,s),i+="</div>"}}const l=document.createElement("div");l.className="ML__keyboard",e?l.classList.add(e):t.config.virtualKeyboardTheme?l.classList.add(t.config.virtualKeyboardTheme):/android|cros/i.test(navigator.userAgent)&&l.classList.add("material"),l.innerHTML=i,yi(t,l.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton"));const c=l.getElementsByClassName("layer-switch");for(let e=0;e<c.length;++e)c[e].classList.contains("shift")?t._attachButtonHandlers(c[e],{pressed:["shiftKeyboardLayer","shift"],default:["switchKeyboardLayer",c[e].getAttribute("data-layer")],pressAndHoldEnd:"unshiftKeyboardLayer"}):t._attachButtonHandlers(c[e],{default:["switchKeyboardLayer",c[e].getAttribute("data-layer")]});const h=l.getElementsByClassName("keyboard-layer");return Array.from(h).forEach(t=>{t.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation()}),t.addEventListener("touchstart",t=>{t.preventDefault(),t.stopPropagation()})}),h[0].classList.add("is-visible"),window.addEventListener("mouseup",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener("blur",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener("touchend",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener("touchcancel",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),l},makeKeycap:yi};const ki={"−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega"},vi={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\langle":"(:","\\rangle":":)"},wi={"\\pm":"&PlusMinus;","\\times":"&times;","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};function Si(t){return t.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ai(t,e){return t&&e.generateID?' extid="'+t+'"':""}function Ci(t,e,i){let s=!1;e=e||t.atoms.length;let a="",o="",n=-1,r=-1;const l=t.atoms[t.index];if(t.index<e&&("mord"===l.type||"textord"===l.type)&&"0123456789,.".indexOf(l.body)<0&&(o=l.toMathML(i),l.superscript&&(n=t.index),l.subscript&&(r=t.index),t.index+=1),o.length>0){if(s=!0,Mi(t)&&(n=t.index,t.index+=1),_i(t)&&(r=t.index,t.index+=1),n>=0&&r>=0)a="<msubsup>"+o,a+=Ei(t.atoms[r].subscript,0,0,i).mathML,a+=Ei(t.atoms[n].superscript,0,0,i).mathML,a+="</msubsup>";else if(n>=0){if(a="<msup>"+o,Mi(t)){const e=Ei(t.atoms[n].superscript,0,0,i).mathML,s=Ei(t.atoms[n+1].superscript,0,0,i).mathML;a+="<mi>′</mi>"!==e&&"<mi>&#x2032;</mi>"!==e||"<mi>′</mi>"!==s&&"<mi>&#x2032;</mi>"!==s?"<mi>′</mi>"===e||"<mi>&#x2032;</mi>"===e?"<mi>&#x2032;</mi>":e:"<mi>&#x2033;</mi>"}else a+=Ei(t.atoms[n].superscript,0,0,i).mathML;a+="</msup>"}else r>=0?(a="<msub>"+o,a+=Ei(t.atoms[r].subscript,0,0,i).mathML,a+="</msub>"):a=o;"mi"!==t.lastType&&"mn"!==t.lastType&&"mtext"!==t.lastType&&"fence"!==t.lastType||/^<mo>(.*)<\/mo>$/.test(a)||(a="<mo>&InvisibleTimes;</mo>"+a),o.endsWith(">f</mi>")||o.endsWith(">g</mi>")?(a+="<mo> &ApplyFunction; </mo>",t.lastType="applyfunction"):t.lastType=/^<mo>(.*)<\/mo>$/.test(a)?"mo":"mi",t.mathML+=a}return s}function Mi(t){return t.index<t.atoms.length&&t.atoms[t.index].superscript&&"msubsup"===t.atoms[t.index].type}function _i(t){return t.index<t.atoms.length&&t.atoms[t.index].subscript&&"msubsup"===t.atoms[t.index].type}function Ti(t,e,i){let s=!1,a="",o=e.atoms[e.index-1];return!!o&&(o.superscript||o.subscript||(Mi(e)||_i(e))&&(o=e.atoms[e.index],e.index+=1),!!o&&(o.superscript&&o.subscript?(a="<msubsup>"+t,a+=Ei(o.subscript,0,0,i).mathML,a+=Ei(o.superscript,0,0,i).mathML,a+="</msubsup>"):o.superscript?(a="<msup>"+t,a+=Ei(o.superscript,0,0,i).mathML,a+="</msup>"):o.subscript&&(a="<msub>"+t,a+=Ei(o.subscript,0,0,i).mathML,a+="</msub>"),a.length>0&&(s=!0,e.mathML+=a,e.lastType=""),s))}function Li(t,e,i){let s=!1;e=e||t.atoms.length;const a=t.index;let o="";for(;t.index<e&&"text"===t.atoms[t.index].mode;)o+=t.atoms[t.index].body?t.atoms[t.index].body:" ",t.index+=1;return o.length>0&&(s=!0,o="<mtext"+Ai(t.atoms[a].id,i)+">"+o+"</mtext>",t.mathML+=o,t.lastType="mtext"),s}function Fi(t,e,i){let s=!1;e=e||t.atoms.length;const a=t.index;let o="",n=function(t){let e=-1,i=t.index,s=!1,a=!1;for(;i<t.atoms.length&&!s&&!a;)a=!(s="mord"!==t.atoms[i].type||"0123456789,.".indexOf(t.atoms[i].body)<0)&&t.atoms[i].superscript,i++;return a&&(e=i-1),e}(t);for(n>=0&&n<e&&(e=n);t.index<e&&"mord"===t.atoms[t.index].type&&"0123456789,.".indexOf(t.atoms[t.index].body)>=0;)o+=t.atoms[t.index].body,t.index+=1;return o.length>0&&(s=!0,o="<mn"+Ai(t.atoms[a].id,i)+">"+o+"</mn>",n<0&&Mi(t)&&(n=t.index,t.index+=1),n>=0&&(o="<msup>"+o,o+=Ei(t.atoms[n].superscript,0,0,i).mathML,o+="</msup>"),t.mathML+=o,t.lastType="mn"),s}function Di(t,e,i){let s=!1;e=e||t.atoms.length;let a="",o="";if(t.index<e&&"mopen"===t.atoms[t.index].type){let n=!1,r=0;const l=t.index;let c=-1,h=l+1;for(;h<e&&!n;)"mopen"===t.atoms[h].type?r+=1:"mclose"===t.atoms[h].type&&(r-=1),-1===r&&(n=!0,c=h),h+=1;n&&(a="<mrow>",a+=qi(t.atoms[l],i),a+=Ei(t.atoms,l+1,c,i).mathML,a+=qi(t.atoms[c],i),a+="</mrow>","mi"!==t.lastType&&"mn"!==t.lastType&&"mfrac"!==t.lastType&&"fence"!==t.lastType||(a="<mo>&InvisibleTimes;</mo>"+a),t.index=c+1,Ti(a,t,i)&&(s=!0,t.lastType="",a=""),o="fence")}return a.length>0&&(s=!0,t.mathML+=a,t.lastType=o),s}function zi(t,e,i){let s=!1;e=e||t.atoms.length;let a="",o="";const n=t.atoms[t.index];if(t.index<e&&("mbin"===n.type||"mrel"===n.type))a+=t.atoms[t.index].toMathML(i),t.index+=1,o="mo";else if(t.index<e&&"mop"===n.type){if("limits"===n.limits&&(n.superscript||n.subscript)){const t=qi(n,i);n.superscript&&n.subscript?(a+=("nolimits"!==n.limits?"<munderover>":"<msubsup>")+t,a+=Ei(n.subscript,0,0,i).mathML,a+=Ei(n.superscript,0,0,i).mathML,a+="nolimits"!==n.limits?"</munderover>":"</msubsup>"):n.superscript?(a+=("nolimits"!==n.limits?"<mover>":"<msup>")+t,a+=Ei(n.superscript,0,0,i).mathML,a+="nolimits"!==n.limits?"</mover>":"</msup>"):(a+=("nolimits"!==n.limits?"<munder>":"<msub>")+t,a+=Ei(n.subscript,0,0,i).mathML,a+="nolimits"!==n.limits?"</munder>":"</msub>"),o="mo"}else{const e=t.atoms[t.index],n=0===e.latex.indexOf("\\operatorname"),r=n?'<mi class="MathML-Unit"'+Ai(e.id,i)+">"+Ii(e.body)+"</mi>":qi(e,i);a+=r,t.index+=1,Ti(a,t,i)&&(s=!0,t.lastType="",a=""),t.index-=1,n||/^<mo>(.*)<\/mo>$/.test(r)?o=n?"mi":"mo":(a+="<mo>&#x2061;</mo>",o="applyfunction")}"mi"!==t.lastType&&"mn"!==t.lastType||/^<mo>(.*)<\/mo>$/.test(a)||(a="<mo>&InvisibleTimes;</mo>"+a),t.index+=1}return a.length>0&&(s=!0,t.mathML+=a,t.lastType=o),s}function Ei(t,e,i,s){const a={atoms:t,index:e||0,mathML:"",lastType:""};if(i=i||(t?t.length:0),"number"==typeof t||"boolean"==typeof t)a.mathML=t.toString();else if("string"==typeof t)a.mathML=t;else if(t&&"function"==typeof t.toMathML)a.mathML=t.toMathML(s);else if(Array.isArray(t)){let t=0;for(;a.index<i;)if(Li(a,i,s)||Fi(a,i,s)||Ci(a,i,s)||zi(a,i,s)||Di(a,i,s))t+=1;else if(a.index<i){let e=a.atoms[a.index].toMathML(s);"mn"===a.lastType&&e.length>0&&"genfrac"===a.atoms[a.index].type&&(e="<mo>&#x2064;</mo>"+e),"genfrac"===a.atoms[a.index].type?a.lastType="mfrac":a.lastType="",e.length>0&&(a.mathML+=e,t+=1),a.index+=1}t>1&&(a.mathML="<mrow>"+a.mathML+"</mrow>")}return a}function qi(t,e){let i="";const s=Ii(t.body);return s&&(i="<mo"+Ai(t.id,e)+">"+s+"</mo>"),i}function Ii(t){if(!t)return"";if("string"==typeof t)return Si(t);if(!Array.isArray(t)&&"string"==typeof t.body)return Si(t.body);let e="";for(const i of t)"string"==typeof i.body&&(e+=i.body);return Si(e)}me.MathAtom.prototype.toMathML=function(t){const e={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},i={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let s,a,o,n,r,l,c="",h="",d={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"}[this.fontFamily||this.font]||"";d&&(d=' mathvariant="'+d+'"');const p=this.latex?this.latex.trim():null;let m;switch(this.type){case"group":case"root":c=Ei(this.body,0,0,t).mathML;break;case"array":if((this.lFence&&"."!==this.lFence||this.rFence&&"."!==this.rFence)&&(c+="<mrow>",this.lFence&&"."!==this.lFence&&(c+="<mo>"+(wi[this.lFence]||this.lFence)+"</mo>")),c+="<mtable",this.colFormat){for(c+=' columnalign="',o=0;o<this.colFormat.length;o++)this.colFormat[o].align&&(c+={l:"left",c:"center",r:"right"}[this.colFormat[o].align]+" ");c+='"'}for(c+=">",a=0;a<this.array.length;a++){for(c+="<mtr>",s=0;s<this.array[a].length;s++)c+="<mtd>"+Ei(this.array[a][s],0,0,t).mathML+"</mtd>";c+="</mtr>"}c+="</mtable>",(this.lFence&&"."!==this.lFence||this.rFence&&"."!==this.rFence)&&(this.rFence&&"."!==this.rFence&&(c+="<mo>"+(wi[this.lFence]||this.rFence)+"</mo>"),c+="</mrow>");break;case"genfrac":(this.leftDelim||this.rightDelim)&&(c+="<mrow>"),this.leftDelim&&"."!==this.leftDelim&&(c+="<mo"+Ai(this.id,t)+">"+(wi[this.leftDelim]||this.leftDelim)+"</mo>"),this.hasBarLine?(c+="<mfrac>",c+=Ei(this.numer,0,0,t).mathML||"<mi>&nbsp;</mi>",c+=Ei(this.denom,0,0,t).mathML||"<mi>&nbsp;</mi>",c+="</mfrac>"):(c+="<mtable"+Ai(this.id,t)+">",c+="<mtr>"+Ei(this.numer,0,0,t).mathML+"</mtr>",c+="<mtr>"+Ei(this.denom,0,0,t).mathML+"</mtr>",c+="</mtable>"),this.rightDelim&&"."!==this.rightDelim&&(c+="<mo"+Ai(this.id,t)+">"+(wi[this.rightDelim]||this.rightDelim)+"</mo>"),(this.leftDelim||this.rightDelim)&&(c+="</mrow>");break;case"surd":this.index?(c+="<mroot"+Ai(this.id,t)+">",c+=Ei(this.body,0,0,t).mathML,c+=Ei(this.index,0,0,t).mathML,c+="</mroot>"):(c+="<msqrt"+Ai(this.id,t)+">",c+=Ei(this.body,0,0,t).mathML,c+="</msqrt>");break;case"leftright":c="<mrow>",this.leftDelim&&"."!==this.leftDelim&&(c+="<mo"+Ai(this.id,t)+">"+(wi[this.leftDelim]||this.leftDelim)+"</mo>"),this.body&&(c+=Ei(this.body,0,0,t).mathML),this.rightDelim&&"."!==this.rightDelim&&(c+="<mo"+Ai(this.id,t)+">"+(wi[this.rightDelim]||this.rightDelim)+"</mo>"),c+="</mrow>";break;case"sizeddelim":case"delim":c+='<mo separator="true"'+Ai(this.id,t)+">"+(wi[this.delim]||this.delim)+"</mo>";break;case"accent":c+='<mover accent="true"'+Ai(this.id,t)+">",c+=Ei(this.body,0,0,t).mathML,c+="<mo>"+(wi[p]||this.accent)+"</mo>",c+="</mover>";break;case"line":case"overlap":break;case"overunder":r=this.overscript,n=this.underscript,r&&n?l=this.body:r?(l=this.body,this.body[0]&&this.body[0].underscript?(n=this.body[0].underscript,l=this.body[0].body):this.body[0]&&"first"===this.body[0].type&&this.body[1]&&this.body[1].underscript&&(n=this.body[1].underscript,l=this.body[1].body)):n&&(l=this.body,this.body[0]&&this.body[0].overscript?(r=this.body[0].overscript,l=this.body[0].body):this.body[0]&&"first"===this.body[0].type&&this.body[1]&&this.body[1].overscript&&(r=this.body[1].overscript,l=this.body[1].body)),r&&n?(c+="<munderover"+d+Ai(this.id,t)+">"+Ei(l,0,0,t).mathML,c+=Ei(n,0,0,t).mathML,c+=Ei(r,0,0,t).mathML,c+="</munderover>"):r?(c+="<mover"+d+Ai(this.id,t)+">"+Ei(l,t).mathML,c+=Ei(r,0,0,t).mathML,c+="</mover>"):n&&(c+="<munder"+d+Ai(this.id,t)+">"+Ei(l,t).mathML,c+=Ei(n,0,0,t).mathML,c+="</munder>");break;case"mord":{c=e[p]||p||("string"==typeof this.body?this.body:""),(m=p?p.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null)?c="&#x"+m[1]+";":c.length>0&&"\\"===c.charAt(0)&&(c="string"==typeof this.body&&this.body.charCodeAt(0)>255?"&#x"+("000000"+this.body.charCodeAt(0).toString(16)).substr(-4)+";":"string"==typeof this.body?this.body.charAt(0):this.body);const i=/\d/.test(c)?"mn":"mi";c="<"+i+d+Ai(this.id,t)+">"+Si(c)+"</"+i+">";break}case"mbin":case"mrel":case"textord":case"minner":c=p&&e[p]?"<mi"+Ai(this.id,t)+">"+e[p]+"</mi>":p&&wi[p]?"<mo"+Ai(this.id,t)+">"+wi[p]+"</mo>":qi(this,t);break;case"mpunct":c='<mo separator="true"'+Ai(this.id,t)+">"+(wi[p]||p)+"</mo>";break;case"mop":"​"!==this.body&&(c="<mo"+Ai(this.id,t)+">",c+="\\operatorname"===p?this.body:p||this.body,c+="</mo>");break;case"mathstyle":break;case"box":c='<menclose notation="box"',this.backgroundcolor&&(c+=' mathbackground="'+ge.stringToColor(this.backgroundcolor)+'"'),c+=Ai(this.id,t)+">"+Ei(this.body,0,0,t).mathML+"</menclose>";break;case"spacing":c+='<mspace width="'+(i[p]||0)+'em"/>';break;case"enclose":c='<menclose notation="';for(const t in this.notation)Object.prototype.hasOwnProperty.call(this.notation,t)&&this.notation[t]&&(c+=h+t,h=" ");c+=Ai(this.id,t)+'">'+Ei(this.body,0,0,t).mathML+"</menclose>";break;case"space":c+="&nbsp;"}return c},me.toMathML=function(t,e){return Ei(t,0,0,e).mathML};const Pi={"\\imaginaryI":"ⅈ","\\imaginaryJ":"ⅉ","\\pi":"π","\\exponentialE":"ℯ","﹢":"+","+":"+","−":"-","-":"-","﹣":"-","-":"-","\\times":"*","\\cdot":"*","⨉":"*","️✖":"*","️×":"*",".":"*","÷":"/","⁄":"/","/":"/","!":"factorial","\\mp":"minusplus","\\ne":"!=","\\coloneq":":=","\\questeq":"?=","\\approx":"approx","\\cong":"congruent","\\sim":"similar","\\equiv":"equiv","\\pm":"plusminus","\\land":"and","\\wedge":"and","\\lor":"or","\\vee":"or","\\oplus":"xor","\\veebar":"xor","\\lnot":"not","\\neg":"not","\\exists":"exists","\\nexists":"!exists","\\forall":"forAll","\\backepsilon":"suchThat","\\therefore":"therefore","\\because":"because","\\nabla":"nabla","\\circ":"circle","\\ominus":"ominus","\\odot":"odot","\\otimes":"otimes","\\zeta":"Zeta","\\Gamma":"Gamma","\\min":"min","\\max":"max","\\mod":"mod","\\lim":"lim","\\sum":"sum","\\prod":"prod","\\int":"integral","\\iint":"integral2","\\iiint":"integral3","\\Re":"Re","\\gothicCapitalR":"Re","\\Im":"Im","\\gothicCapitalI":"Im","\\binom":"nCr","\\partial":"partial","\\differentialD":"differentialD","\\capitalDifferentialD":"capitalDifferentialD","\\Finv":"Finv","\\Game":"Game","\\wp":"wp","\\ast":"ast","\\star":"star","\\asymp":"asymp","\\to":"to","\\gets":"gets","\\rightarrow":"shortLogicalImplies","\\leftarrow":"shortLogicalImpliedBy","\\leftrightarrow":"shortLogicalEquivalent","\\longrightarrow":"logicalImplies","\\longleftarrow":"logicalImpliedBy","\\longleftrightarrow":"logicalEquivalent","\\Rightarrow":"shortImplies","\\Leftarrow":"shortImpliedBy","\\Leftrightarrow":"shortEquivalent","\\implies":"implies","\\Longrightarrow":"implies","\\impliedby":"impliedBy","\\Longleftarrow":"impliedBy","\\iff":"equivalent","\\Longleftrightarrow":"equivalent"},Bi={"+":"add","*":"multiply","-":"subtract","/":"divide","=":"equal",":=":"assign","!=":"ne","?=":"questeq",approx:"approx",congruent:"congruent",similar:"similar",equiv:"equiv","<":"lt",">":"gt","<=":"le",">=":"ge","≤":"le","≥":"ge",">>":"gg","<<":"ll","**":"pow","++":"increment","--":"decrement"},Oi={equal:"%0 = %1",ne:"%0 \\ne %1",questeq:"%0 \\questeq %1",approx:"%0 \\approx %1",congruent:"%0 \\cong %1",similar:"%0 \\sim %1",equiv:"%0 \\equiv %1",assign:"%0 := %1",lt:"%0 < %1",gt:"%0 > %1",le:"%0 \\le %1",ge:"%0 \\ge %1",sin:"\\sin%_%^ %0",cos:"\\cos%_%^ %0",tan:"\\tan%_%^ %0",cot:"\\cot%_%^ %0",sec:"\\sec%_%^ %0",csc:"\\csc%_%^ %0",sinh:"\\sinh %0",cosh:"\\cosh %0",tanh:"\\tanh %0",csch:"\\csch %0",sech:"\\sech %0",coth:"\\coth %0",arcsin:"\\arcsin %0",arccos:"\\arccos %0",arctan:"\\arctan %0",arccot:"\\arcctg %0",arcsec:"\\arcsec %0",arccsc:"\\arccsc %0",arsinh:"\\arsinh %0",arcosh:"\\arcosh %0",artanh:"\\artanh %0",arcsch:"\\arcsch %0",arsech:"\\arsech %0",arcoth:"\\arcoth %0",ln:"\\ln%_%^ %",log:"\\log%_%^ %",lg:"\\lg %",lb:"\\lb %",sum:"\\sum%_%^ %0",prod:"\\prod%_%^ %0",Zeta:"\\zeta%_%^ %",Gamma:"\\Gamma %",min:"\\min%_%^ %",max:"\\max%_%^ %",mod:"\\mod%_%^ %",lim:"\\lim%_%^ %",binom:"\\binom %",nabla:"\\nabla %",curl:"\\nabla\\times %0",div:"\\nabla\\cdot %0",floor:"\\lfloor %0 \\rfloor%_%^",ceil:"\\lceil %0 \\rceil%_%^",abs:"\\left| %0 \\right|%_%^",norm:"\\lVert %0 \\rVert%_%^",ucorner:"\\ulcorner %0 \\urcorner%_%^",lcorner:"\\llcorner %0 \\lrcorner%_%^",angle:"\\langle %0 \\rangle%_%^",group:"\\lgroup %0 \\rgroup%_%^",moustache:"\\lmoustache %0 \\rmoustache%_%^",brace:"\\lbrace %0 \\rbrace%_%^","sqrt[]":"\\sqrt[%^]{%0}",sqrt:"\\sqrt{%0}",lcm:"\\operatorname{lcm}%",gcd:"\\operatorname{gcd}%",erf:"\\operatorname{erf}%",erfc:"\\operatorname{erfc}%",randomReal:"\\operatorname{randomReal}%",randomInteger:"\\operatorname{randomInteger}%",and:"%0 \\land %1",or:"%0 \\lor %1",xor:"%0 \\oplus %1",not:"%0 \\lnot %1",circle:"%0 \\circ %1",ast:"%0 \\ast %1",star:"%0 \\star %1",asymp:"%0 \\asymp %1","/":"\\frac{%0}{%1}",Re:"\\Re{%0}",Im:"\\Im{%0}",factorial:"%0!",factorial2:"%0!!"},Ri={degree:880,nabla:740,curl:740,partial:740,differentialD:740,capitalDifferentialD:740,"**":720,odot:710,not:680,div:660,solidus:660,"/":660,setminus:650,"%":640,otimes:410,union:350,intersection:350,"*":390,ast:390,".":390,oplus:300,ominus:300,"+":275,"-":275,"+-":275,"-+":275,circle:265,circledast:265,circledcirc:265,star:265,"..":263,to:262,in:262,"|":261,congruent:265,equiv:260,"=":260,"!=":255,"?=":255,similar:250,approx:247,"<":245,">":243,">=":242,"≥":242,"<=":241,complement:240,subset:240,superset:240,elementof:240,"!elementof":240,exists:230,"!exists":230,forall:230,and:200,xor:195,or:190,suchThat:110,":":100,assign:80,":=":80,therefore:70,because:70,shortLogicalImplies:52,shortImplies:51,logicalImplies:50,implies:49,shortLogicalImpliedBy:48,shortImpliedBy:47,logicalImpliedBy:46,impliedBy:45,shortLogicalEquivalent:44,shortEquivalent:43,logicalEquivalent:42,equivalent:41,",":40,";":30};function Ki(t,e){return Array.isArray(t.arg)?t.arg[e]:void 0}function Ni(t){return t&&Ri[t]||-1}function $i(t){return/=|=>/.test(t)?"right":"left"}function Wi(t){if("f"===t||"g"===t)return!0;const e=Oi[t];return!!e&&!!/%[^01_^]?/.test(e)}function Hi(t){t=(t||"").trim();let e=Pi[t];if(!e)if(/^\\[^{}]+$/.test(t)){const i=Bt.getInfo(t,"math",{});e=i&&i.value||t.slice(1)}else e=t;return e}function Vi(t){if(!t)return null;const e=Hi(Ji(t)),i=[Ni(e),$i(e)];return i[0]<=0?null:i}function Ui(t){return null!==Vi(t)}const ji={"\\lfloor\\rfloor":"floor","\\lceil\\rceil":"ceil","\\vert\\vert":"abs","\\lvert\\rvert":"abs","||":"abs","\\Vert\\Vert":"norm","\\lVert\\rVert":"norm","\\ulcorner\\urcorner":"ucorner","\\llcorner\\lrcorner":"lcorner","\\langle\\rangle":"angle","\\lgroup\\rgroup":"group","\\lmoustache\\rmoustache":"moustache","\\lbrace\\rbrace":"brace"},Gi={"!":"factorial","\\dag":"dagger","\\dagger":"dagger","\\ddagger":"dagger2","\\maltese":"maltese","\\backprime":"backprime","\\backdoubleprime":"backprime2","\\prime":"prime","\\doubleprime":"prime2","\\$":"$","\\%":"%","\\_":"_","\\degree":"degree"},Zi={"+":"add","-":"add","*":"multiply","=":"equal",",":"list",";":"list2",and:"and",or:"or",xor:"xor",union:"union",shortLogicalEquivalent:"logicalEquivalent",logicalEquivalent:"logicalEquivalent",shortEquivalent:"equivalent",equivalent:"equivalent"},Xi={",":"list",";":"list2"};function Ji(t){if(Array.isArray(t)){let e="";for(const i of t)e+=Ji(i);return e}if(t.latex&&!/^\\math(op|bin|rel|open|punct|ord|inner)/.test(t.latex))return t.latex.trim();if("leftright"===t.type)return"";if("string"==typeof t.body)return t.body;if(Array.isArray(t.body)){let e="";for(const i of t.body)e+=Ji(i);return e}return""}function Yi(t){return parseFloat(t.num)}function Qi(t){return"object"==typeof t&&void 0!==t.num}function ts(t){let e=0;return Qi(t)&&(e="object"==typeof t.num?void 0!==t.num.re?gs(t.num.re):0:parseFloat(t.num)),e}function es(t){let e=0;return Qi(t)&&"object"==typeof t.num&&(e=void 0!==t.num.im?gs(t.num.im):0),e}function is(t){return t&&void 0!==t.sup}function ss(t,e,i){let s=!1;const a=t.atoms[t.index];return a&&a.type===e&&(s=void 0===i||Ji(a)===i),s}function as(t,...e){const i={fn:t};if(e){const t=[];for(const i of e)i&&t.push(i);t.length>0&&(i.arg=t)}return i}function os(t){return"number"==typeof t?{num:t.toString()}:"string"==typeof t?{num:t}:"object"==typeof t?{num:t}:void 0}function ns(t){if(Qi(t)){const e=ts(t),i=es(t);return 0!==i?(0!==e&&(t.num.re=(-e).toString()),t.num.im=(-i).toString()):t.num=(-e).toString(),t}return as("negate",t)}function rs(t){const e=t.atoms[t.index+1];return e&&"msubsup"===e.type}function ls(t,e){let i=t.atoms[t.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:t.index+=1,i||((i=t.atoms[t.index+1])&&"msubsup"===i.type&&(i.superscript||i.subscript)?t.index+=2:i=null),i?(void 0!==i.subscript&&(t.ast.sub=fs(i.subscript,e)),void 0!==i.superscript&&("msubsup"===i.type?/['\u2032]|\\prime/.test(Ji(i.superscript))?(t.index+=1,(i=t.atoms[t.index+1])&&"msubsup"===i.type&&/['\u2032]|\\prime/.test(Ji(i.superscript))?t.ast.sup={sym:"″"}:(t.ast.sup={sym:"′"},t.index-=1)):/['\u2033]|\\doubleprime/.test(Ji(i.superscript))?t.ast.sup={sym:"″"}:t.ast&&(t.ast.sup=fs(i.superscript,e)):t.ast.sup=fs(i.superscript,e))):t.index+=1,t}function cs(t,e){const i=t.ast;if(ds(t,"!!"))return t.index+=1,t.ast=as("factorial2",i),cs(t=ls(t,e),e);if(ds(t,"++"))return t.index+=1,t.ast=as("increment",i),cs(t=ls(t,e),e);if(ds(t,"--"))return t.index+=1,t.ast=as("decrement",i),cs(t=ls(t,e),e);const s=t.atoms[t.index];return s&&s.latex&&Gi[s.latex.trim()]&&(t.ast=as(Gi[s.latex.trim()],i),t=cs(t=ls(t,e),e)),t}function hs(t,e,i,s){if(t.index=t.index||0,0===t.atoms.length||t.index>=t.atoms.length)return t.ast=void 0,t;const a=t.minPrec;t.minPrec=0;let o=t.atoms[t.index];if(e){if("mopen"===o.type&&Ji(o)===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&"mclose"===o.type&&Ji(o)===i&&(rs(t)&&(t.ast={group:t.ast}),t=cs(t=ls(t,s),s));else if("textord"===o.type&&Ji(o)===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&"textord"===o.type&&Ji(o)===i&&(t.index+=1,t=cs(t=ls(t,s),s));else if("\\lVert"===e&&"textord"===o.type&&"|"===o.latex){if((o=t.atoms[t.index+1])&&"textord"===o.type&&"|"===o.latex){t.index+=2,o=(t=ms(t,s)).atoms[t.index];const e=t.atoms[t.index+1];o&&"textord"===o.type&&"|"===o.latex&&e&&"textord"===e.type&&"|"===e.latex&&(t.index+=2,t=cs(t=ls(t,s),s))}}else if("sizeddelim"===o.type&&o.delim===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&"sizeddelim"===o.type&&o.delim===i&&(t.index+=1,t=cs(t=ls(t,s),s));else{if("leftright"!==o.type||o.leftDelim!==e||"?"!==o.rightDelim&&o.rightDelim!==i)return;t.ast=fs(o.body,s),rs(t)&&(t.ast={group:t.ast}),t=cs(t=ls(t,s),s)}return t.minPrec=a,t}{let s=!0;if("mopen"===o.type?(e=o.latex.trim(),i=Bt.RIGHT_DELIM[e]):"sizeddelim"===o.type?(e=o.delim,i=Bt.RIGHT_DELIM[e]):"leftright"===o.type?(s=!1,e=o.leftDelim,"?"===(i=o.rightDelim)&&(i=Bt.RIGHT_DELIM[e])):"textord"===o.type&&(e=o.latex.trim(),i=Bt.RIGHT_DELIM[e]),e&&i){if("|"===e&&"|"===i){const s=t.atoms[t.index+1];s&&"textord"===s.type&&"|"===s.latex&&(e="\\lVert",i="\\rVert")}if(t=hs(t,e,i))return s&&(t.index+=1),t.ast={fn:ji[e+i]||e+i,arg:[t.ast]},t.minPrec=a,t}}}function ds(t,e){return t.index=t.index||0,!(t.atoms.length<=1||t.index>=t.atoms.length-1)&&e===Ji(t.atoms[t.index])+Ji(t.atoms[t.index+1])}function ps(t){if(t.index=t.index||0,!(t.atoms.length<=1||t.index>=t.atoms.length-1)){if(!ss(t,"textord","\\nabla")){const e=t.atoms[t.index].latex+t.atoms[t.index+1].latex,i=/^(>=|<=|>>|<<|:=|!=|\*\*|\+\+|--)$/.test(e)?e:"";return i&&(t.index+=1),i}return t.index+=1,ss(t,"mbin","\\times")?(t.index+=1,t.ast="curl",t):ss(t,"mbin","\\cdot")?(t.index+=1,t.ast="div",t):void(t.index-=1)}}function ms(t,e){if(t.index=t.index||0,t.ast=void 0,0===t.atoms.length||t.index>=t.atoms.length)return t;t.minPrec=t.minPrec||0;let i=function t(e,i){if(e.index=e.index||0,e.ast=void 0,0===e.atoms.length||e.index>=e.atoms.length)return e;let s=e.atoms[e.index];const a=Hi(Ji(s));if(ps(e))e.ast=as(e.ast,t(e,i).ast);else{if("root"===s.type)return e.index=0,e.atoms=s.body,t(e,i);if("mbin"===s.type&&"-"===a)e.index+=1,(e=t(e,i)).ast=ns(e.ast);else if("mbin"===s.type&&"+"===a)e.index+=1,(e=t(e,i)).ast=as("add",e.ast);else if("mord"===s.type&&/^[0-9.]$/.test(s.latex)){let a="",o=!1,n=/^[0-9.eEdD]$/;for(;e.index<e.atoms.length&&!o&&(ss(e,"spacing")||(ss(e,"mord")||ss(e,"mpunct",",")||ss(e,"mbin"))&&n.test(e.atoms[e.index].latex));)if("spacing"===e.atoms[e.index].type)e.index+=1;else if(void 0!==e.atoms[e.index].superscript||void 0!==e.atoms[e.index].subscript)o=!0;else{let t=e.atoms[e.index].latex;"d"===t||"D"===t?(t="e",n=/^[0-9+-.]$/):"e"===t||"E"===t?rs(e)?(t="",e.index-=1,o=!0):(t="E",n=/^[0-9+-.]$/):n===/^[0-9+-.]$/&&(n=/^[0-9]$/),a+=","===t?"":t,e.index+=1}if(e.ast=a?os(a):void 0,(s=e.atoms[e.index])&&"genfrac"===s.type&&!isNaN(e.ast.num)){const s=e.ast;(e=t(e,i)).ast=as("add",s,e.ast)}if(s&&"group"===s.type&&s.latex&&s.latex.startsWith("\\nicefrac")){const s=e.ast;(e=t(e,i)).ast=as("add",s,e.ast)}s&&"msubsup"===s.type&&(e=ls(e,i)),e=cs(e,i)}else if("genfrac"===s.type||"surd"===s.type)e.ast=s.toAST(i),e=cs(e=ls(e,i),i);else if("mord"===s.type||"mbin"===s.type){if(Wi(a)&&!Ui(s)){e.ast={fn:a};const s=(e=ls(e,i)).ast,o=t(e,i).ast;o&&/^(list0|list|list2)$/.test(o.fn)?s.arg=s.arg?s.arg.arg:void 0:o&&(s.arg=[o]),e.ast=s}else e.ast=s.toAST(i),"ⅈ"===e.ast.sym&&(e.ast=os({im:"1"})),e=ls(e);e=cs(e,i)}else if("textord"===s.type){if(!Ui(s)&&!Bt.RIGHT_DELIM[s.latex?s.latex.trim():s.body])if(Wi(a)){e.ast={fn:a};const s=(e=ls(e,i)).ast;e.index+=1,s.arg=[t(e,i).ast],e.ast=s,e=cs(e,i)}else e.ast=s.toAST(i),void 0===s.superscript&&(e.index+=1),e=cs(e=ls(e,i),i)}else if("mop"===s.type){if((/^\\(mathop|operatorname|operatorname\*)/.test(s.latex)||Wi(a))&&!Ui(s))if(e.ast={fn:/^\\(mathop|operatorname|operatorname\*)/.test(s.latex)?s.body:a},is((e=ls(e,i)).ast)){const s={sin:"arcsin",cos:"arccos",tan:"arctan",cot:"arccot",sec:"arcsec",csc:"arccsc",sinh:"arsinh",cosh:"arcosh",tanh:"artanh",csch:"arcsch",sech:"arsech",coth:"arcoth"};if(-1===Yi(e.ast.sup)&&s[a])e.ast=as(s[a],t(e,i).ast);else{const s=e.ast;s.arg=[t(e,i).ast],e.ast=s}}else{const s=e.ast,a=t(e,i).ast;a&&/^(list0|list|list2)$/.test(a.fn)?s.arg=a.arg:a&&(s.arg=[a]),e.ast=s}}else if("array"===s.type)e.index+=1,e.ast=s.toAST(i);else if("group"===s.type)e.index+=1,e.ast=s.toAST(i);else{if("mclose"===s.type)return e;if("error"===s.type)return e.index+=1,e.ast={error:s.latex},e}}if(void 0===e.ast){const t=hs(e,"(",")",i)||hs(e,null,null,i);t?e=t:Ui(s)||("placeholder"===s.type?e.ast=os(0):(e.ast={text:"?"},e.ast.error="Unexpected token '"+s.type+"'",s.latex?e.ast.latex=s.latex:s.body&&s.toLatex&&(e.ast.latex=s.toLatex())),e.index+=1)}if((s=e.atoms[e.index])&&("mord"===s.type||"surd"===s.type||"mop"===s.type||"mopen"===s.type||"sizeddelim"===s.type||"leftright"===s.type)){if("sizeddelim"===s.type)for(const t in Bt.RIGHT_DELIM)if(s.delim===Bt.RIGHT_DELIM[t])return e.index+=1,e;if(("mord"===s.type||"textord"===s.type||"mop"===s.type)&&Ui(s))return e;const a=e.ast;e.ast={},(e=t(e,i))&&e.ast&&a?Wi(a.fn)&&void 0===a.arg||Array.isArray(a.arg)&&0===a.arg.length?"list2"===e.ast.fn||"list"===e.ast.fn?e.ast=as(a.fn,e.ast.arg):e.ast=as("multiply",a,e.ast):"multiply"===e.ast.fn?e.ast.arg.unshift(a):0===es(a)&&0!==ts(a)&&1===es(e.ast)&&0===ts(e.ast)?e.ast=os({im:ts(a).toString()}):e.ast=as("multiply",a,e.ast):e.ast=a}return e}(t,e).ast,s=!1;const a=t.minPrec;for(;!s;){const o=t.atoms[t.index],n=ps(t);let r,l;if((s=!o||"text"===o.mode||!n&&!Ui(o))||([r,l]=n?[Ni(n),$i(n)]:Vi(o),s=r<a),!s){const a=n||Hi(Ji(o));if(t.minPrec="left"===l?r+1:r,t.index+=1,"|"===a)if(void 0!==o.subscript||t.atoms[t.index]&&void 0!==t.atoms[t.index].subscript&&"msubsup"===t.atoms[t.index].type){t.ast={};const s=ls(t,e).ast.sub;if(i=as("bind",i),s&&"equal"===s.fn&&i.arg)i.arg.push(Ki(s,0)),i.arg.push(Ki(s,1));else if(s&&i.arg&&("list"===s.fn||"list2"===s.fn)){let t={sym:"x"};for(let e=0;e<s.arg.length;e++)"equal"===s.arg[e].fn?(t=Ki(s.arg[e],0),i.arg.push(t),i.arg.push(Ki(s.arg[e],1))):(i.arg.push(t),i.arg.push(s.arg[e]))}else s&&(i.arg.push({sym:"x"}),i.arg.push(s))}else s=!0;else{const s=ms(t,e).ast;let o=Xi[a];o&&i&&i.fn!==o&&(i=as(o,i)),"-"===a?i&&i.arg&&"add"===i.fn?void 0!==s&&i.arg.push(ns(s)):i=i&&"subtract"===i.fn?as("add",Ki(i,0),ns(Ki(i,1)),ns(s)):!Qi(i)||is(i)||!Qi(s)||is(s)||void 0!==s.num.re&&"0"!==s.num.re||void 0===s.num.im?as("subtract",i,s):{num:{re:i.num,im:(-parseFloat(s.num.im)).toString()}}:"add"===(o=Zi[a])&&i&&"subtract"===i.fn?i=as("add",Ki(i,0),ns(Ki(i,1)),s):o&&i&&i.fn===o&&!is(i)?void 0!==s&&(s.fn===o&&!is(s)&&s.arg?i.arg=[...i.arg,...s.arg]:i.arg&&i.arg.push(s)):o&&s&&s.arg&&s.fn===o?(s.arg.unshift(i),i=s):i="multiply"===o&&Qi(i)&&!is(i)&&s&&10===Yi(s)&&Qi(s.sup)?os(Yi(i)*Math.pow(10,Yi(s.sup))):"add"===o&&Qi(i)&&!is(i)&&s&&0!==es(s)&&!is(s)?{num:{re:i.num,im:s.num.im}}:as(o||Bi[a]||a,i,s)}}}return t.ast=i,t}function us(t){if(!t)return[];let e;if(Array.isArray(t)){e=[];for(const i of t){const t=us(i);e=e.concat(t)}}else{if("spacing"===t.type)return[];"first"===t.type||"box"===t.type?e=us(t.body):(t.body&&Array.isArray(t.body)&&(t.body=us(t.body)),t.superscript&&Array.isArray(t.superscript)&&(t.superscript=us(t.superscript)),t.subscript&&Array.isArray(t.subscript)&&(t.subscript=us(t.subscript)),t.index&&Array.isArray(t.index)&&(t.index=us(t.index)),t.denom&&Array.isArray(t.denom)&&(t.denom=us(t.denom)),t.numer&&Array.isArray(t.numer)&&(t.numer=us(t.numer)),t.array&&Array.isArray(t.array)&&(t.array=t.array.map(t=>t.map(t=>us(t)))),e=[t])}return e}function fs(t,e){return function(t,e){t.index=t.index||0,t.ast=void 0;const i=[];for(;t.atoms[t.index];)if("text"===t.atoms[t.index].mode){let e="";for(;t.atoms[t.index]&&"text"===t.atoms[t.index].mode;)e+=t.atoms[t.index].body,t.index+=1;i.push(e)}else{const s=ms(t,e).ast;if(!s)return;i.push(s)}return i.length>1?as("text",...i):i[0]||void 0}({atoms:us(t)},e)}function gs(t){return parseFloat(parseFloat(t).toPrecision(15))}me.MathAtom.prototype.toAST=function(t){let e,i,s,a,o={},n="",r={bb:"double-struck",cal:"script",scr:"script",frak:"fraktur",cmrss:"sans-serif",cmrtt:"monospace"}[this.baseFontFamily||this.fontFamily],l="";"b"===this.fontSeries&&(l+="bold"),"it"===this.fontShape&&(l+="italic");const c=this.latex?this.latex.trim():null;switch(this.type){case"root":case"group":this.latex&&this.latex.startsWith("\\nicefrac")?(e=this.latex.slice(9).match(/({.*}|[^}])({.*}|[^}])/))?(i=1===e[1].length?e[1]:e[1].substr(1,e[1].length-2),i=ke.parseTokens(x.tokenize(i),"math",null,t.macros),s=1===e[2].length?e[2]:e[2].substr(1,e[2].length-2),s=ke.parseTokens(x.tokenize(s),"math",null,t.macros),o=as("divide",fs(i,t),fs(s,t))):o.fn="divide":o.group=fs(this.body,t);break;case"genfrac":o=as("divide",fs(this.numer,t),this.denom&&this.denom[0]&&"placeholder"===this.denom[0].type?os(1):fs(this.denom,t));break;case"surd":o=this.index?as("pow",fs(this.body,t),as("divide",1,fs(this.index,t))):as("sqrt",fs(this.body,t));break;case"rule":break;case"line":case"overlap":case"accent":case"overunder":break;case"mord":case"textord":case"mbin":(e=c?c.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):void 0)?n=String.fromCodePoint(parseInt(e[1],16)):(n=Hi(Ji(this))).length>0&&"\\"===n.charAt(0)&&"string"==typeof this.body&&(n=this.body),(a=Bt.mathVariantToUnicode(n,r,l).replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"))!==n?(o={sym:a},r="normal"):o={sym:n};break;case"minner":case"mop":break;case"box":o=fs(this.body,t);break;case"enclose":break;case"array":if("cardinality"===this.env.name)o=as("card",fs(this.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(this.env.name)){o={fn:"array",args:[]};for(const e of this.array)o.args.push(e.map(e=>fs(e,t)))}else if("cases"===this.env.name){o={fn:"cases",args:[]};for(const e of this.array)if(e[0]){const i=[];i.push(fs(e[0],t));let s=fs(e[1],t);s&&"text"===s.fn&&s.arg&&/^(if|when|for)$/i.test(s.arg[0].trim())&&(s=s.arg.filter(t=>"string"!=typeof t)),i.push(s||{}),o.args.push(i)}}break;case"spacing":case"space":case"mathstyle":break;default:o=void 0}return o&&r&&"normal"!==r&&(o.variant=r),o&&"string"==typeof this.cssClass&&(o.class=this.cssClass),o&&"string"==typeof this.cssId&&(o.id=this.cssId),o},me.toAST=function(t,e){return fs(t,e)};const ys={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'<phoneme alphabet="ipa" ph="eɪ">a</phoneme>',A:'capital <phoneme alphabet="ipa" ph="eɪ">A</phoneme>',"+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"};function bs(t){let e=0;if(t&&Array.isArray(t))for(const i of t)"first"!==i.type&&(e+=1);return 1===e}function xs(t){let e="";if(t&&Array.isArray(t))for(const i of t)"first"!==i.type&&"string"==typeof i.body&&(e+=i.body);return e}me.toSpeakableFragment=function(t,e){function i(t){return"<emphasis>"+t+"</emphasis>"}if(!t)return"";let s="";if(t.id&&"math"===e.speechMode&&(s+='<mark name="'+t.id.toString()+'"/>'),Array.isArray(t)){let a=!1;for(let o=0;o<t.length;o++)o<t.length-2&&"mopen"===t[o].type&&"mclose"===t[o+2].type&&"mord"===t[o+1].type?(s+=" of ",s+=i(me.toSpeakableFragment(t[o+1],e)),o+=2):"text"===t[o].mode?s+=t[o].body?t[o].body:" ":"mord"===t[o].type&&/[0123456789,.]/.test(t[o].body)?a?s+=t[o].body:(a=!0,s+=me.toSpeakableFragment(t[o],e)):(a=!1,s+=me.toSpeakableFragment(t[o],e))}else{let a="",o="",n="",r=!1;switch(t.type){case"group":case"root":s+=me.toSpeakableFragment(t.body,e);break;case"genfrac":if(a=me.toSpeakableFragment(t.numer,e),o=me.toSpeakableFragment(t.denom,e),bs(t.numer)&&bs(t.denom)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[xs(t.numer)+"/"+xs(t.denom)];e?s=e:s+=a+" over "+o}else s+=' the fraction <break time="150ms"/>'+a+', over <break time="150ms"/>'+o+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(n=me.toSpeakableFragment(t.body,e),t.index){let i=me.toSpeakableFragment(t.index,e);const a=(i=i.trim()).replace(/<mark([^\/]*)\/>/g,"");s+="3"===a?' the cube root of <break time="200ms"/>'+n+'. <break time="200ms"/> End cube root':"n"===a?' the nth root of <break time="200ms"/>'+n+'. <break time="200ms"/> End root':' the root with index: <break time="200ms"/>'+i+', of <break time="200ms"/>'+n+'. <break time="200ms"/> End root'}else bs(t.body)?s+=" the square root of "+n+" , ":s+=' the square root of <break time="200ms"/>'+n+'. <break time="200ms"/> End square root';break;case"accent":break;case"leftright":s+=ys[t.leftDelim]||t.leftDelim,s+=me.toSpeakableFragment(t.body,e),s+=ys[t.rightDelim]||t.rightDelim;break;case"line":case"rule":case"overunder":case"overlap":break;case"placeholder":s+="placeholder "+t.body;break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":{const i=t.latex?t.latex.trim():"";if("\\mathbin"===i||"\\mathrel"===i||"\\mathopen"===i||"\\mathclose"===i||"\\mathpunct"===i||"\\mathord"===i||"\\mathinner"===i){s=me.toSpeakableFragment(t.body,e);break}let a=t.body,o=t.latex;if("delim"!==t.type&&"sizeddelim"!==t.type||(a=o=t.delim),"text"===e.speechMode)s+=a;else{if("mbin"===t.type&&(s+='<break time="150ms"/>'),a){const t=ys[a]||(o?ys[o.trim()]:"");if(t)s+=" "+t;else{const t=o?function(t){let e=ri.NOTES[t];return e||"\\"!==t.charAt(0)||(e=" "+t.replace("\\","")+" "),Array.isArray(e)&&(e=e[0]),e}(o.trim()):"";s+=t||function(t){let i="";return e.textToSpeechMarkup?/[a-z]/.test(t)?i+=' <say-as interpret-as="character">'+t+"</say-as>":/[A-Z]/.test(t)?i+="capital "+t.toLowerCase():i+=t:/[a-z]/.test(t)?i+=" '"+t.toUpperCase()+"'":/[A-Z]/.test(t)?i+=" 'capital "+t.toUpperCase()+"'":i+=t,i}(a)}}else s+=me.toSpeakableFragment(t.body,e);"mbin"===t.type&&(s+='<break time="150ms"/>')}break}case"mop":if("​"!==t.body){const a=t.latex?t.latex.trim():"";if("\\sum"===a)if(t.superscript&&t.subscript){let i=me.toSpeakableFragment(t.superscript,e);i=i.trim();let a=me.toSpeakableFragment(t.subscript,e);s+=' the summation from <break time="200ms"/>'+(a=a.trim())+'<break time="200ms"/> to <break time="200ms"/>'+i+'<break time="200ms"/> of <break time="150ms"/>',r=!0}else if(t.subscript){let i=me.toSpeakableFragment(t.subscript,e);s+=' the summation from <break time="200ms"/>'+(i=i.trim())+'<break time="200ms"/> of <break time="150ms"/>',r=!0}else s+=" the summation of";else if("\\prod"===a)if(t.superscript&&t.subscript){let i=me.toSpeakableFragment(t.superscript,e);i=i.trim();let a=me.toSpeakableFragment(t.subscript,e);s+=' the product from <break time="200ms"/>'+(a=a.trim())+'<break time="200ms"/> to <break time="200ms"/>'+i+'<break time="200ms"/> of <break time="150ms"/>',r=!0}else if(t.subscript){let i=me.toSpeakableFragment(t.subscript,e);s+=' the product from <break time="200ms"/>'+(i=i.trim())+'<break time="200ms"/> of <break time="150ms"/>',r=!0}else s+=" the product of ";else if("\\int"===a)if(t.superscript&&t.subscript){let a=me.toSpeakableFragment(t.superscript,e);a=a.trim();let o=me.toSpeakableFragment(t.subscript,e);s+=' the integral from <break time="200ms"/>'+i(o=o.trim())+'<break time="200ms"/> to <break time="200ms"/>'+i(a)+' <break time="200ms"/> of ',r=!0}else s+=' the integral of <break time="200ms"/> ';else if("string"==typeof t.body){s+=ys[t.body]||ys[t.latex.trim()]||" "+t.body}else t.latex&&t.latex.length>0&&("\\"===t.latex[0]?s+=" "+t.latex.substr(1):s+=" "+t.latex)}break;case"enclose":n=me.toSpeakableFragment(t.body,e),bs(t.body)?s+=" crossed out "+n+" , ":s+=" crossed out "+n+". End cross out"}if(!r&&t.superscript){let i=me.toSpeakableFragment(t.superscript,e);const a=(i=i.trim()).replace(/<[^>]*>/g,"");if(bs(t.superscript)){if("math"===e.speechMode){const e=function(t){if(t&&Array.isArray(t))for(const e of t)if("first"!==e.type&&e.id)return e.id.toString();return""}(t.superscript);e&&(s+='<mark name="'+e+'"/>')}"′"===a?s+=" prime ":"2"===a?s+=" squared ":"3"===a?s+=" cubed ":isNaN(parseInt(a))?s+=" to the "+i+"; ":s+=' to the <say-as interpret-as="ordinal">'+a+"</say-as> power; "}else isNaN(parseInt(a))?s+=" raised to the "+i+"; ":s+=' raised to the <say-as interpret-as="ordinal">'+a+"</say-as> power; "}if(!r&&t.subscript){let i=me.toSpeakableFragment(t.subscript,e);i=i.trim(),bs(t.subscript)?s+=" sub "+i:s+=" subscript "+i+". End subscript. "}}return s},me.toSpeakableText=function(t,e){const i=e?JSON.parse(JSON.stringify(e)):{textToSpeechMarkup:"",textToSpeechRules:"mathlive"};if(i.speechMode="math",window.sre&&"sre"===i.textToSpeechRules){i.generateID=!0;const e=me.toMathML(t,i);return e?(i.textToSpeechMarkup&&(i.textToSpeechRulesOptions=i.textToSpeechRulesOptions||{},i.textToSpeechRulesOptions.markup=i.textToSpeechMarkup,"ssml"===i.textToSpeechRulesOptions.markup&&(i.textToSpeechRulesOptions.markup="ssml_step"),i.textToSpeechRulesOptions.rate=i.speechEngineRate),i.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(i.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(e)):""}let s=me.toSpeakableFragment(t,i);if("ssml"===i.textToSpeechMarkup){let t="";i.speechEngineRate&&(t='<prosody rate="'+i.speechEngineRate+'">'),s='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+t+"<p><s>"+s+"</s></p>"+(t?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else s="mac"===i.textToSpeechMarkup&&"mac"===function(t){let e="other";return navigator&&navigator.platform&&navigator.userAgent&&(/^(mac)/i.test(navigator.platform)?e="mac":/^(win)/i.test(navigator.platform)?e="win":/(android)/i.test(navigator.userAgent)?e="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(e="chromeos")),e===t?t:"!"+t}("mac")?s.replace(/<mark([^\/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="([0-9]*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):s.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return s};const ks=3,vs=.5;function ws(t,e,i,s){e=e.split(" ");for(const a of e){const e=a.match(/(.*):(.*)/);if(e){const a=s||{};"active"===e[2]?a.passive=!1:a[e[2]]=!0,t.addEventListener(e[1],i,a)}else t.addEventListener(a,i,s)}}function Ss(t,e,i,s){e=e.split(" ");for(const a of e){const e=a.match(/(.*):(.*)/);if(e){const a=s||{};"active"===e[2]?a.passive=!1:a[e[2]]=!0,t.removeEventListener(e[1],i,a)}else t.removeEventListener(a,i,s)}}function As(t,e){let i=document.getElementById(t);return i?i.setAttribute("data-refcount",parseInt(i.getAttribute("data-refcount"))+1):((i=document.createElement("div")).setAttribute("aria-hidden","true"),i.setAttribute("data-refcount","1"),i.className=e,i.id=t,document.body.appendChild(i)),i}function Cs(t){if(!t)return null;const e=parseInt(t.getAttribute("data-refcount"));return e&&1!==e?t.setAttribute("data-refcount",e-1):t.remove(),t}class Ms{constructor(t,e){this.$setConfig(e||{}),this.element=t,t.mathfield=this,this.originalContent=t.innerHTML;let i=this.element.textContent;i&&(i=i.trim());let s="";this.config.substituteTextArea?"string"==typeof this.config.substituteTextArea?s+=this.config.substituteTextArea:s+="<span></span>":/android|ipad|ipod|iphone/i.test(navigator.userAgent)?s+="<span class='ML__textarea'>\n <span class='ML__textarea__textarea'\n tabindex=\"0\" role=\"textbox\"\n style='display:inline-block;height:1px;width:1px' >\n </span>\n </span>":s+='<span class="ML__textarea"><textarea class="ML__textarea__textarea" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" aria-hidden="true" tabindex="0"></textarea></span>',s+='<span class="ML__fieldcontainer"><span class="ML__fieldcontainer__field"></span>',this.config.virtualKeyboardMode||(this.config.virtualKeyboardMode=window.matchMedia&&window.matchMedia("(any-pointer: coarse)").matches?"onfocus":"off"),"manual"===this.config.virtualKeyboardMode?(s+=`<button class="ML__virtual-keyboard-toggle" data-tooltip="${ci("tooltip.toggle virtual keyboard")}">`,this.config.virtualKeyboardToggleGlyph?s+=this.config.virtualKeyboardToggleGlyph:s+='<span style="width: 21px; margin-top: 4px;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg></span>',s+="</button>"):s+="<span ></span>",s+="</span>",s+='\n <div class="sr-only">\n <span aria-live="assertive" aria-atomic="true"></span>\n <span></span>\n </div>\n ',this.element.innerHTML=s;let a=0;"function"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[a++].firstElementChild,this.field=this.element.children[a].children[0],this.field.addEventListener("wheel",t=>{t.preventDefault(),t.stopPropagation();let e=void 0===t.deltaX?t.detail:-t.deltaX;isFinite(e)||(e=t.wheelDelta/10),this.field.scroll({top:0,left:this.field.scrollLeft-5*e})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[a++].children[1],this._attachButtonHandlers(this.virtualKeyboardToggleDOMNode,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.ariaLiveText=this.element.children[a].children[0],this.accessibleNode=this.element.children[a++].children[1],this.popover=As("mathlive-popover-panel","ML__popover"),this.keystrokeCaption=As("mathlive-keystroke-caption-panel","ML__keystroke-caption"),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer="",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=e.defaultMode||"math",this.smartModeSuppressed=!1,this.style={},this.blurred=!0,ws(this.element,"focus",this),ws(this.element,"blur",this),ws(this.textarea,"cut",this),ws(this.textarea,"copy",this),ws(this.textarea,"paste",this),ti.delegateKeyboardEvents(this.textarea,{container:this.element,allowDeadKey:()=>"text"===this.mode,typedText:this._onTypedText.bind(this),paste:this._onPaste.bind(this),keystroke:this._onKeystroke.bind(this),focus:this._onFocus.bind(this),blur:this._onBlur.bind(this)}),window.PointerEvent?ws(this.field,"pointerdown",this):ws(this.field,"touchstart:active mousedown",this),ws(window,"resize",this);const o={...e};o.onSelectionDidChange=Ms.prototype._onSelectionDidChange.bind(this),o.onContentDidChange=Ms.prototype._onContentDidChange.bind(this),o.onAnnounce=this.config.onAnnounce,o.macros=this.config.macros,o.removeExtraneousParentheses=this.config.removeExtraneousParentheses,this.mathlist=new Ge.EditableMathlist(o,this),this.undoManager=new ei.UndoManager(this.mathlist),i.length>0&&this.$latex(i),this.undoManager.startRecording(),this.undoManager.snapshot(this.config)}handleEvent(t){switch(t.type){case"focus":this._onFocus(t);break;case"blur":this._onBlur(t);break;case"touchstart":case"mousedown":case"pointerdown":this._onPointerDown(t);break;case"resize":this._resizeTimer&&window.cancelAnimationFrame(this._resizeTimer),this._resizeTimer=window.requestAnimationFrame(()=>this._onResize());break;case"cut":this._onCut(t);break;case"copy":this._onCopy(t);break;case"paste":this._onPaste(t)}}$revertToOriginalContent(){this.element.innerHTML=this.originalContent,this.element.mathfield=null,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,Ss(this.textarea,"cut",this),Ss(this.textarea,"copy",this),Ss(this.textarea,"paste",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,Cs(this.popover),Cs(this.keystrokeCaption),Cs(this.virtualKeyboard),Cs(document.getElementById("mathlive-alternate-keys-panel")),Ss(this.element,"pointerdown",this),Ss(this.element,"touchstart:active mousedown",this),Ss(this.element,"focus",this),Ss(this.element,"blur",this),Ss(window,"resize",this)}_resetKeystrokeBuffer(){this.keystrokeBuffer="",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)}_getCaretPosition(){const t=function t(e){if(e.classList.contains("ML__caret")||e.classList.contains("ML__text-caret")||e.classList.contains("ML__command-caret"))return e;let i;return Array.from(e.children).forEach(function(e){i=i||t(e)}),i}(this.field);if(t){const e=t.getBoundingClientRect();return{x:e.right+window.scrollX,y:e.bottom+window.scrollY}}return null}_getSelectionBounds(){const t=this.field.querySelectorAll(".ML__selected");if(t&&t.length>0){const e={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(t=>{const i=t.getBoundingClientRect();i.left<e.left&&(e.left=i.left),i.right>e.right&&(e.right=i.right),i.bottom>e.bottom&&(e.bottom=i.bottom),i.top<e.top&&(e.top=i.top)});const i=this.field.getBoundingClientRect(),s=e.right-e.left,a=e.bottom-e.top;return e.left=Math.ceil(e.left-i.left+this.field.scrollLeft),e.right=e.left+s,e.top=Math.ceil(e.top-i.top),e.bottom=e.top+a,e}return null}_pathFromPoint(t,e,i){let s;(i=i||{}).bias=i.bias||0;const a=function t(e,i,s){let a={element:null},o=!0;if(e.getAttribute("data-atom-id")){a.element=e;const t=e.getBoundingClientRect(),n=Math.max(t.left-i,i-t.right),r=Math.max(t.top-s,s-t.bottom);a.distance=n*n+r*r,o=i>=t.left&&i<=t.right}else a.distance=Number.POSITIVE_INFINITY;return o&&e.children&&Array.from(e.children).forEach(function(e){const o=t(e,i,s);o.element&&o.distance<=a.distance&&(a=o)}),a}(this.field,t,e).element,o=a?a.getAttribute("data-atom-id"):null;if(o){const e=this.mathlist.filter(function(t,e){return e.captureSelection?e.filter(t=>t.id===o).length>0:e.id===o});if(e&&e.length>0)if(s=Se.pathFromString(e[0]).path,0===i.bias){const e=a.getBoundingClientRect();t<e.left+e.width/2&&!a.classList.contains("ML__placeholder")&&(s[s.length-1].offset=Math.max(0,s[s.length-1].offset-1))}else i.bias<0&&(s[s.length-1].offset=Math.min(this.mathlist.siblings().length-1,Math.max(0,s[s.length-1].offset+i.bias)))}return s}_onPointerDown(t){const e=this;let i,s=!1,a=!1,o=!1;if(1!==t.buttons)return;function n(t){window.PointerEvent?(Ss(e.field,"pointermove",h),Ss(e.field,"pointerend pointerleave pointercancel",n),e.field.releasePointerCapture(t.pointerId)):(Ss(e.field,"touchmove",h),Ss(e.field,"touchend touchleave",n),Ss(window,"mousemove",h),Ss(window,"mouseup blur",n)),s=!1,clearInterval(c),e.element.querySelectorAll(".ML__scroller").forEach(t=>t.parentNode.removeChild(t)),t.preventDefault(),t.stopPropagation()}let r=!1,l=!1;const c=setInterval(()=>{r?e.field.scroll({top:0,left:e.field.scrollLeft-16}):l&&e.field.scroll({top:0,left:e.field.scrollLeft+16})},32);function h(t){const s=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,n="touch"===t.pointerType?20:5;if(Date.now()<m+500&&Math.abs(d-s)<n&&Math.abs(p-o)<n)return t.preventDefault(),void t.stopPropagation();const c=e.field.getBoundingClientRect();l=s>c.right,r=s<c.left;let h=i;window.PointerEvent?t.isPrimary||(h=e._pathFromPoint(t.clientX,t.clientY,{bias:0})):t.touches&&2===t.touches.length&&(h=e._pathFromPoint(t.touches[1].clientX,t.touches[1].clientY,{bias:0}));const u=e._pathFromPoint(s,o,{bias:s<=d?s===d?0:-1:1});u&&e.mathlist.setRange(h,u,{extendToWordBoundary:a})&&e._requestUpdate(),t.preventDefault(),t.stopPropagation()}const d=t.touches?t.touches[0].clientX:t.clientX,p=t.touches?t.touches[0].clientY:t.clientY,m=Date.now();_s&&Math.abs(_s.x-d)<5&&Math.abs(_s.y-p)<5&&Date.now()<_s.time+500?(Ts+=1,_s.time=m):(_s={x:d,y:p,time:m},Ts=1);const u=this.field.getBoundingClientRect();if(d>=u.left&&d<=u.right&&p>=u.top&&p<=u.bottom){let r=document.createElement("div");r.className="ML__scroller",this.element.appendChild(r),r.style.left=u.left-200+"px",(r=document.createElement("div")).className="ML__scroller",this.element.appendChild(r),r.style.left=u.right+"px",this.$hasFocus()||(o=!0,this.textarea.focus&&this.textarea.focus()),this._resetKeystrokeBuffer(),this.smartModeSuppressed=!1,(i=this._pathFromPoint(d,p,{bias:0}))&&(t.shiftKey?(this.mathlist.setRange(this.mathlist.path,i),(i=Se.clone(this.mathlist.path))[i.length-1].offset-=1):this.mathlist.setPath(i,0),o=!0,this.style={},3===t.detail||Ts>2?(n(t),3!==t.detail&&3!==Ts||this.mathlist.selectAll_()):s||(s=!0,window.PointerEvent?(ws(e.field,"pointermove",h),ws(e.field,"pointerend pointercancel pointerup",n),e.field.setPointerCapture(t.pointerId)):(ws(window,"blur",n),t.touches?(ws(t.target,"touchmove",h),ws(t.target,"touchend",n)):(ws(window,"mousemove",h),ws(window,"mouseup",n))),2!==t.detail&&2!==Ts||(a=!0,this.mathlist.selectGroup_())))}else _s=null;o&&this._requestUpdate(),t.preventDefault()}_onSelectionDidChange(){this.mathlist.commitCommandStringBeforeInsertionPoint();let t="";this.mathlist.forEachSelected(e=>{t+=e.toLatex()}),t?(this.textarea.value=t,this.$hasFocus()&&this.textarea.select&&this.textarea.select()):(this.textarea.value="",this.textarea.setAttribute("aria-label",""));{const t=this.mode;this.mode=this.mathlist.anchorMode()||this.config.defaultMode,this.mode!==t&&"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),"command"===t&&"command"!==this.mode&&(ri.hidePopover(this),this.mathlist.removeCommandString())}ri.updatePopoverPosition(this,{deferred:!0}),"function"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)}_onContentDidChange(){this.undoManager.canRedo()?this.element.classList.add("can-redo"):this.element.classList.remove("can-redo"),this.undoManager.canUndo()?this.element.classList.add("can-undo"):this.element.classList.remove("can-undo"),"function"==typeof this.config.onContentDidChange&&this.config.onContentDidChange(this)}_nextAtomSpeechText(t){function e(t,e){return"body"===e.relation?{enclose:"cross out",leftright:"fence",surd:"square root",root:"math field"}[t.type]:{numer:"numerator",denom:"denominator",index:"index",body:"parent",subscript:"subscript",superscript:"superscript"}[e.relation]}const i=t?t.path:[],s=this.mathlist.path,a=s[s.length-1];let o="";for(;i.length>s.length;)o+="out of "+e(t.parent(),i[i.length-1])+"; ",i.pop();if(!this.mathlist.isCollapsed())return Ls(this,"",this.mathlist.getSelectedAtoms());const n=e(this.mathlist.parent(),a);0===a.offset&&(o+=(n?"start of "+n:"unknown")+": ");const r=this.mathlist.sibling(Math.max(1,this.mathlist.extent));return r?o+=Ls(this,"",r):0!==a.offset&&(o+=n?"end of "+n:"unknown"),o}_announce(t,e,i){"function"==typeof this.config.onAnnounce&&this.config.onAnnounce(this,t,e,i)}_onFocus(){this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),"onfocus"===this.config.virtualKeyboardMode&&this.showVirtualKeyboard_(),ri.updatePopoverPosition(this),this.config.onFocus&&this.config.onFocus(this),this._requestUpdate())}_onBlur(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent="","onfocus"===this.config.virtualKeyboardMode&&this.hideVirtualKeyboard_(),this.complete_({discard:!0}),this._requestUpdate(),this.config.onBlur&&this.config.onBlur(this))}_onResize(){this.element.classList.remove("ML__isNarrowWidth","ML__isWideWidth","ML__isExtendedWidth"),window.innerWidth>=1024?this.element.classList.add("ML__isExtendedWidth"):window.innerWidth>=768?this.element.classList.add("ML__isWideWidth"):this.element.classList.add("ML__isNarrowWidth"),ri.updatePopoverPosition(this)}toggleKeystrokeCaption_(){this.keystrokeCaptionVisible=!this.keystrokeCaptionVisible,this.keystrokeCaption.innerHTML="",this.keystrokeCaptionVisible||(this.keystrokeCaption.style.visibility="hidden")}_showKeystroke(t){const e=this.keystrokeCaption;if(e&&this.keystrokeCaptionVisible){const i=this.element.getBoundingClientRect();e.style.left=i.left+"px",e.style.top=i.top-64+"px",e.innerHTML="<span>"+(De.stringify(t)||t)+"</span>"+e.innerHTML,e.style.visibility="visible",setTimeout(function(){e.childNodes.length>0&&e.removeChild(e.childNodes[e.childNodes.length-1]),0===e.childNodes.length&&(e.style.visibility="hidden")},3e3)}}$perform(t){if(!t)return!1;let e,i=!1,s=[],a=!1;if(Array.isArray(t)?(e=t[0],s=t.slice(1)):e=t,e=e.replace(/-\w/g,t=>t[1].toUpperCase()),e+="_","function"==typeof this.mathlist[e]){if(/^(delete|transpose|add)/.test(e)&&this._resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(e)&&"command"!==this.mode&&(this.undoManager.pop(),this.undoManager.snapshot(this.config)),this.mathlist[e](...s),/^(delete|transpose|add)/.test(e)&&"command"!==this.mode&&this.undoManager.snapshot(this.config),/^(delete)/.test(e)&&"command"===this.mode){const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=Bt.suggest(t);0===e.length?ri.hidePopover(this):ri.showPopoverWithLatex(this,e[0].match,e.length>1)}a=!0,i=!0}else"function"==typeof this[e]&&(a=this[e](...s),i=!0);return this.mathlist.isCollapsed()&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(e)||(this._resetKeystrokeBuffer(),this.style={}),a&&this._requestUpdate(),i}performWithFeedback_(t){return this.focus(),this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(ks),"moveToNextPlaceholder"===(t=t.replace(/-\w/g,t=>t[1].toUpperCase()))||"moveToPreviousPlaceholder"===t||"complete"===t?this.returnKeypressSound?(this.returnKeypressSound.load(),this.returnKeypressSound.play().catch(t=>void 0)):this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0)):"deletePreviousChar"!==t&&"deleteNextChar"!==t&&"deletePreviousWord"!==t&&"deleteNextWord"!==t&&"deleteToGroupStart"!==t&&"deleteToGroupEnd"!==t&&"deleteToMathFieldStart"!==t&&"deleteToMathFieldEnd"!==t||!this.deleteKeypressSound?this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0)):(this.deleteKeypressSound.load(),this.deleteKeypressSound.play().catch(t=>void 0)),this.$perform(t)}convertLastAtomsToText_(t,e){"function"==typeof t&&(e=t,t=1/0),void 0===t&&(t=1/0);let i=0,s=!1;for(this.mathlist.contentWillChange();!s;){const a=this.mathlist.sibling(i);(s=0===t||!a||"math"!==a.mode||!(/mord|textord|mpunct/.test(a.type)||"mop"===a.type&&/[a-zA-Z]+/.test(a.body))||a.superscript||a.subscript||e&&!e(a))||(a.applyStyle({mode:"text"}),a.latex=a.body),i-=1,t-=1}this.mathlist.contentDidChange()}convertLastAtomsToMath_(t,e){"function"==typeof t&&(e=t,t=1/0),void 0===t&&(t=1/0),this.mathlist.contentWillChange();let i=0,s=!1;for(;!s;){const a=this.mathlist.sibling(i);(s=0===t||!a||"text"!==a.mode||" "===a.body||e&&!e(a))||a.applyStyle({mode:"math",type:"mord"}),i-=1,t-=1}this.removeIsolatedSpace_(),this.mathlist.contentDidChange()}removeIsolatedSpace_(){let t=0;for(;this.mathlist.sibling(t)&&"math"===this.mathlist.sibling(t).mode;)t-=1;if(this.mathlist.sibling(t)&&"text"===this.mathlist.sibling(t).mode&&" "===this.mathlist.sibling(t).body&&(!this.mathlist.sibling(t-1)||"math"===this.mathlist.sibling(t-1).mode)){this.mathlist.contentWillChange(),this.mathlist.siblings().splice(t-1,1),this.mathlist.contentDidChange();const e=this.mathlist.suppressChangeNotifications;this.mathlist.suppressChangeNotifications=!0,this.mathlist.setSelection(this.mathlist.anchorOffset()-1),this.mathlist.suppressChangeNotifications=e}}getTextBeforeAnchor_(){let t="",e=0,i=!1;for(;!i;){const s=this.mathlist.sibling(e);(i=!(s&&("text"===s.mode&&!s.type||"math"===s.mode&&/mord|textord|mpunct/.test(s.type))))||(t=s.body+t),e-=1}return t}smartMode_(t,e){if(this.smartModeSuppressed)return!1;if(this.mathlist.endOffset()<this.mathlist.siblings().length-1)return!1;if(!e||e.ctrlKey||e.metaKey)return!1;const i=ti.eventToChar(e);if(i.length>1)return!1;if(!this.mathlist.isCollapsed())return!("text"!==this.mode||!/[\/_^]/.test(i));const s=this.getTextBeforeAnchor_()+i;if("text"===this.mode){if("Esc"===t||/[\/\\]/.test(i))return!0;if(/[\^_]/.test(i))return/(^|\s)[a-zA-Z][^_]$/.test(s)&&this.convertLastAtomsToMath_(1),!0;const e={")":"(","}":"{","]":"["}[i];if(e&&this.mathlist.parent()&&"leftright"===this.mathlist.parent().type&&this.mathlist.parent().leftDelim===e)return!0;if(/(^|[^a-zA-Z])(a|I)[ ]$/.test(s))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(i))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z][ ]$/.test(s))return this.convertLastAtomsToMath_(1),!1;if(/[^0-9]\.[^0-9\s]$/.test(s)){this.convertLastAtomsToMath_(1);const t=this.mathlist.sibling(0);return t.body="⋅",t.autoFontFamily="cmr",t.latex="\\cdot",!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/\.[0-9]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/[(][0-9+\-.]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/[(][a-z][,;]$/.test(s))return this.convertLastAtomsToMath_(2),!0;if(/[0-9+\-=><*|]$/.test(i))return this.removeIsolatedSpace_(),!0}else{if("Spacebar"===t)return this.convertLastAtomsToText_(t=>/[a-z][:,;.]$/.test(t.body)),!0;if(/[a-zA-Z]{3,}$/.test(s)&&!/(dxd|abc|xyz|uvw)$/.test(s))return this.convertLastAtomsToText_(t=>/[a-zA-Z:,;.]/.test(t.body)),!0;if(/(^|\W)(if|If)$/i.test(s))return this.convertLastAtomsToText_(1),!0;if(/(\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5){3,}$/u.test(s)&&!/(αβγ)$/.test(s))return this.convertLastAtomsToText_(t=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)/u.test(t.body)),!0;if(/\?|\./.test(i))return!0}return!1}_onKeystroke(t,e){if(this._showKeystroke(t),clearTimeout(this.keystrokeBufferResetTimer),this.config.onKeystroke&&!this.config.onKeystroke(this,t,e))return e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),!1;let i,s,a,o=!1;if("command"!==this.mode&&(!e||!e.ctrlKey&&!e.metaKey)){const t=ti.eventToChar(e);if("Backspace"!==t)if(!t||t.length>1)this._resetKeystrokeBuffer();else{const e=this.keystrokeBuffer+t;let a=0;for(;!i&&a<e.length;){let t;if(this.keystrokeBufferStates[a]){const e=new Ge.EditableMathlist;e.root=me.makeRoot("math",ke.parseTokens(x.tokenize(this.keystrokeBufferStates[a].latex),this.config.default,null,this.config.macros)),e.setPath(this.keystrokeBufferStates[a].selection),t=e.siblings()}else t=this.mathlist.siblings();i=De.forString(this.mode,t,e.slice(a),this.config),a+=1}s=a-1,this.keystrokeBuffer+=t,this.keystrokeBufferStates.push(this.undoManager.save()),De.startsWithString(e,this.config).length<=1?o=!0:this.config.inlineShortcutTimeout&&(this.keystrokeBufferResetTimer=setTimeout(()=>{this._resetKeystrokeBuffer()},this.config.inlineShortcutTimeout))}}if(this.config.smartMode){const s=this.mode;i?this.mode="math":this.smartMode_(t,e)&&(this.mode={math:"text",text:"math"}[this.mode],a=""),this.mode!==s&&"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode)}if(i||a||(a=De.selectorForKeystroke(this.mode,t)),!i&&!a)return!0;this.mathlist.decorateCommandStringAroundInsertionPoint(!1);const n=this.mathlist.parent();if("moveAfterParent"===a&&n&&"leftright"===n.type&&this.mathlist.endOffset()===this.mathlist.siblings().length-1&&this.config.smartFence&&this.mathlist._insertSmartFence(".")&&(a="",this._requestUpdate()),"math"===this.mode&&"Spacebar"===t&&!i){const t=this.mathlist.sibling(1),e=this.mathlist.sibling(-1);(t&&"text"===t.mode||e&&"text"===e.mode)&&this.mathlist.insert(" ",{mode:"text"})}if((a&&!this.$perform(a)||i)&&i){if(!/^(\\{|\\}|\\[|\\]|\\@|\\#|\\$|\\%|\\^|\\_|\\backslash)$/.test(i)){const t={...this.mathlist.anchorStyle(),...this.style};this.mathlist.insert(ti.eventToChar(e),{suppressChangeNotifications:!0,mode:this.mode,style:t});const i=this.mode;this.undoManager.snapshotAndCoalesce(this.config),this.undoManager.restore(this.keystrokeBufferStates[s],{...this.config,suppressChangeNotifications:!0}),this.mode=i}this.mathlist.contentWillChange();const t=this.mathlist.suppressChangeNotifications;this.mathlist.suppressChangeNotifications=!0;const a={...this.mathlist.anchorStyle(),...this.style};this.mathlist.insert(i,{format:"latex",mode:this.mode,style:a,smartFence:!0}),this.removeIsolatedSpace_(),i.endsWith(" ")&&(this.mode="text",this.mathlist.insert(" ",{mode:"text",style:a})),this.mathlist.suppressChangeNotifications=t,this.mathlist.contentDidChange(),this.undoManager.snapshot(this.config),this._requestUpdate(),this._announce("replacement"),o&&this._resetKeystrokeBuffer()}return this.scrollIntoView(),e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),!1}_onTypedText(t,e){if((e=e||{}).focus&&this.$focus(),e.feedback&&(this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(ks),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0))),e.commandMode&&"command"!==this.mode&&this.switchMode_("command"),this.mathlist.decorateCommandStringAroundInsertionPoint(!1),e.simulateKeystroke){const e=t.charAt(0),i=ti.charToEvent(e);if(!this.$keystroke(ti.keyboardEventToString(i),i))return}let i="",s=!1;if(this.pasteInProgress)this.pasteInProgress=!1,this.mathlist.insert(t,{smartFence:this.config.smartFence,mode:"math"});else{const e={...this.mathlist.anchorStyle(),...this.style},a=g.splitGraphemes(t);for(const t of a)if("command"===this.mode){this.mathlist.removeSuggestion(),this.suggestionIndex=0;const e=this.mathlist.extractCommandStringAroundInsertionPoint(),a=Bt.suggest(e+t);s=a.length>1,0===a.length?(this.mathlist.insert(t,{mode:"command"}),/^\\[a-zA-Z\\*]+$/.test(e+t)&&this.mathlist.decorateCommandStringAroundInsertionPoint(!0),ri.hidePopover(this)):(this.mathlist.insert(t,{mode:"command"}),a[0].match!==e+t&&this.mathlist.insertSuggestion(a[0].match,-a[0].match.length+e.length+1),i=a[0].match)}else if("math"===this.mode){const i={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(i){if("moveToSuperscript"===i){if(this._superscriptDepth()>=this.config.scriptDepth[1])return void this._announce("plonk")}else if("moveToSubscript"===i&&this._subscriptDepth()>=this.config.scriptDepth[0])return void this._announce("plonk");this.$perform(i)}else this.config.smartSuperscript&&"superscript"===this.mathlist.relation()&&/[0-9]/.test(t)&&0===this.mathlist.siblings().filter(t=>"first"!==t.type).length?(this.mathlist.insert(t,{mode:"math",style:e}),this.mathlist.moveAfterParent_()):this.mathlist.insert(t,{mode:"math",style:e,smartFence:this.config.smartFence})}else"text"===this.mode&&this.mathlist.insert(t,{mode:"text",style:e})}"command"!==this.mode&&this.undoManager.snapshotAndCoalesce(this.config),this._requestUpdate(),this.scrollIntoView(),ri.showPopoverWithLatex(this,i,s)}_hash(){let t=0;const e=this.mathlist.root.toLatex(!1);for(let i=0;i<e.length;i++)t=31*t+e.charCodeAt(i),t|=0;return Math.abs(t)}_requestUpdate(){this.dirty||(this.dirty=!0,requestAnimationFrame(t=>this._render()))}_render(t){t=t||{},this.dirty=!1,window.mathlive||(window.mathlive={}),this.mathlist.anchor()||(this.mathlist.path=[{relation:"body",offset:0}]),this.mathlist.forEach(t=>{t.caret="",t.isSelected=!1});const e=this.$hasFocus();this.mathlist.isCollapsed()?this.mathlist.anchor().caret=e?this.mode:"":this.mathlist.forEachSelected(t=>{t.isSelected=!0});const i=me.decompose({mathstyle:"displaystyle",generateID:{seed:this._hash(),groupNumbers:t.forHighlighting},macros:this.config.macros},this.mathlist.root),s=et.makeSpan(i,"ML__base");s.attributes={translate:"no","aria-hidden":"true"};const a=et.makeSpan("","ML__strut");a.setStyle("height",s.height,"em");const o=[a];if(0!==s.depth){const t=et.makeSpan("","ML__strut--bottom");t.setStyle("height",s.height+s.depth,"em"),t.setStyle("vertical-align",-s.depth,"em"),o.push(t)}o.push(s);const n=et.makeSpan(o,"ML__mathlive");this.field.innerHTML=n.toMarkup(0,this.config.horizontalSpacingScale),this.field.classList.toggle("ML__focused",e),this.accessibleNode.innerHTML="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+me.toMathML(this.mathlist.root,this.config)+"</math>";const r=this._getSelectionBounds();if(r){const t=document.createElement("div");t.classList.add("ML__selection"),t.style.position="absolute",t.style.left=r.left+"px",t.style.top=r.top+"px",t.style.width=Math.ceil(r.right-r.left)+"px",t.style.height=Math.ceil(r.bottom-r.top-1)+"px",this.field.insertBefore(t,this.field.childNodes[0])}}_onPaste(){return this.pasteInProgress=!0,!0}_onCut(){return setTimeout(function(){this.$clearSelection(),this._requestUpdate()}.bind(this),0),!0}_onCopy(t){this.mathlist.isCollapsed()?(t.clipboardData.setData("text/plain",this.$text("latex-expanded")),t.clipboardData.setData("application/json",this.$text("json")),t.clipboardData.setData("application/xml",this.$text("mathML"))):(t.clipboardData.setData("text/plain",this.$selectedText("latex-expanded")),t.clipboardData.setData("application/json",this.$selectedText("json")),t.clipboardData.setData("application/xml",this.$selectedText("mathML"))),t.preventDefault()}formatMathlist(t,e){let i="";if("latex"===(e=e||"latex")||"latex-expanded"===e)i=t.toLatex("latex-expanded"===e);else if("mathML"===e)i=t.toMathML(this.config);else if("spoken"===e)i=me.toSpeakableText(t,this.config);else if("spoken-text"===e){const e=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="",i=me.toSpeakableText(t,this.config),this.config.textToSpeechMarkup=e}else if("spoken-ssml"===e||"spoken-ssml-withHighlighting"===e){const s=this.config.textToSpeechMarkup,a=this.config.generateID;this.config.textToSpeechMarkup="ssml","spoken-ssml-withHighlighting"===e&&(this.config.generateID=!0),i=me.toSpeakableText(t,this.config),this.config.textToSpeechMarkup=s,this.config.generateID=a}else if("json"===e){const e=me.toAST(t,this.config);i=JSON.stringify(e)}else"ASCIIMath"===e&&(i=function t(e,i){if(!e)return"";if(Array.isArray(e)){let i="";if(0===e.length)return"";if("first"===e[0].type&&e.shift(),"text"===e[0].mode){let s=0;for(i='"';e[s]&&"text"===e[s].mode;)i+=e[s].body,s++;i+='"'+t(e.slice(s))}else{let s=0;for(;e[s]&&"math"===e[s].mode;)i+=t(e[s]),s++;i+=t(e.slice(s))}return i.trim()}let s="";const a=e.latex?e.latex.trim():null;let o;switch(e.type){case"group":case"root":s=t(e.body);break;case"array":break;case"genfrac":(e.leftDelim||e.rightDelim)&&(s+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:"),e.hasBarLine?(s+="(",s+=t(e.numer),s+=")/(",s+=t(e.denom),s+=")"):(s+="("+t(e.numer)+"),",s+="("+t(e.denom)+")"),(e.leftDelim||e.rightDelim)&&(s+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:"{:");break;case"surd":e.index?s+="root("+t(e.index)+")("+t(e.body)+")":s+="sqrt("+t(e.body)+")";break;case"leftright":s+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:",s+=t(e.body),s+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:"{:";break;case"sizeddelim":case"delim":case"accent":break;case"line":case"overlap":case"overunder":break;case"mord":"\\"===(s=ki[a]||a||("string"==typeof e.body?e.body:""))[0]&&(s+=""),(o=a?a.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null)?s=String.fromCharCode(parseInt("0x"+o[1])):s.length>0&&"\\"===s.charAt(0)&&(s="string"==typeof e.body?e.body.charAt(0):e.latex);break;case"mbin":case"mrel":case"textord":case"minner":s=a&&ki[a]?ki[a]:a&&vi[a]?vi[a]:e.body;break;case"mopen":case"mclose":s+=e.body;break;case"mpunct":s=vi[a]||a;break;case"mop":"​"!==e.body&&(s="",s+="\\operatorname"===a?e.body:e.body||a,s+=" ");break;case"mathstyle":case"box":case"spacing":case"enclose":break;case"space":s=" "}if(e.subscript){s+="_";const i=t(e.subscript);i.length>1&&!/^(-)?\d+(\.\d*)?$/.test(i)?s+="("+i+")":s+=i}if(e.superscript){s+="^";const i=t(e.superscript);i.length>1&&!/^(-)?\d+(\.\d*)?$/.test(i)?s+="("+i+")":s+=i}return s}(t,this.config));return i}$text(t){return this.formatMathlist(this.mathlist.root,t)}$selectedText(t){const e=this.mathlist.getSelectedAtoms();if(!e)return"";const i=me.makeRoot("math",e);return this.formatMathlist(i,t)}$selectionIsCollapsed(){return this.mathlist.isCollapsed()}$selectionDepth(){return this.mathlist.path.length}_superscriptDepth(){let t=0,e=0,i=this.mathlist.ancestor(e),s=!1;for(;i;)(i.superscript||i.subscript)&&(t+=1),i.superscript?s=!0:i.subscript&&(s=!1),e+=1,i=this.mathlist.ancestor(e);return s?t:0}_subscriptDepth(){let t=0,e=0,i=this.mathlist.ancestor(e),s=!1;for(;i;)(i.superscript||i.subscript)&&(t+=1),i.superscript?s=!1:i.subscript&&(s=!0),e+=1,i=this.mathlist.ancestor(e);return s?t:0}$selectionAtStart(){return 0===this.mathlist.startOffset()}$selectionAtEnd(){return this.mathlist.endOffset()>=this.mathlist.siblings().length-1}groupIsSelected(){return 0===this.mathlist.startOffset()&&this.mathlist.endOffset()>=this.mathlist.siblings().length-1}$latex(t,e){return t?(t!==this.mathlist.root.toLatex()&&(e=e||{},this.mathlist.insert(t,Object.assign({},this.config,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:e.suppressChangeNotifications})),this.undoManager.snapshot(this.config),this._requestUpdate()),t):this.mathlist.root.toLatex()}$el(){return this.element}undo(){return this.complete_(),this.undoManager.undo(this.config),!0}redo(){return this.complete_(),this.undoManager.redo(this.config),!0}scrollIntoView(){this.dirty&&this._render();let t=this._getCaretPosition();const e=this.field.getBoundingClientRect();if(!t){const i=this._getSelectionBounds();i&&(t={x:i.right+e.left-this.field.scrollLeft,y:i.top+e.top-this.field.scrollTop})}if(t){const i=t.x-window.scrollX;i<e.left?this.field.scroll({top:0,left:i-e.left+this.field.scrollLeft-20,behavior:"smooth"}):i>e.right&&this.field.scroll({top:0,left:i-e.right+this.field.scrollLeft+20,behavior:"smooth"})}}scrollToStart(){this.field.scroll(0,0)}scrollToEnd(){const t=this.field.getBoundingClientRect();this.field.scroll(t.left-window.scrollX,0)}enterCommandMode_(){this.switchMode_("command")}copyToClipboard_(){return this.$focus(),this.mathlist.isCollapsed()&&this.$select(),document.execCommand("copy"),!1}cutToClipboard_(){return this.$focus(),document.execCommand("cut"),!0}pasteFromClipboard_(){return this.$focus(),document.execCommand("paste"),!0}$insert(t,e){if("string"==typeof t&&t.length>0){if((e=e||{}).focus&&this.$focus(),e.feedback&&(this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(ks),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),"\\\\"===t)this.mathlist.addRowAfter_();else if("&"===t)this.mathlist.addColumnAfter_();else{const i=this.style;this.mathlist.insert(t,{mode:this.mode,style:this.mathlist.anchorStyle(),...e}),e.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),this._requestUpdate(),!0}return!1}switchMode_(t,e,i){this._resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(t),e&&this.$insert(e,{format:"latex",mode:{math:"text",text:"math"}[t]}),this.mathlist.decorateCommandStringAroundInsertionPoint(!1),"command"===t?(this.mathlist.removeSuggestion(),ri.hidePopover(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&this.switchKeyboardLayer_("lower-command"),this.mathlist.insert("",{mode:"math"})):this.mode=t,i&&this.$insert(i,{format:"latex",mode:t}),"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),this._requestUpdate()}complete_(t){if(t=t||{},ri.hidePopover(this),t.discard)return this.mathlist.spliceCommandStringAroundInsertionPoint(null),this.switchMode_("math"),!0;const e=this.mathlist.extractCommandStringAroundInsertionPoint(!t.acceptSuggestion);if(e){if("\\("===e||"\\)"===e)this.mathlist.spliceCommandStringAroundInsertionPoint([]),this.mathlist.insert(e.slice(1),{mode:this.mode});else{const t="math";if(Bt.commandAllowed(t,e)){const i=ke.parseTokens(x.tokenize(e),t,null,this.config.macros);this.mathlist.spliceCommandStringAroundInsertionPoint(i)}else{const i=ke.parseTokens(x.tokenize(e),t,null,this.config.macros);i?this.mathlist.spliceCommandStringAroundInsertionPoint(i):this.mathlist.decorateCommandStringAroundInsertionPoint(!0)}}return this.undoManager.snapshot(this.config),this._announce("replacement"),!0}return!1}_updateSuggestion(){this.mathlist.positionInsertionPointAfterCommitedCommand(),this.mathlist.removeSuggestion();const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=Bt.suggest(t);if(0===e.length)ri.hidePopover(this),this.mathlist.decorateCommandStringAroundInsertionPoint(!0);else{const i=this.suggestionIndex%e.length,s=t.length-e[i].match.length;0!==s&&this.mathlist.insertSuggestion(e[i].match,s),ri.showPopoverWithLatex(this,e[i].match,e.length>1)}this._requestUpdate()}nextSuggestion_(){return this.suggestionIndex+=1,this._updateSuggestion(),!1}previousSuggestion_(){if(this.suggestionIndex-=1,this.suggestionIndex<0){this.mathlist.removeSuggestion();const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=Bt.suggest(t);this.suggestionIndex=e.length-1}return this._updateSuggestion(),!1}_attachButtonHandlers(t,e){const i=this;let s,a,o,n,r;"object"==typeof e&&(e.default||e.pressed)?(e.default&&t.setAttribute("data-"+this.config.namespace+"command",JSON.stringify(e.default)),e.alt&&t.setAttribute("data-"+this.config.namespace+"command-alt",JSON.stringify(e.alt)),e.altshift&&t.setAttribute("data-"+this.config.namespace+"command-altshift",JSON.stringify(e.altshift)),e.shift&&t.setAttribute("data-"+this.config.namespace+"command-shift",JSON.stringify(e.shift)),e.pressed&&t.setAttribute("data-"+this.config.namespace+"command-pressed",JSON.stringify(e.pressed)),e.pressAndHoldStart&&t.setAttribute("data-"+this.config.namespace+"command-pressAndHoldStart",JSON.stringify(e.pressAndHoldStart)),e.pressAndHoldEnd&&t.setAttribute("data-"+this.config.namespace+"command-pressAndHoldEnd",JSON.stringify(e.pressAndHoldEnd))):t.setAttribute("data-"+this.config.namespace+"command",JSON.stringify(e)),ws(t,"mousedown touchstart:passive",function(e){if("mousedown"!==e.type||1===e.buttons){e.stopPropagation(),e.preventDefault(),t.classList.add("pressed"),s=Date.now(),"touchstart"===e.type&&(o=e.changedTouches[0].identifier);const n=t.getAttribute("data-"+i.config.namespace+"command-pressed");n&&i.$perform(JSON.parse(n));const l=t.getAttribute("data-"+i.config.namespace+"command-pressAndHoldStart");l&&(a=t,r&&clearTimeout(r),r=window.setTimeout(function(){t.classList.contains("pressed")&&i.$perform(JSON.parse(l))},300))}}),ws(t,"mouseleave touchcancel",function(){t.classList.remove("pressed")}),ws(t,"touchmove:passive",function(t){t.preventDefault();for(let e=0;e<t.changedTouches.length;e++)if(t.changedTouches[e].identifier===o){const i=document.elementFromPoint(t.changedTouches[e].clientX,t.changedTouches[e].clientY);i!==n&&n&&(n.dispatchEvent(new MouseEvent("mouseleave"),{bubbles:!0}),n=null),i&&(n=i,i.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0,buttons:1})))}}),ws(t,"mouseenter",function(e){1===e.buttons&&t.classList.add("pressed")}),ws(t,"mouseup touchend click",function(e){if(n){e.stopPropagation(),e.preventDefault();const t=n;return n=null,void t.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("pressed"),t.classList.add("active"),"click"===e.type&&0!==e.detail)return e.stopPropagation(),void e.preventDefault();window.setTimeout(function(){t.classList.remove("active")},150);let o=t.getAttribute("data-"+i.config.namespace+"command-pressAndHoldEnd");const r=Date.now();(t!==a||r<s+300)&&(o=void 0),!o&&e.altKey&&e.shiftKey&&(o=t.getAttribute("data-"+i.config.namespace+"command-altshift")),!o&&e.altKey&&(o=t.getAttribute("data-"+i.config.namespace+"command-alt")),!o&&e.shiftKey&&(o=t.getAttribute("data-"+i.config.namespace+"command-shift")),o||(o=t.getAttribute("data-"+i.config.namespace+"command")),o&&i.$perform(JSON.parse(o)),e.stopPropagation(),e.preventDefault()})}_makeButton(t,e,i,s){const a=document.createElement("span");return a.innerHTML=t,e&&a.classList.add([].slice.call(e.split(" "))),i&&a.setAttribute("aria-label",i),this._attachButtonHandlers(a,s),a}showAlternateKeys_(t,e){const i=As("mathlive-alternate-keys-panel","ML__keyboard alternate-keys");this.virtualKeyboard.classList.contains("material")&&i.classList.add("material"),e.length>=7?i.style.width="286px":4===e.length||2===e.length?i.style.width="146px":1===e.length?i.style.width="86px":i.style.width="146px",i.style.height="auto";let s="";for(const t of e)s+="<li","string"==typeof t?s+=' data-latex="'+t.replace(/"/g,"&quot;")+'"':(t.latex&&(s+=' data-latex="'+t.latex.replace(/"/g,"&quot;")+'"'),t.content&&(s+=' data-content="'+t.content.replace(/"/g,"&quot;")+'"'),t.insert&&(s+=' data-insert="'+t.insert.replace(/"/g,"&quot;")+'"'),t.command&&(s+=" data-command='"+t.command.replace(/"/g,"&quot;")+"'"),t.aside&&(s+=' data-aside="'+t.aside.replace(/"/g,"&quot;")+'"'),t.classes&&(s+=' data-classes="'+t.classes+'"')),s+=">",s+=t.label||"",s+="</li>";s="<ul>"+s+"</ul>",i.innerHTML=s,xi.makeKeycap(this,i.getElementsByTagName("li"),"performAlternateKeys");const a=this.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]').getBoundingClientRect();if(a){a.top-i.clientHeight<0&&(i.style.width="auto",e.length<=6?i.style.height="56px":e.length<=12?i.style.height="108px":i.style.height="205px");const t=(a.top-i.clientHeight+5).toString()+"px",s=Math.max(0,Math.min(window.innerWidth-i.offsetWidth,(a.left+a.right-i.offsetWidth)/2))+"px";i.style.transform="translate("+s+","+t+")",i.classList.add("is-visible")}return!1}hideAlternateKeys_(){const t=document.getElementById("mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML="",Cs(t)),!1}performAlternateKeys_(t){return this.hideAlternateKeys_(),this.$perform(t)}switchKeyboardLayer_(t){if("off"!==this.config.virtualKeyboardMode){"lower-command"!==t&&"upper-command"!==t&&"symbols-command"!==t&&this.complete_(),this.showVirtualKeyboard_(),this.hideAlternateKeys_(),this.unshiftKeyboardLayer_();const e=this.virtualKeyboard.getElementsByClassName("keyboard-layer");let i=!1;for(let s=0;s<e.length;s++)if(e[s].id===t){i=!0;break}if(i)for(let i=0;i<e.length;i++)e[i].id===t?e[i].classList.add("is-visible"):e[i].classList.remove("is-visible");this.$focus()}return!0}shiftKeyboardLayer_(){const t=this.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let e=0;e<t.length;e++){const i=t[e];let s=i.getAttribute("data-shifted");if(s||/^[a-z]$/.test(i.innerHTML)){i.setAttribute("data-unshifted-content",i.innerHTML),s||(s=i.innerHTML.toUpperCase()),i.innerHTML=s;const t=i.getAttribute("data-"+this.config.namespace+"command");if(t){i.setAttribute("data-unshifted-command",t);const e=i.getAttribute("data-shifted-command");if(e)i.setAttribute("data-"+this.config.namespace+"command",e);else{const e=JSON.parse(t);Array.isArray(e)&&(e[1]=e[1].toUpperCase()),i.setAttribute("data-"+this.config.namespace+"command",JSON.stringify(e))}}}}return!1}unshiftKeyboardLayer_(){const t=this.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let e=0;e<t.length;e++){const i=t[e],s=i.getAttribute("data-unshifted-content");s&&(i.innerHTML=s);const a=i.getAttribute("data-unshifted-command");a&&i.setAttribute("data-"+this.config.namespace+"command",a)}return!1}insertAndUnshiftKeyboardLayer_(t){return this.$insert(t),this.unshiftKeyboardLayer_(),!0}toggleVirtualKeyboardAlt_(){let t=!1;return this.virtualKeyboard&&(t=this.virtualKeyboard.classList.contains("material"),this.virtualKeyboard.remove(),delete this.virtualKeyboard,this.virtualKeyboard=null),this.showVirtualKeyboard_(t?"":"material"),!1}toggleVirtualKeyboardShift_(){this.config.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[this.config.virtualKeyboardLayout];let t=this.virtualKeyboard?this.virtualKeyboard.querySelector("div.keyboard-layer.is-visible"):null;return t=t?t.id:"",this.virtualKeyboard&&(this.virtualKeyboard.remove(),delete this.virtualKeyboard,this.virtualKeyboard=null),this.showVirtualKeyboard_(),t&&this.switchKeyboardLayer_(t),!1}showVirtualKeyboard_(t){return this.virtualKeyboardVisible=!1,this.toggleVirtualKeyboard_(t),!1}hideVirtualKeyboard_(){return this.virtualKeyboardVisible=!0,this.toggleVirtualKeyboard_(),!1}toggleVirtualKeyboard_(t){if(this.virtualKeyboardVisible=!this.virtualKeyboardVisible,this.virtualKeyboardVisible){this.virtualKeyboard?this.virtualKeyboard.classList.add("is-visible"):(this.virtualKeyboard=xi.make(this,t),ws(this.virtualKeyboard,"touchstart:passive mousedown",function(){e.$focus()}),document.body.appendChild(this.virtualKeyboard));const e=this;window.setTimeout(function(){e.virtualKeyboard.classList.add("is-visible")},1)}else this.virtualKeyboard&&this.virtualKeyboard.classList.remove("is-visible");return"function"==typeof this.config.onVirtualKeyboardToggle&&this.config.onVirtualKeyboardToggle(this,this.virtualKeyboardVisible,this.virtualKeyboard),!1}$applyStyle(t){if(this._resetKeystrokeBuffer(),(t=function(t){const e={};return"string"==typeof t.mode&&(e.mode=t.mode.toLowerCase()),"string"==typeof t.color&&(e.color=t.color),"string"==typeof t.backgroundColor&&(e.backgroundColor=t.backgroundColor),"string"==typeof t.fontFamily&&(e.fontFamily=t.fontFamily),"string"==typeof t.series&&(e.fontSeries=t.series),"string"==typeof t.fontSeries&&(e.fontSeries=t.fontSeries.toLowerCase()),e.fontSeries&&(e.fontSeries={bold:"b",medium:"m",normal:"mn"}[e.fontSeries]||e.fontSeries),"string"==typeof t.shape&&(e.fontShape=t.shape),"string"==typeof t.fontShape&&(e.fontShape=t.fontShape.toLowerCase()),e.fontShape&&(e.fontShape={italic:"it",up:"n",upright:"n",normal:"n"}[e.fontShape]||e.fontShape),"string"==typeof t.size?e.fontSize=t.size:"number"==typeof t.size&&(e.fontSize="size"+Math.min(0,Math.max(10,t.size))),"string"==typeof t.fontSize&&(e.fontSize=t.fontSize.toLowerCase()),e.fontSize&&(e.fontSize={tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normal:"size5",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[e.fontSize]||e.fontSize),e}(t)).mode){if(this.mathlist.isCollapsed())this.switchMode_(t.mode);else{const t=this.mode,e="math"===(this.mathlist.anchorMode()||this.config.default)?"text":"math";let i=this.$selectedText("ASCIIMath");if("math"===e&&/^"[^"]+"$/.test(i)&&(i=i.slice(1,-1)),this.$insert(i,{mode:e,selectionMode:"item",format:"text"===e?"text":"ASCIIMath"}),this.mode=e,this.groupIsSelected()){const t=this.mathlist.parent();!t||"group"!==t.type&&"root"!==t.type||(t.mode=e)}this.mode!==t&&"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode)}delete t.mode}return this.mathlist.isCollapsed()?(this.style.fontSeries&&t.fontSeries===this.style.fontSeries&&(t.fontSeries="auto"),t.fontShape&&t.fontShape===this.style.fontShape&&(t.fontShape="auto"),t.color&&t.color===this.style.color&&(t.color="none"),t.backgroundColor&&t.backgroundColor===this.style.backgroundColor&&(t.backgroundColor="none"),t.fontSize&&t.fontSize===this.style.fontSize&&(t.fontSize="auto"),this.style={...this.style,...t}):(this.mathlist._applyStyle(t),this.undoManager.snapshot(this.config)),!0}$hasFocus(){return document.hasFocus()&&document.activeElement===this.textarea}$focus(){this.$hasFocus()||(this.textarea.focus&&this.textarea.focus(),this._announce("line"))}$blur(){this.$hasFocus()&&this.textarea.blur&&this.textarea.blur()}$select(){this.mathlist.selectAll_()}$clearSelection(){this.mathlist.delete_()}$keystroke(t,e){return this._onKeystroke(t,e)}$typedText(t){this._onTypedText(t)}typedText_(t,e){return this._onTypedText(t,e)}$setConfig(t){if(this.config||(this.config={smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,overrideDefaultInlineShortcuts:!1,virtualKeyboard:"",virtualKeyboardLayout:"qwerty",namespace:""}),this.config={...this.config,...t},void 0!==this.config.scriptDepth&&!Array.isArray(this.config.scriptDepth)){const t=parseInt(this.config.scriptDepth);this.config.scriptDepth=[t,t]}if(void 0===this.config.removeExtraneousParentheses&&(this.config.removeExtraneousParentheses=!0),this.config.onAnnounce=t.onAnnounce||Fs,this.config.macros=Object.assign({},Bt.MACROS,this.config.macros),!/^[a-z]*[-]?$/.test(this.config.namespace))throw Error("options.namespace must be a string of lowercase characters only");/-$/.test(this.config.namespace)||(this.config.namespace+="-"),ci.locale=this.config.locale||ci.locale,ci.merge(this.config.strings),this.config.virtualKeyboardLayout=t.virtualKeyboardLayout||{fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[ci.locale.substring(0,2)]||"qwerty",this.keypressSound=void 0,this.spacebarKeypressSound=void 0,this.returnKeypressSound=void 0,this.deleteKeypressSound=void 0,this.config.keypressSound&&("string"==typeof this.config.keypressSound?(this.keypressSound=new Audio,this.keypressSound.preload="none",this.keypressSound.src=this.config.keypressSound,this.keypressSound.volume=vs,this.spacebarKeypressSound=this.keypressSound,this.returnKeypressSound=this.keypressSound,this.deleteKeypressSound=this.keypressSound):(this.keypressSound=new Audio,this.keypressSound.preload="none",this.keypressSound.src=this.config.keypressSound.default,this.keypressSound.volume=vs,this.spacebarKeypressSound=this.keypressSound,this.returnKeypressSound=this.keypressSound,this.deleteKeypressSound=this.keypressSound,this.config.keypressSound.spacebar&&(this.spacebarKeypressSound=new Audio,this.spacebarKeypressSound.preload="none",this.spacebarKeypressSound.src=this.config.keypressSound.spacebar,this.spacebarKeypressSound.volume=vs),this.config.keypressSound.return&&(this.returnKeypressSound=new Audio,this.returnKeypressSound.preload="none",this.returnKeypressSound.src=this.config.keypressSound.return,this.returnKeypressSound.volume=vs),this.config.keypressSound.delete&&(this.deleteKeypressSound=new Audio,this.deleteKeypressSound.preload="none",this.deleteKeypressSound.src=this.config.keypressSound.delete,this.deleteKeypressSound.volume=vs))),this.config.plonkSound&&(this.plonkSound=new Audio,this.plonkSound.preload="none",this.plonkSound.src=this.config.plonkSound,this.plonkSound.volume=vs)}speak_(t,e){e=e||{withHighlighting:!1};const i=function(t,e){let i=null;switch(e){case"all":i=t.mathlist.root;break;case"selection":t.mathlist.isCollapsed()||(i=t.mathlist.getSelectedAtoms());break;case"left":{const e=t.mathlist.siblings(),s=t.mathlist.startOffset();if(s>=1){i=[];for(let t=1;t<=s;t++)i.push(e[t])}break}case"right":{const e=t.mathlist.siblings(),s=t.mathlist.endOffset()+1;if(s<=e.length-1){i=[];for(let t=s;t<=e.length-1;t++)i.push(e[t])}break}case"start":case"end":break;case"group":i=t.mathlist.siblings();break;case"parent":{const e=t.mathlist.parent();e&&"root"!==e.type&&(i=t.mathlist.parent());break}}return i}(this,t);if(null===i)return this.config.handleSpeak(function(t){let e="";switch(t){case"all":break;case"selection":e="no selection";break;case"left":e="at start";break;case"right":e="at end";break;case"group":break;case"parent":e="no parent"}return e}(t)),!1;const s={...this.config};(e.withHighlighting||"amazon"===s.speechEngine)&&(s.textToSpeechMarkup=window.sre&&"sre"===s.textToSpeechRules?"ssml_step":"ssml",e.withHighlighting&&(s.generateID=!0));const a=me.toSpeakableText(i,s);return e.withHighlighting?(window.mathlive.readAloudMathField=this,this._render({forHighlighting:!0}),this.config.handleReadAloud&&this.config.handleReadAloud(this.field,a,this.config)):this.config.handleSpeak&&this.config.handleSpeak(a,s),!1}}let _s,Ts=0;function Ls(t,e,i){const s=Object.assign({},t.config);return s.textToSpeechMarkup="",s.textToSpeechRulesOptions=s.textToSpeechRulesOptions||{},s.textToSpeechRulesOptions.markup="none",e+me.toSpeakableText(i,s)}function Fs(t,e,i,s){let a="";"plonk"===e?(t.plonkSound&&(t.plonkSound.load(),t.plonkSound.play().catch(t=>void 0)),t._resetKeystrokeBuffer()):"delete"===e?a=Ls(t,"deleted: ",s):"focus"===e||/move/.test(e)?a=(t.mathlist.isCollapsed()?"":"selected: ")+t._nextAtomSpeechText(i):"replacement"===e?a=Ls(t,"",t.mathlist.sibling(0)):"line"===e?(a=Ls(t,"",t.mathlist.root),t.accessibleNode.innerHTML='<math xmlns="http://www.w3.org/1998/Math/MathML">'+me.toMathML(t.mathlist.root,t.config)+"</math>",t.textarea.setAttribute("aria-label","after: "+a)):a=s?Ls(t,e+" ",s):e;const o=/\u00a0/.test(t.ariaLiveText.textContent)?"   ":"   ";t.ariaLiveText.textContent=a+o}Ms.prototype.undo_=Ms.prototype.undo,Ms.prototype.redo_=Ms.prototype.redo,Ms.prototype.scrollIntoView_=Ms.prototype.scrollIntoView,Ms.prototype.scrollToStart_=Ms.prototype.scrollToStart,Ms.prototype.scrollToEnd_=Ms.prototype.scrollToEnd,Ms.prototype.insert_=Ms.prototype.$insert;var Ds={MathField:Ms};function zs(t,e,i){let s=i,a=0;const o=t.length;for(;s<e.length;){const i=e[s];if(a<=0&&e.slice(s,s+o)===t)return s;"\\"===i?s++:"{"===i?a++:"}"===i&&a--,s++}return-1}function Es(t,e,i,s){const a=[];for(let o=0;o<t.length;o++)if("text"===t[o].type){const n=t[o].data;let r,l=!0,c=0;-1!==(r=n.indexOf(e))&&((c=r)>0&&a.push({type:"text",data:n.slice(0,c)}),l=!1);let h=!1;for(;!h;){if(l){if(-1===(r=n.indexOf(e,c))){h=!0;break}c!==r&&a.push({type:"text",data:n.slice(c,r)}),c=r}else{if(-1===(r=zs(i,n,c+e.length))){h=!0;break}a.push({type:"math",data:n.slice(c+e.length,r),rawData:n.slice(c,r+i.length),mathstyle:s}),c=r+i.length}l=!l}c<n.length&&a.push({type:"text",data:n.slice(c)})}else a.push(t[o]);return a}function qs(t,e){let i=[{type:"text",data:t}];for(let t=0;t<e.inline.length;t++){const s=e.inline[t];i=Es(i,s[0],s[1],"textstyle")}for(let t=0;t<e.display.length;t++){const s=e.display[t];i=Es(i,s[0],s[1],"displaystyle")}return i}function Is(t,e,i,s){const a=function(t,e,i,s){let a=document.createElement("span");a.setAttribute("aria-hidden","true"),e.preserveOriginalContent&&(a.setAttribute("data-"+e.namespace+"original-content",t),i&&a.setAttribute("data-"+e.namespace+"original-mathstyle",i));try{a.innerHTML=e.renderToMarkup(t,i||"displaystyle","html",e.macros)}catch(e){if(!s)return null;a=document.createTextNode(t)}return a}(t,i,e,s);if(a&&/\b(mathml|speakable-text)\b/i.test(i.renderAccessibleContent)){const e=document.createDocumentFragment();if(/\bmathml\b/i.test(i.renderAccessibleContent)&&i.renderToMathML&&e.appendChild(function(t,e){const i=document.createElement("span");try{i.innerHTML="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+e.renderToMathML(t,e)+"</math>"}catch(e){i.textContent=t}return i.className="sr-only",i}(t,i)),/\bspeakable-text\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const s=document.createElement("span");s.innerHTML=i.renderToSpeakableText(t,i),s.className="sr-only",e.appendChild(s)}return e.appendChild(a),e}return a}function Ps(t,e){let i=null;if(e.TeX.processEnvironments&&/^\s*\\begin/.test(t))(i=document.createDocumentFragment()).appendChild(Is(t,void 0,e,!0));else{const s=qs(t,e.TeX.delimiters);if(1===s.length&&"text"===s[0].type)return null;i=document.createDocumentFragment();for(let t=0;t<s.length;t++)"text"===s[t].type?i.appendChild(document.createTextNode(s[t].data)):i.appendChild(Is(s[t].data,s[t].mathstyle,e,!0))}return i}const Bs={namespace:"",skipTags:["noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",preserveOriginalContent:!0,renderAccessibleContent:"mathml",TeX:{disabled:!1,processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};var Os={renderMathInElement:function(t,e){try{if((e=Object.assign({},Bs,e)).ignoreClassPattern=new RegExp(e.ignoreClass),e.processClassPattern=new RegExp(e.processClass),e.processScriptTypePattern=new RegExp(e.processScriptType),e.macros=Bt.MACROS,e.namespace){if(!/^[a-z]+[-]?$/.test(e.namespace))throw Error("options.namespace must be a string of lowercase characters only");/-$/.test(e.namespace)||(e.namespace+="-")}!function t(e,i){const s=e.getAttribute("data-"+i.namespace+"original-content");if(s){const t=Is(s,e.getAttribute("data-"+i.namespace+"mathstyle"),i,!1);null!=t&&(e.textContent="",e.appendChild(t))}else{if(1===e.childNodes.length&&3===e.childNodes[0].nodeType){const t=e.childNodes[0].textContent;if(i.TeX.processEnvironments&&/^\s*\\begin/.test(t))return e.textContent="",void e.appendChild(Is(t,void 0,i,!0));const s=qs(t,i.TeX.delimiters);if(1===s.length&&"math"===s[0].type)return e.textContent="",void e.appendChild(Is(s[0].data,s[0].mathstyle,i,!0));if(1===s.length&&"text"===s[0].type)return}for(let s=0;s<e.childNodes.length;s++){const a=e.childNodes[s];if(3===a.nodeType){const t=Ps(a.textContent,i);t&&(s+=t.childNodes.length-1,e.replaceChild(t,a))}else if(1===a.nodeType){const e=a.nodeName.toLowerCase();if("script"===e&&i.processScriptTypePattern.test(a.type)){let t="displaystyle";for(const e of a.type.split(";")){const i=e.split("=");"mode"===i[0].toLowerCase()&&(t="display"===i[1].toLoweCase()?"displaystyle":"textstyle")}const e=Is(a.textContent,t,i,!0);a.parentNode.replaceChild(e,a)}else(i.processClassPattern.test(a.className)||!i.skipTags.includes(e)&&!i.ignoreClassPattern.test(a.className))&&t(a,i)}}}}(t,e)}catch(t){Error}}};function Rs(t,e,i,s){e=e||"displaystyle";const a=x.tokenize(t),o=ke.parseTokens(a,"math",null,s);if("mathlist"===i)return o;let n=me.decompose({mathstyle:e},o);if(n=et.coalesce(n),"span"===i)return n;const r=et.makeSpan(n,"ML__base"),l=et.makeSpan("","ML__strut");l.setStyle("height",r.height,"em");const c=[l];if(0!==r.depth){const t=et.makeSpan("","ML__strut--bottom");t.setStyle("height",r.height+r.depth,"em"),t.setStyle("vertical-align",-r.depth,"em"),c.push(t)}return c.push(r),et.makeSpan(c,"ML__mathlive").toMarkup()}function Ks(t,e){if(!me.toMathML)return"";(e=e||{}).macros=e.macros||{},Object.assign(e.macros,Bt.MACROS);const i=ke.parseTokens(x.tokenize(t),"math",null,e.macros);return me.toMathML(i,e)}function Ns(t,e){if(!me.toSpeakableText)return"";(e=e||{}).macros=e.macros||{},Object.assign(e.macros,Bt.MACROS);const i=ke.parseTokens(x.tokenize(t),"math",null,e.macros);return me.toSpeakableText(i,e)}function $s(t,e){if(!e&&window&&window.mathlive&&(e=window.mathlive.config),(e=e||{}).speechEngine&&"local"!==e.speechEngine)if("amazon"===e.speechEngine){if(window&&window.AWS){const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),s={OutputFormat:"mp3",VoiceId:e.speechEngineVoice||"Joanna",Text:t,TextType:"ssml"};i.synthesizeSpeech(s,function(t,e){if(t);else if(e&&e.AudioStream){const t=new Uint8Array(e.AudioStream),i=new Blob([t.buffer],{type:"audio/mpeg"}),s=URL.createObjectURL(i);new Audio(s).play().catch(t=>void 0)}})}}else e.speechEngine;else{const e=new SpeechSynthesisUtterance(t);window&&window.speechSynthesis.speak(e)}}function Ws(t,e,i){if(!window)return;if(!i&&window.mathlive&&(i=window.mathlive.config),"amazon"!==(i=i||{}).speechEngine)return void(i.handleSpeak&&i.handleSpeak(e));if(!window.AWS)return;const s=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"json",VoiceId:i.speechEngineVoice||"Joanna",Text:e,TextType:"ssml",SpeechMarkTypes:["ssml"]};window.mathlive=window.mathlive||{},window.mathlive.readAloudElement=t;const o=i.onReadAloudStatus||window.mathlive.onReadAloudStatus;s.synthesizeSpeech(a,function(t,e){if(t);else if(e&&e.AudioStream){const t=new TextDecoder("utf-8").decode(new Uint8Array(e.AudioStream));window.mathlive.readAloudMarks=t.split("\n").map(t=>t?JSON.parse(t):{}),window.mathlive.readAloudTokens=[];for(const t of window.mathlive.readAloudMarks)t.value&&window.mathlive.readAloudTokens.push(t.value);window.mathlive.readAloudCurrentMark="",a.OutputFormat="mp3",a.SpeechMarkTypes=[],s.synthesizeSpeech(a,function(t,e){if(t);else if(e&&e.AudioStream){const t=new Uint8Array(e.AudioStream),i=new Blob([t.buffer],{type:"audio/mpeg"}),s=URL.createObjectURL(i);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",()=>{o&&o(window.mathlive.readAloudMathField,"ended"),window.mathlive.readAloudMathField?(window.mathlive.readAloudMathField._render(),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):function t(e){e.classList.remove("highlight"),e.children&&Array.from(e.children).forEach(e=>{t(e)})}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener("timeupdate",()=>{let t="";const e=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time<e&&(t=i.value);window.mathlive.readAloudCurrentMark!==t&&(window.mathlive.readAloudCurrentToken=t,t&&t===window.mathlive.readAloudFinalToken?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudCurrentMark=t,function t(e,i){i&&e.dataset.atomId!==i?(e.classList.remove("highlight"),e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e,i)})):(e.classList.add("highlight"),e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=s,o&&o(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}})}})}function Hs(t){let e=t;if("string"==typeof t&&!(e=document.getElementById(t)))throw Error(`The element with ID "${t}" could not be found.`);return e}function Vs(t,e){Os&&((e=e||{}).renderToMarkup=e.renderToMarkup||Rs,e.renderToMathML=e.renderToMathML||Ks,e.renderToSpeakableText=e.renderToSpeakableText||Ns,e.macros=e.macros||Bt.MACROS,Os.renderMathInElement(Hs(t),e))}function Us(t){if(t.namespace){if(!/^[a-z]+[-]?$/.test(t.namespace))throw Error("options.namespace must be a string of lowercase characters only");/-$/.test(t.namespace)||(t.namespace+="-")}}const js={latexToMarkup:Rs,latexToMathML:Ks,latexToSpeakableText:Ns,latexToAST:function(t,e){if(!me.toAST)return{};(e=e||{}).macros=e.macros||{},Object.assign(e.macros,Bt.MACROS);const i=ke.parseTokens(x.tokenize(t),"math",null,e.macros);return me.toAST(i,e)},makeMathField:function(t,e){if(!Ds)throw Error("The MathField module is not loaded.");return(e=e||{}).handleSpeak=e.handleSpeak||$s,e.handleReadAloud=e.handleReadAloud||Ws,new Ds.MathField(Hs(t),e)},renderMathInDocument:function(t){Vs(document.body,t)},renderMathInElement:Vs,revertToOriginalContent:function(t,e){(t=(t=Hs(t)).children[1])instanceof Ds.MathField?t.revertToOriginalContent():(Us(e=e||{}),t.innerHTML=t.getAttribute("data-"+(e.namespace||"")+"original-content"))},getOriginalContent:function(t,e){return(t=(t=Hs(t)).children[1])instanceof Ds.MathField?t.originalContent:(Us(e=e||{}),t.getAttribute("data-"+(e.namespace||"")+"original-content"))},readAloud:Ws,readAloudStatus:function(){return window?(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.paused?"paused":window.mathlive.readAloudAudio.ended?"ready":"playing":"ready"):"unavailable"},pauseReadAloud:function(){window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio&&(window.mathlive.onReadAloudStatus&&window.mathlive.onReadAloudStatus(window.mathlive.readAloudMathField,"paused"),window.mathlive.readAloudAudio.pause()))},resumeReadAloud:function(){window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio&&(window.mathlive.onReadAloudStatus&&window.mathlive.onReadAloudStatus(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()))},playReadAloud:function(t,e){if(window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio)){let i=0;if(window.mathlive.readAloudFinalToken=null,t){window.mathlive.readAloudMarks=window.mathlive.readAloudMarks||[];for(const e of window.mathlive.readAloudMarks)e.value===t&&(i=e.time/1e3);let s=window.mathlive.readAloudTokens.indexOf(t);s>=0&&(s+=e)<window.mathlive.readAloudTokens.length&&(window.mathlive.readAloudFinalToken=s)}window.mathlive.readAloudAudio.currentTime=i,window.mathlive.onReadAloudStatus&&window.mathlive.onReadAloudStatus(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}}};export default js;
419,419
Common Lisp
.l
1
419,418
419,418
0.640435
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
f31587fa2923823225dbb9479042401bf8ac8023a062a0de7c3f151d89fa2131
38,310
[ -1 ]
38,311
all.css
mohe2015_schule/static/all.css
.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900}
53,592
Common Lisp
.l
1
53,592
53,592
0.744813
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
d2b00653c0565884b44790ae3c98244554233ad8872b2bef22db2dab1b26bb0c
38,311
[ -1 ]
38,312
mathlive.core.css
mohe2015_schule/static/mathlive.core.css
.ML__mathlive{line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;display:inline-block;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__base{display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:1em}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-command-blink 1.05s step-end infinite forwards;animation:ML__caret-command-blink 1.05s step-end infinite forwards}.ML__text{white-space:pre}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}@-webkit-keyframes ML__caret-command-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-command-blink{0%,to{opacity:1}50%{opacity:0}}@-webkit-keyframes ML__caret-blink{0%,to{border-color:var(--caret)}50%{border-color:transparent}}@keyframes ML__caret-blink{0%,to{border-color:var(--caret)}50%{border-color:transparent}}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}
4,037
Common Lisp
.l
1
4,037
4,037
0.760961
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
8a19b5f67e8b28a837d4d82cc4d5c19cc6dbfb4783f8999fef80155807fe0811
38,312
[ -1 ]
38,313
mathlive.css
mohe2015_schule/static/mathlive.css
@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathrm{font-family:KaTeX_Main;font-style:normal}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__mainit{font-family:KaTeX_Main;font-style:italic}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__mathlive .highlight{color:#007cb2;background:#edd1b0}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid #000}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__selection{background:var(--highlight-inactive);box-sizing:border-box}.ML__focused .ML__selection{background:var(--highlight)!important;color:var(--on-highlight)}.ML__command{font-family:Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;letter-spacing:-1px;font-weight:400;color:var(--primary)}:not(.ML__command)+.ML__command{margin-left:.25em}.ML__command+:not(.ML__command){padding-left:.25em}.ML__smart-fence__close{opacity:.5}.ML__keystroke-caption{visibility:hidden;background:var(--secondary);border-color:var(--secondary-border);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);text-align:center;border-radius:6px;padding:16px;position:absolute;z-index:1;display:flex;flex-direction:row;justify-content:center;--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}}body[theme=dark] .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}[data-tooltip]{position:relative}[data-tooltip][data-placement=top]:after{top:inherit;bottom:100%}[data-tooltip]:after{position:absolute;visibility:hidden;content:attr(data-tooltip);display:inline-table;top:110%;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:200px;padding:8px;background:#616161;color:#fff;text-align:center;z-index:2;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);border-radius:2px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:400;font-size:12px;opacity:0;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1)}@media only screen and (max-width:767px){[data-tooltip]:after{height:32px;padding:4px 16px;font-size:14px}}[data-tooltip]:hover{position:relative}[data-tooltip]:hover:after{visibility:visible;opacity:1;transform:scale(1)}[data-tooltip][data-delay]:after{transition-delay:0s}[data-tooltip][data-delay]:hover:after{transition-delay:1s}.can-redo [data-command='"redo"']{opacity:1!important}.can-undo [data-command='"undo"']{opacity:1!important}.ML__keyboard{--keyboard-background:rgba(209,213,217,0.95);--keyboard-text:#000;--keyboard-text-active:var(--primary);--keyboard-background-border:#ddd;--keycap-background:#fff;--keycap-background-active:#e5e5e5;--keycap-background-border:#e5e6e9;--keycap-background-border-bottom:#8d8f92;--keycap-text:#000;--keycap-text-active:#fff;--keycap-secondary-text:#000;--keycap-modifier-background:#b9bdc7;--keycap-modifier-border:#c5c9d0;--keycap-modifier-border-bottom:#989da6;--keyboard-alternate-background:#fff;--keyboard-alternate-background-active:#e5e5e5;--keyboard-alternate-text:#000;position:fixed;left:0;bottom:-267px;width:100vw;z-index:105;padding-top:5px;transform:translate(0);opacity:0;visibility:hidden;transition:.28s cubic-bezier(0,0,.2,1);transition-property:transform,opacity;-webkit-backdrop-filter:grayscale(50%);backdrop-filter:grayscale(50%);background-color:var(--keyboard-background);border:1px solid var(--keyboard-background-border);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:16px;font-weight:400;margin:0;text-shadow:none;box-sizing:border-box;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.ML__keyboard.is-visible{transform:translateY(-267px);opacity:1;visibility:visible;transition-timing-function:cubic-bezier(.4,0,1,1)}.ML__keyboard .tex{font-family:KaTeX_Main,Cambria Math,Asana Math,OpenSymbol,Symbola,STIX,Times,serif!important}.ML__keyboard .tex-math{font-family:KaTeX_Math,Cambria Math,Asana Math,OpenSymbol,Symbola,STIX,Times,serif!important}.ML__keyboard .tt{font-family:Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace!important;font-size:30px;font-weight:400}.ML__keyboard.alternate-keys{visibility:hidden;max-width:286px;background-color:var(--keyboard-alternate-background);text-align:center;border-radius:6px;position:fixed;bottom:auto;top:0;box-sizing:content-box;transform:none;z-index:106;display:flex;flex-direction:row;justify-content:center;align-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:none}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys{max-width:320px}}.ML__keyboard.alternate-keys.is-visible{visibility:visible}.ML__keyboard.alternate-keys ul{list-style:none;margin:3px;padding:0;display:flex;flex-flow:row wrap-reverse;justify-content:center}.ML__keyboard.alternate-keys ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;font-size:30px;height:70px;width:70px;box-sizing:border-box;margin:0;background:transparent;border:1px solid transparent;border-radius:5px;pointer-events:all;color:var(--keyboard-alternate-text);fill:currentColor}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.active,.ML__keyboard.alternate-keys ul>li.pressed,.ML__keyboard.alternate-keys ul>li:hover{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background:var(--keyboard-alternate-background-active);color:var(--keyboard-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:18px}.ML__keyboard.alternate-keys ul>li.small-button{width:42px;height:42px;margin:2px;background:#fbfbfb}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{min-height:60px;min-width:60px;background:#cd0030;color:#fff;padding:5px;display:flex;align-items:center;justify-content:center;border-radius:5px}.ML__keyboard.alternate-keys ul>li .warning.active,.ML__keyboard.alternate-keys ul>li .warning.pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg{width:50px;height:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:12px;line-height:12px;opacity:.78}.ML__keyboard>div.keyboard-layer{display:none;outline:none}.ML__keyboard>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard>div>div.keyboard-toolbar{width:556px}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar{width:365px;max-width:100vw}}.ML__keyboard>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard>div>div.keyboard-toolbar>.left{justify-content:flex-start;display:flex;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>.right{justify-content:flex-end;display:flex;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>div>div{display:flex;align-items:baseline;justify-content:center;pointer-events:all;color:var(--keyboard-text);fill:currentColor;background:0;font-size:110%;cursor:pointer;min-height:0;padding:4px 10px;margin:7px 4px 6px;box-shadow:none;border:none;border-bottom:2px solid transparent}.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled.pressed svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled:hover svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar>div>div{padding-left:4px;padding-right:4px;font-size:90%}}.ML__keyboard>div>div.keyboard-toolbar>div>div.active,.ML__keyboard>div>div.keyboard-toolbar>div>div.pressed,.ML__keyboard>div>div.keyboard-toolbar>div>div:active,.ML__keyboard>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard>div>div.keyboard-toolbar>div>div.selected{color:var(--keyboard-text-active);border-bottom:2px solid var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard div .rows{border:0;border-collapse:separate;clear:both;margin:auto;display:flex;flex-flow:column;align-items:center}.ML__keyboard div .rows>ul{list-style:none;height:40px;margin:0 0 3px;padding:0}.ML__keyboard div .rows>ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;width:34px;margin-right:2px;height:40px;box-sizing:border-box;padding:8px 0;vertical-align:top;text-align:center;float:left;color:var(--keycap-text);fill:currentColor;font-size:20px;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;pointer-events:all;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ML__keyboard div .rows>ul>li:last-child{margin-right:0}.ML__keyboard div .rows>ul>li.small{font-size:16px}.ML__keyboard div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard div .rows>ul>li svg{width:20px;height:20px}.ML__keyboard div .rows>ul>li .warning{height:25px;width:25px;min-height:25px;min-width:25px;background:#cd0030;color:#fff;border-radius:100%;padding:5px;display:flex;align-items:center;justify-content:center;margin-bottom:-2px}.ML__keyboard div .rows>ul>li .warning svg{width:16px;height:16px}@media only screen and (max-width:768px){.ML__keyboard div .rows>ul>li .warning{height:16px;width:16px;min-height:16px;min-width:16px}.ML__keyboard div .rows>ul>li .warning svg{width:14px;height:14px}}.ML__keyboard div .rows>ul>li>.w0{width:0}.ML__keyboard div .rows>ul>li>.w5{width:16px}.ML__keyboard div .rows>ul>li>.w15{width:52px}.ML__keyboard div .rows>ul>li>.w20{width:70px}.ML__keyboard div .rows>ul>li>.w50{width:178px}.ML__keyboard div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard div .rows>ul>li.if-wide{display:none}}.ML__keyboard div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard div .rows>ul>li.pressed,.ML__keyboard div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.active,.ML__keyboard div .rows>ul>li.action:active,.ML__keyboard div .rows>ul>li.keycap.active,.ML__keyboard div .rows>ul>li.keycap:active{transform:translateY(-20px) scale(1.4);z-index:100;color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.modifier.active,.ML__keyboard div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton,.ML__keyboard div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:14px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:9px}}.ML__keyboard div .rows>ul>li.action,.ML__keyboard div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-bottom-color:var(--keycap-modifier-border);border-color:var(--keycap-modifier-border) var(--keycap-modifier-border) var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard div .rows>ul>li.action.selected,.ML__keyboard div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.selected.active,.ML__keyboard div .rows>ul>li.action.selected.pressed,.ML__keyboard div .rows>ul>li.action.selected:active,.ML__keyboard div .rows>ul>li.action.selected:hover,.ML__keyboard div .rows>ul>li.modifier.selected.active,.ML__keyboard div .rows>ul>li.modifier.selected.pressed,.ML__keyboard div .rows>ul>li.modifier.selected:active,.ML__keyboard div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard div .rows>ul>li.keycap.w50{font-size:80%;padding-top:10px;font-weight:100}.ML__keyboard div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li small{font-size:9px}}.ML__keyboard div .rows>ul>li aside{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px;color:#666}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard div .rows>ul>li{width:29px;margin-right:2px}.ML__keyboard div .rows>ul>.w5{width:13.5px}.ML__keyboard div .rows>ul>.w15{width:44.5px}.ML__keyboard div .rows>ul>.w20{width:60px}.ML__keyboard div .rows>ul>.w50{width:153px}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard div .rows>ul>li{width:37px;margin-right:3px}.ML__keyboard div .rows>ul>.w5{width:17px}.ML__keyboard div .rows>ul>.w15{width:57px}.ML__keyboard div .rows>ul>.w20{width:77px}.ML__keyboard div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:51px;margin-right:4px}.ML__keyboard div .rows>ul>.w5{width:23.5px}.ML__keyboard div .rows>ul>.w15{width:78.5px}.ML__keyboard div .rows>ul>.w20{width:106px}.ML__keyboard div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:66px;margin-right:6px}.ML__keyboard div .rows>ul>.action,.ML__keyboard div .rows>ul>.modifier{font-size:80%}.ML__keyboard div .rows>ul>.w5{width:30px}.ML__keyboard div .rows>ul>.w15{width:102px}.ML__keyboard div .rows>ul>.w20{width:138px}.ML__keyboard div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,0.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.active,div.ML__keyboard.material.alternate-keys ul li.pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{border:1px solid transparent;background:#5f97fc;color:#fff;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .keyboard-toolbar div.div.active,div.ML__keyboard.material .keyboard-toolbar div.div.pressed,div.ML__keyboard.material .keyboard-toolbar div div:active,div.ML__keyboard.material .keyboard-toolbar div div:hover{color:#5f97fc;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>.selected{color:#5f97fc;fill:currentColor;border-bottom:2px solid #5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material div>.rows>ul>.keycap{background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);fill:currentColor;transition:none}div.ML__keyboard.material div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]{margin-top:10px;margin-bottom:10px;height:20px;background:#e0e0e0}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].pressed,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):hover{border:1px solid transparent;background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);color:var(--keyboard-alternate-text);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;vertical-align:top;width:19.5px;margin-right:10px;margin-left:10px;transform:translateY(-20px) scale(2);transition:none;justify-content:flex-start;padding:2px 0 0;z-index:100}}@media only screen and (max-width:414px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:last-child.active,div.ML__keyboard.material div>.rows>ul>.keycap:last-child:active{margin-right:0;margin-left:14px}}div.ML__keyboard.material div div.rows ul li.action,div.ML__keyboard.material div div.rows ul li.modifier{background:transparent;border:0;color:#869096;fill:currentColor;font-size:16px;transition:none}div.ML__keyboard.material div div.rows ul li.action.selected,div.ML__keyboard.material div div.rows ul li.modifier.selected{color:#5f97fc;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.action.active,div.ML__keyboard.material div div.rows ul li.action.pressed,div.ML__keyboard.material div div.rows ul li.action:active,div.ML__keyboard.material div div.rows ul li.action:hover,div.ML__keyboard.material div div.rows ul li.modifier.active,div.ML__keyboard.material div div.rows ul li.modifier.pressed,div.ML__keyboard.material div div.rows ul li.modifier:active,div.ML__keyboard.material div div.rows ul li.modifier:hover{border:0;color:var(--keycap-text);background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div div.rows ul li.bigfnbutton,div.ML__keyboard.material div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material div div.rows ul li.fnbutton.selected{color:#5f97fc;fill:currentColor;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.bigfnbutton.active,div.ML__keyboard.material div div.rows ul li.bigfnbutton.pressed,div.ML__keyboard.material div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material div div.rows ul li.fnbutton.active,div.ML__keyboard.material div div.rows ul li.fnbutton.pressed,div.ML__keyboard.material div div.rows ul li.fnbutton:active,div.ML__keyboard.material div div.rows ul li.fnbutton:hover{border:0;color:#5f97fc;fill:currentColor;background:var(--keycap-background-active);box-shadow:none}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__suggestion{opacity:.5}.ML__placeholder{opacity:.7;padding-left:.5ex;padding-right:.5ex}.ML__keystroke-caption>span{min-width:14px;margin:0 8px 0 0;padding:4px;background-color:var(--keystroke);color:var(--on-keystroke);fill:currentColor;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;border-radius:6px;border:2px solid var(--keystroke-border)}.ML__virtual-keyboard-toggle.pressed{background:hsla(0,0%,70%,.5)}.ML__virtual-keyboard-toggle:focus{outline:none;border-radius:50%;border:2px solid var(--primary)}.ML__virtual-keyboard-toggle.active,.ML__virtual-keyboard-toggle.active:hover{background:hsla(0,0%,70%,.5);color:#000;fill:currentColor}div.ML__popover.is-visible{visibility:visible;-webkit-animation:ML__fade-in .15s cubic-bezier(0,0,.2,1);animation:ML__fade-in .15s cubic-bezier(0,0,.2,1)}@-webkit-keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}@keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}.ML__popover__content{border-radius:6px;padding:2px;cursor:pointer;min-height:100px;display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:8px}.ML__popover__content a{color:#5ea6fd;padding-top:.3em;margin-top:.4em;display:block}.ML__popover__content a:hover{color:#5ea6fd;text-decoration:underline}.ML__popover__content.active,.ML__popover__content.pressed,.ML__popover__content:hover{background:hsla(0,0%,100%,.1)}.ML__popover__command{font-size:1.6rem}.ML__popover__prev-shortcut{height:31px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:4px;padding-bottom:2px}.ML__popover__next-shortcut:hover,.ML__popover__prev-shortcut:hover{opacity:.3}.ML__popover__next-shortcut.active,.ML__popover__next-shortcut.pressed,.ML__popover__prev-shortcut.active,.ML__popover__prev-shortcut.pressed{opacity:1}.ML__popover__next-shortcut>span,.ML__popover__prev-shortcut>span{padding:5px;border-radius:50%;width:20px;height:20px;display:inline-block}.ML__popover__prev-shortcut>span>span{margin-top:-2px;display:block}.ML__popover__next-shortcut>span>span{margin-top:2px;display:block}.ML__popover__next-shortcut:hover>span,.ML__popover__prev-shortcut:hover>span{background:hsla(0,0%,100%,.1)}.ML__popover__next-shortcut{height:34px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:2px;padding-bottom:4px}.ML__popover__shortcut{font-size:.8em;margin-top:.25em}.ML__popover__note,.ML__popover__shortcut{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:.7;padding-top:.25em}.ML__popover__note{font-size:.8rem;line-height:1em;padding-left:.5em;padding-right:.5em}.ML__shortcut-join{opacity:.5}.ML__scroller{position:fixed;z-index:1;top:0;height:100vh;width:200px}
47,456
Common Lisp
.l
1
47,456
47,456
0.78026
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
94b8881252da61fa18bdfef24f4b200d9badbe0b9a125fd0fef54ba92e988b77
38,313
[ -1 ]
38,314
visual-diff.js
mohe2015_schule/static/visual-diff.js
/* Copyright (c) 2012 The Network Inc. and contributors https://github.com/tnwinc/htmldiff.js licensed under the MIT License https://github.com/tnwinc/htmldiff.js/blob/master/LICENSE */ var Match, calculate_operations, consecutive_where, create_index, diff, find_match, find_matching_blocks, html_to_tokens, is_end_of_tag, is_start_of_tag, is_tag, is_whitespace, isnt_tag, op_map, recursively_find_matching_blocks, render_operations, wrap; is_end_of_tag = function(char) { return char === '>'; }; is_start_of_tag = function(char) { return char === '<'; }; is_whitespace = function(char) { return /^\s+$/.test(char); }; is_tag = function(token) { return /^\s*<[^>]+>\s*$/.test(token); }; isnt_tag = function(token) { return !is_tag(token); }; Match = (function() { function Match(start_in_before1, start_in_after1, length1) { this.start_in_before = start_in_before1; this.start_in_after = start_in_after1; this.length = length1; this.end_in_before = (this.start_in_before + this.length) - 1; this.end_in_after = (this.start_in_after + this.length) - 1; } return Match; })(); html_to_tokens = function(html) { var char, current_word, i, len, mode, words; mode = 'char'; current_word = ''; words = []; for (i = 0, len = html.length; i < len; i++) { char = html[i]; switch (mode) { case 'tag': if (is_end_of_tag(char)) { current_word += '>'; words.push(current_word); current_word = ''; if (is_whitespace(char)) { mode = 'whitespace'; } else { mode = 'char'; } } else { current_word += char; } break; case 'char': if (is_start_of_tag(char)) { if (current_word) { words.push(current_word); } current_word = '<'; mode = 'tag'; } else if (/\s/.test(char)) { if (current_word) { words.push(current_word); } current_word = char; mode = 'whitespace'; } else if (/[\w\#@]+/i.test(char)) { current_word += char; } else { if (current_word) { words.push(current_word); } current_word = char; } break; case 'whitespace': if (is_start_of_tag(char)) { if (current_word) { words.push(current_word); } current_word = '<'; mode = 'tag'; } else if (is_whitespace(char)) { current_word += char; } else { if (current_word) { words.push(current_word); } current_word = char; mode = 'char'; } break; default: throw new Error("Unknown mode " + mode); } } if (current_word) { words.push(current_word); } return words; }; find_match = function(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, start_in_before, end_in_before, start_in_after, end_in_after) { var best_match_in_after, best_match_in_before, best_match_length, i, index_in_after, index_in_before, j, len, locations_in_after, looking_for, match, match_length_at, new_match_length, new_match_length_at, ref, ref1; best_match_in_before = start_in_before; best_match_in_after = start_in_after; best_match_length = 0; match_length_at = {}; for (index_in_before = i = ref = start_in_before, ref1 = end_in_before; ref <= ref1 ? i < ref1 : i > ref1; index_in_before = ref <= ref1 ? ++i : --i) { new_match_length_at = {}; looking_for = before_tokens[index_in_before]; locations_in_after = index_of_before_locations_in_after_tokens[looking_for]; for (j = 0, len = locations_in_after.length; j < len; j++) { index_in_after = locations_in_after[j]; if (index_in_after < start_in_after) { continue; } if (index_in_after >= end_in_after) { break; } if (match_length_at[index_in_after - 1] == null) { match_length_at[index_in_after - 1] = 0; } new_match_length = match_length_at[index_in_after - 1] + 1; new_match_length_at[index_in_after] = new_match_length; if (new_match_length > best_match_length) { best_match_in_before = index_in_before - new_match_length + 1; best_match_in_after = index_in_after - new_match_length + 1; best_match_length = new_match_length; } } match_length_at = new_match_length_at; } if (best_match_length !== 0) { match = new Match(best_match_in_before, best_match_in_after, best_match_length); } return match; }; recursively_find_matching_blocks = function(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, start_in_before, end_in_before, start_in_after, end_in_after, matching_blocks) { var match; match = find_match(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, start_in_before, end_in_before, start_in_after, end_in_after); if (match != null) { if (start_in_before < match.start_in_before && start_in_after < match.start_in_after) { recursively_find_matching_blocks(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, start_in_before, match.start_in_before, start_in_after, match.start_in_after, matching_blocks); } matching_blocks.push(match); if (match.end_in_before <= end_in_before && match.end_in_after <= end_in_after) { recursively_find_matching_blocks(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, match.end_in_before + 1, end_in_before, match.end_in_after + 1, end_in_after, matching_blocks); } } return matching_blocks; }; create_index = function(p) { var i, idx, index, len, ref, token; if (p.find_these == null) { throw new Error('params must have find_these key'); } if (p.in_these == null) { throw new Error('params must have in_these key'); } index = {}; ref = p.find_these; for (i = 0, len = ref.length; i < len; i++) { token = ref[i]; index[token] = []; idx = p.in_these.indexOf(token); while (idx !== -1) { index[token].push(idx); idx = p.in_these.indexOf(token, idx + 1); } } return index; }; find_matching_blocks = function(before_tokens, after_tokens) { var index_of_before_locations_in_after_tokens, matching_blocks; matching_blocks = []; index_of_before_locations_in_after_tokens = create_index({ find_these: before_tokens, in_these: after_tokens }); return recursively_find_matching_blocks(before_tokens, after_tokens, index_of_before_locations_in_after_tokens, 0, before_tokens.length, 0, after_tokens.length, matching_blocks); }; calculate_operations = function(before_tokens, after_tokens) { var action_map, action_up_to_match_positions, i, index, is_single_whitespace, j, last_op, len, len1, match, match_starts_at_current_position_in_after, match_starts_at_current_position_in_before, matches, op, operations, position_in_after, position_in_before, post_processed; if (before_tokens == null) { throw new Error('before_tokens?'); } if (after_tokens == null) { throw new Error('after_tokens?'); } position_in_before = position_in_after = 0; operations = []; action_map = { 'false,false': 'replace', 'true,false': 'insert', 'false,true': 'delete', 'true,true': 'none' }; matches = find_matching_blocks(before_tokens, after_tokens); matches.push(new Match(before_tokens.length, after_tokens.length, 0)); for (index = i = 0, len = matches.length; i < len; index = ++i) { match = matches[index]; match_starts_at_current_position_in_before = position_in_before === match.start_in_before; match_starts_at_current_position_in_after = position_in_after === match.start_in_after; action_up_to_match_positions = action_map[[match_starts_at_current_position_in_before, match_starts_at_current_position_in_after].toString()]; if (action_up_to_match_positions !== 'none') { operations.push({ action: action_up_to_match_positions, start_in_before: position_in_before, end_in_before: (action_up_to_match_positions !== 'insert' ? match.start_in_before - 1 : void 0), start_in_after: position_in_after, end_in_after: (action_up_to_match_positions !== 'delete' ? match.start_in_after - 1 : void 0) }); } if (match.length !== 0) { operations.push({ action: 'equal', start_in_before: match.start_in_before, end_in_before: match.end_in_before, start_in_after: match.start_in_after, end_in_after: match.end_in_after }); } position_in_before = match.end_in_before + 1; position_in_after = match.end_in_after + 1; } post_processed = []; last_op = { action: 'none' }; is_single_whitespace = function(op) { if (op.action !== 'equal') { return false; } if (op.end_in_before - op.start_in_before !== 0) { return false; } return /^\s$/.test(before_tokens.slice(op.start_in_before, +op.end_in_before + 1 || 9e9)); }; for (j = 0, len1 = operations.length; j < len1; j++) { op = operations[j]; if (((is_single_whitespace(op)) && last_op.action === 'replace') || (op.action === 'replace' && last_op.action === 'replace')) { last_op.end_in_before = op.end_in_before; last_op.end_in_after = op.end_in_after; } else { post_processed.push(op); last_op = op; } } return post_processed; }; consecutive_where = function(start, content, predicate) { var answer, i, index, last_matching_index, len, token; content = content.slice(start, +content.length + 1 || 9e9); last_matching_index = void 0; for (index = i = 0, len = content.length; i < len; index = ++i) { token = content[index]; answer = predicate(token); if (answer === true) { last_matching_index = index; } if (answer === false) { break; } } if (last_matching_index != null) { return content.slice(0, +last_matching_index + 1 || 9e9); } return []; }; wrap = function(tag, content) { var length, non_tags, position, rendering, tags; rendering = ''; position = 0; length = content.length; while (true) { if (position >= length) { break; } non_tags = consecutive_where(position, content, isnt_tag); position += non_tags.length; if (non_tags.length !== 0) { rendering += "<" + tag + ">" + (non_tags.join('')) + "</" + tag + ">"; } if (position >= length) { break; } tags = consecutive_where(position, content, is_tag); position += tags.length; rendering += tags.join(''); } return rendering; }; op_map = { equal: function(op, before_tokens, after_tokens) { return before_tokens.slice(op.start_in_before, +op.end_in_before + 1 || 9e9).join(''); }, insert: function(op, before_tokens, after_tokens) { var val; val = after_tokens.slice(op.start_in_after, +op.end_in_after + 1 || 9e9); return wrap('ins', val); }, "delete": function(op, before_tokens, after_tokens) { var val; val = before_tokens.slice(op.start_in_before, +op.end_in_before + 1 || 9e9); return wrap('del', val); } }; op_map.replace = function(op, before_tokens, after_tokens) { return (op_map["delete"](op, before_tokens, after_tokens)) + (op_map.insert(op, before_tokens, after_tokens)); }; render_operations = function(before_tokens, after_tokens, operations) { var i, len, op, rendering; rendering = ''; for (i = 0, len = operations.length; i < len; i++) { op = operations[i]; rendering += op_map[op.action](op, before_tokens, after_tokens); } return rendering; }; diff = function(before, after) { var ops; if (before === after) { return before; } before = html_to_tokens(before); after = html_to_tokens(after); ops = calculate_operations(before, after); return render_operations(before, after, ops); }; diff.html_to_tokens = html_to_tokens; diff.find_matching_blocks = find_matching_blocks; find_matching_blocks.find_match = find_match; find_matching_blocks.create_index = create_index; diff.calculate_operations = calculate_operations; diff.render_operations = render_operations; if (typeof define === 'function') { define([], function() { return diff; }); } else if (typeof module !== "undefined" && module !== null) { module.exports = diff; } else { this.htmldiff = diff; } // --- // generated by coffee-script 1.9.2
12,499
Common Lisp
.l
343
31.349854
276
0.628906
mohe2015/schule
0
0
0
AGPL-3.0
9/19/2024, 11:44:33 AM (Europe/Amsterdam)
88090d21dcddbd38822ca9d8301d1a85920a5aaf0d5003de3e5c48e1ebc7d811
38,314
[ -1 ]
38,329
healed-lisp.lisp
komputikisto_HEALED-LISP/healed-lisp.lisp
(load "~/quicklisp/setup.lisp") (ql:quickload "optima") (ql:quickload "cl-ansi-text") (ql:quickload "alexandria") (use-package :optima) (use-package :cl-ansi-text) (defparameter *trace-time-flag* t) (setq trace-flag 'on) (defun signed-numeric-string-p (str) (cond ((string= str "") nil) ((or (string= (subseq str 0 1) "+") (string= (subseq str 0 1) "-")) (numeric-string-p (subseq str 1))) ((find (elt str 0) "0123456789") (numeric-string-p str)))) (defun numeric-string-p (str) (and (>= (length str) 1) (map-and (lambda (i) (find i "0123456789")) (coerce str 'list)))) (defun delimiter-p (chr) (or (char= #\( chr) (char= #\) chr) (char= #\Space chr) (char= #\' chr) (char= #\` chr) (char= #\, chr) (char= #\" chr) (char= #\Newline chr) (char= #\; chr))) (defun read-atom (str) (cond ((string= str "") "") ((delimiter-p (elt str 0)) "") (t (concatenate 'string (subseq str 0 1) (read-atom (subseq str 1)))))) (defun after-atom (str) (cond ((string= str "") "") ((delimiter-p (elt str 0)) str) (t (after-atom (subseq str 1))))) (defun up-to-newline (str) (cond ((string= str "") "") ((equal (elt str 0) #\Newline) (subseq str 1)) (t (up-to-newline (subseq str 1))))) (defun read-string (str acc success failure) (cond ((string= str "") (funcall failure "Unbalanced double quote")) ((char= #\" (elt str 0)) (funcall success acc (subseq str 1))) (t (read-string (subseq str 1) (concatenate 'string acc (subseq str 0 1)) success failure)))) (defun prefix-p (str1 str2) (cond ((string= str1 "") t) ((string= str2 "") nil) ((char= (elt str1 0) (elt str2 0)) (prefix-p (subseq str1 1) (subseq str2 1))) (t nil))) (defun read-sexpr (str success failure) (cond ((string= str "") (funcall failure "Expression missing")) ((char= #\Space (elt str 0)) (read-sexpr (subseq str 1) success failure)) ((char= #\Newline (elt str 0)) (read-sexpr (subseq str 1) success failure)) ((char= #\) (elt str 0)) (funcall failure "Unbalanced right parenthesis")) ((char= #\( (elt str 0)) (read-tail (subseq str 1) nil success failure)) ((char= #\' (elt str 0)) (read-sexpr (subseq str 1) (lambda (res rest) (funcall success (list 'quote res) rest)) failure)) ((char= #\` (elt str 0)) (read-sexpr (subseq str 1) (lambda (res rest) (funcall success (list 'quasiquote res) rest)) failure)) ((prefix-p ",@" str) (read-sexpr (subseq str 2) (lambda (res rest) (funcall success (list 'unquote-splicing res) rest)) failure)) ((char= #\, (elt str 0)) (read-sexpr (subseq str 1) (lambda (res rest) (funcall success (list 'unquote res) rest)) failure)) ((char= #\; (elt str 0)) (read-sexpr (up-to-newline str) success failure)) ((char= #\" (elt str 0)) (read-string (subseq str 1) "" success failure)) (t (let ((atm (read-atom str))) (if (signed-numeric-string-p atm) (funcall success (parse-integer atm) (after-atom str)) (funcall success (nil-patch atm) (after-atom str))))))) (defparameter nil-atom (gensym)) (defun nil-patch (atm) (let ((upcase-atm (string-upcase atm))) (if (string= upcase-atm "NIL") nil-atom (intern upcase-atm)))) (defun read-tail (str acc success failure) (cond ((string= str "") (funcall failure "Unbalanced left parenthesis")) ((char= #\) (elt str 0)) (funcall success (reverse acc) (subseq str 1))) ((char= #\Space (elt str 0)) (read-tail (subseq str 1) acc success failure)) (t (read-sexpr str (lambda (res rest) (read-tail rest (cons res acc) success failure)) failure)))) (defun read-bare-list (str acc success failure) (cond ((string= str "") (funcall success (reverse acc) "")) ((char= #\Space (elt str 0)) (read-bare-list (subseq str 1) acc success failure)) ((char= #\Newline (elt str 0)) (read-bare-list (subseq str 1) acc success failure)) ((char= #\; (elt str 0)) (read-bare-list (up-to-newline str) acc success failure)) (t (read-sexpr str (lambda (res rest) (read-bare-list rest (cons res acc) success failure)) failure)))) (defun verify-end-of-expr (str) (cond ((string= str "") t) ((char= #\Space (elt str 0)) (verify-end-of-expr (subseq str 1))) ((char= #\Newline (elt str 0)) (verify-end-of-expr (subseq str 1))) ((char= #\; (elt str 0)) (verify-end-of-expr (up-to-newline str))) (t nil))) (defparameter *glob-env* nil) (defun map-and (fn lst) (cond ((null lst) t) ((not (funcall fn (car lst))) nil) (t (map-and fn (cdr lst))))) (defun map-or (fn lst) (cond ((null lst) nil) ((funcall fn (car lst)) t) (t (map-or fn (cdr lst))))) (defun lambda-list-p (lst) (and (listp lst) (map-and (lambda (i) (symbolp i)) lst))) (defun built-in-or-user-function-p (symb) (or (gethash symb builtins) (assoc symb *glob-env*))) ; quasiquote is in normal form if it does not contain unquote on a function (defun quasiquote-normal-form-p (tree) (match tree ((guard x (atom x)) t) ((list 'unquote (list 'lambda args body)) t) ((guard (list 'unquote x) (built-in-or-user-function-p x)) t) ((guard (list 'unquote (list '/ arg1 arg2)) (and (numberp arg1) (numberp arg2))) (= 1 (gcd arg1 arg2))) ((list 'unquote x) nil) ((list 'unquote-splicing x) nil) (otherwise (map-and #'quasiquote-normal-form-p tree)))) (defun normal-form-p (form) (match form ((guard x (or (numberp x) (stringp x))) t) ((guard x (built-in-or-user-function-p x)) t) ((guard (list 'quote x) (not (is-quote-unnecessary x))) t) ('true t) ('false t) ((guard (list 'lambda formals body) (lambda-list-p formals)) t) ((guard (list 'quasiquote x) (not (contains-unquote x))) nil) ((guard (list 'quasiquote x) (quasiquote-normal-form-p x)) t) ((list '/ arg1 1) nil) ((list '/ arg1 0) nil) ((guard (list '/ arg1 arg2) (and (numberp arg1) (numberp arg2) (= 1 (gcd arg1 arg2)) (> arg2 0))) t) (otherwise nil))) (defun data-p (form) (match form ((guard x (or (numberp x) (stringp x))) t) ((list 'quote x) t) ('true t) ('false t) (otherwise nil))) (defun is-quote-unnecessary (a) (or (numberp a) (stringp a) (eq a 'true) (eq a 'false))) (defun drop-quote-if-needed (a) (match a ((list 'quote x) x) ((guard x (is-quote-unnecessary x)) x))) (defun add-quote-if-needed (a) (if (is-quote-unnecessary a) a (list 'quote a))) (defun let-star-free (clauses body) (if (null clauses) (free body) (union (free (cadar clauses)) (set-difference (let-star-free (cdr clauses) body) (list (caar clauses)))))) (defun free (form) (match form ((guard x (symbolp x)) (list x)) ((list 'lambda formals body) (set-difference (free body) formals)) ((list 'let clauses body) (union (reduce #'union (mapcar (lambda (i) (free (second i))) clauses)) (set-difference (free body) (mapcar #'car clauses)))) ((list 'let* clauses body) (let-star-free clauses body)) ((list 'quote arg) nil) ((guard (list 'quasiquote arg) (consp arg)) (free-in-quasiquote arg)) ((list 'quasiquote arg) nil) ((guard x (listp x)) (reduce #'union (mapcar #'free form))))) (defun free-union (forms) (reduce #'union (mapcar #'free forms))) (defun free-in-quasiquote (forms) (reduce #'union (loop for i in forms collect (match i ((list 'unquote x) (free x)) ((list 'unquote-splicing x) (free x)) ((guard x (atom x)) nil) (otherwise (free-in-quasiquote i)))))) (defun alpha (form alist) (cond ((eq (car form) 'lambda) (list 'lambda (mapcar (lambda (i) (let ((it (assoc i alist))) (if it (cdr it) i))) (second form)) (mysubst alist (third form)))))) (defun formal-arguments-p (obj) (and (listp obj) (map-and (lambda (i) (and (symbolp i) (not (member i '(lambda quote let))))) obj))) (defun check-syntax-list (lst original-lst success failure) (cond ((null lst) (funcall success)) ((atom lst) (funcall failure original-lst)) (t (check-syntax (car lst) (lambda () (check-syntax-list (cdr lst) original-lst success failure)) failure)))) (defun check-cond-syntax (lst original-form success failure) (cond ((null lst) (funcall success)) ((atom lst) (funcall failure original-form)) ((not (listp (car lst))) (funcall failure original-form)) ((not (= (length (car lst)) 2)) (funcall failure original-form)) (t (check-syntax (caar lst) (lambda () (check-syntax (second (car lst)) (lambda () (check-cond-syntax (cdr lst) original-form success failure)) failure)) failure)))) (defun check-let-syntax (lst original-form success failure) (cond ((null lst) (check-syntax (third original-form) success failure)) ((atom lst) (funcall failure original-form)) ((not (listp (car lst))) (funcall failure original-form)) ((not (symbolp (caar lst))) (funcall failure original-form)) ((not (= (length (car lst)) 2)) (funcall failure original-form)) (t (check-syntax (second (car lst)) (lambda () (check-let-syntax (cdr lst) original-form success failure)) failure)))) (defun check-syntax (form success failure) (cond ((eq form 'lambda) (funcall failure form)) ((eq form 'quote) (funcall failure form)) ((atom form) (funcall success)) ((eq (car form) 'lambda) (if (and (= (length form) 3) (formal-arguments-p (second form))) (check-syntax (third form) success failure) (funcall failure form))) ((eq (car form) 'quote) (if (= (length form) 2) (funcall success) (funcall failure form))) ((eq (car form) 'cond) (check-cond-syntax (cdr form) form success failure)) ((eq (car form) 'quasiquote) (match form ((list 'quasiquote (list 'unquote x)) (funcall failure form)) ((list 'quasiquote (list 'unquote-splicing x)) (funcall failure form)) (otherwise (funcall success)))) ; рекурсия должна быть ((or (eq (car form) 'let) (eq (car form) 'let*)) (if (= (length form) 3) (check-let-syntax (second form) form success failure) (funcall failure form))) ((listp form) (check-syntax-list form form success failure)))) ; ------------- STRUCTURAL PREDICATES ---------------- (defun quoted-p (obj) (and (listp obj) (eq (car obj) 'quote))) (defun quoted-symbol-p (obj) (and (quoted-p obj) (symbolp (second obj)))) (defun quoted-list-p (obj) (and (quoted-p obj) (listp (second obj)))) (defun quasiquoted-list-p (obj) (and (listp obj) (eq (car obj) 'quasiquote) (listp (second obj)))) (defun fraction-p (obj) (and (listp obj) (eq (car obj) '/) (= (length obj) 3) (numberp (second obj)) (numberp (third obj)))) ; ------------- STRUCTURAL PREDICATES ---------------- ;------------------- END ----------------------------- (defstruct funcall-cont fun evaled unevaled) ;normalize (form k n) (defun normalize-list-of-forms (unevaled evaled k n) ; (format t "formas: ~a acc: ~a~%" forms acc) (cond ((null unevaled) (apply-function (reverse evaled) k n)) ((normal-form-p (car unevaled)) (normalize-list-of-forms (cdr unevaled) (cons (car unevaled) evaled) k n)) (t (normalize (car unevaled) (cons (make-funcall-cont :evaled evaled :unevaled (cdr unevaled)) k) n)))) (defstruct if-cont exp1 exp2) (defun normalize-if (expr k n) (match expr ((list 'if 'true arg2 arg3) (evaluate arg2 k n "SPECIAL OPERATOR: IF")) ((list 'if 'false arg2 arg3) (evaluate arg3 k n "SPECIAL OPERATOR: IF")) ((guard (list 'if arg1 arg2 arg3) (not (normal-form-p arg1))) (normalize arg1 (cons (make-if-cont :exp1 arg2 :exp2 arg3) k) n)) (otherwise (stop-computation k expr n)))) (defstruct cond-cont clauses value) (defun evaluate (expr k n rule) (if (normal-form-p expr) (apply-continuation k expr n rule) (progn (print-trace k expr n rule) (normalize expr k (1+ n))))) (defun normalize-cond (expr k n) (match expr ((list* 'cond (list 'true value) clauses) (evaluate value k n "SPECIAL OPERATOR: COND")) ((list* 'cond (list 'false value) clauses) (evaluate `(cond ,@clauses) k n "SPECIAL OPERATOR: COND")) ((guard (list* 'cond (list condition value) clauses) (not (normal-form-p condition))) (normalize condition (cons (make-cond-cont :value value :clauses clauses) k) n)) (otherwise (stop-computation k expr n)))) (defstruct let-cont evaled unevaled vars body) (defun normalize-let (unevaled evaled vars body k n) (cond ((null unevaled) (evaluate (beta-reduction body (loop for i in (reverse evaled) for j in vars collect (cons j i))) k n "SPECIAL OPERATOR: LET")) ((normal-form-p (car unevaled)) (normalize-let (cdr unevaled) (cons (car unevaled) evaled) vars body k n)) (t (normalize (car unevaled) (cons (make-let-cont :evaled evaled :unevaled (cdr unevaled) :vars vars :body body) k) n)))) (defun transform-let* (var val clauses expr) `(let* ,(loop for i in clauses collect (list (car i) (beta-reduction (second i) (list (cons var val))))) ,(beta-reduction expr (list (cons var val))))) (defstruct let-star-cont var clauses body) (defun normalize-let* (clauses expr k n) (cond ((null clauses) (evaluate expr k n "SPECIAL OPERATOR: LET*")) ((normal-form-p (second (car clauses))) (evaluate (transform-let* (caar clauses) (second (car clauses)) (cdr clauses) expr) k n "SPECIAL OPERATOR: LET*")) (t (normalize (second (car clauses)) (cons (make-let-star-cont :var (caar clauses) :clauses (cdr clauses) :body expr) k) n)))) ; -------------- CONS, CAR, CDR, LIST --------------- (defun move-elem-into-quasiquote (elem) (match elem ((list 'quote x) x) ((list 'quasiquote x) x) ((guard x (numberp x)) x) (otherwise `(unquote ,elem)))) (defun apply-list (exp k n) (apply-continuation k (if (map-and #'data-p (cdr exp)) `(quote ,(loop for i in (cdr exp) collect (drop-quote-if-needed i))) `(quasiquote ,(mapcar #'move-elem-into-quasiquote (cdr exp)))) n "FUNCTION: LIST")) (defun apply-cons (exp k n) (match exp ((list 'cons elem (list 'quasiquote lst)) (apply-continuation k `(quasiquote (,(move-elem-into-quasiquote elem) ,@lst)) n "FUNCTION: CONS")) ((list 'cons (list 'quote elem) (list 'quote lst)) (apply-continuation k `(quote (,elem ,@lst)) n "FUNCTION: CONS")) ((list 'cons (list 'quasiquote elem) (list 'quote lst)) (apply-continuation k `(quasiquote (,elem ,@lst))) n "FUNCTION: CONS") ((guard (list 'cons elem (list 'quote lst)) (data-p elem)) (apply-continuation k `(quote (,elem ,@lst)) n "FUNCTION: CONS")) ((list 'cons elem (list 'quote lst)) (apply-continuation k `(quasiquote ((unquote ,elem) ,@lst)) n "FUNCTION: CONS")) (otherwise (stop-computation k exp n)))) (defun apply-car (exp k n) (match exp ((list 'car (list 'quote (cons first rest))) (apply-continuation k (add-quote-if-needed first) n "FUNCTION: CAR")) ((list 'car (list 'quasiquote (cons (list 'unquote first) rest))) (apply-continuation k first n "FUNCTION: CAR")) ((list 'car (list 'quasiquote (cons first rest))) (apply-continuation k (add-quasiquote-if-needed first) n "FUNCTION: CAR")) (otherwise (stop-computation k exp n)))) (defun apply-cdr (exp k n) (match exp ((list 'cdr (list 'quote (cons first rest))) (apply-continuation k `(quote ,rest) n "FUNCTION: CDR")) ((list 'cdr (list 'quasiquote (cons first rest))) (apply-continuation k (add-quasiquote-if-needed rest) n "FUNCTION: CDR")) (otherwise (stop-computation k exp n)))) ; -------------- CONS, CAR, CDR, LIST --------------- ; --------------------- END ------------------------- ; ------------------- QUASIQUOTE -------------------- (defun contains-unquoted-not-in-normal-form (tree) (cond ((atom tree) nil) ((eq 'unquote (car tree)) (not (normal-form-p (second tree)))) ((eq 'unquote-splicing (car tree)) (not (normal-form-p (second tree)))) (t (map-or #'contains-unquoted-not-in-normal-form tree)))) (defun find-unquote (value rest) (match value ((guard x (atom x)) nil) ((guard (list 'unquote x) (not (normal-form-p x))) (values value rest)) ((list 'unquote x) 42) ((guard (list 'unquote-splicing x) (not (normal-form-p x))) (values value rest)) ((list 'unquote-splicing x) nil) (otherwise (find-unquote-in-list value nil rest)))) (defun find-unquote-in-list (lst acc rest) (cond ((null lst) nil) ((contains-unquoted-not-in-normal-form (car lst)) (find-unquote (car lst) (cons (list acc (cdr lst)) rest))) (t (find-unquote-in-list (cdr lst) (append acc (list (car lst))) rest)))) (defun form-unquote (res cont) (cond ((null cont) res) (t (form-unquote `(,@(first (car cont)) ,res ,@(second (car cont))) (cdr cont))))) (defun quasiqote-element-to-str (x) (match x ((list 'unquote z) (format nil ",~a" (to-str z))) ((list 'unquote-splicing z) (format nil ",@~a" (to-str z))) (otherwise (green (to-str x))))) (defun quasiquote-result-to-str (res context) (cond ((eq 'unquote context) (format nil ",~a" res)) ((eq 'unquote-splicing context) (format nil ",@~a" res)) (t (errro "bad argumet to quasiquote-result-to-str")))) (defun unquote-cont-to-str (res cont context) (cond ((null cont) (concatenate 'string (green "`") res)) (t (unquote-cont-to-str (concatenate 'string (green "(") (concatenate-with-right-space (mapcar #'quasiqote-element-to-str (first (car cont)))) (quasiquote-result-to-str res context) (concatenate-with-left-space (mapcar #'quasiqote-element-to-str (second (car cont)))) (green ")")) (cdr cont) context)))) (defun concatenate-with-right-space (lst) (if (null lst) "" (concatenate 'string (car lst) " " (concatenate-with-right-space (cdr lst))))) (defun concatenate-with-left-space (lst) (if (null lst) "" (concatenate 'string " " (car lst) (concatenate-with-left-space (cdr lst))))) (defun add-unquote-if-needed (elem unquote) (match elem ((list 'quote x) x) ((list 'quasiquote x) x) ((guard x (numberp x)) x) (otherwise `(,unquote ,elem)))) (defun contains (tree x) (cond ((null tree) nil) ((equal x tree) t) ((atom tree) nil) (t (map-or (lambda (i) (contains i x)) tree)))) (defun contains-bad-unquote-splicing (tree) (match tree ((guard x (atom x)) nil) ((guard (list 'unquote-splicing (list 'quote x)) (listp x)) nil) ((guard (list 'unquote-splicing (list 'quasiquote x)) (listp x)) nil) ((list 'unquote-splicing x) t) (otherwise (map-or #'contains-bad-unquote-splicing tree)))) (defun optimize-quasiquote-element (tree) (match tree ((guard x (atom x)) (list x)) ((guard (list 'unquote x) (numberp x)) (list x)) ((list 'unquote (list 'quote x)) (list x)) ((list 'unquote (list 'quasiquote x)) (list x)) ((list 'unquote x) (list tree)) ((list 'unquote-splicing (list 'quote x)) x) ((list 'unquote-splicing (list 'quote x)) x) ((list 'unquote-splicing (list 'quasiquote x)) x) ((list 'unquote-splicing x) (list tree)) (otherwise (list (loop for i in tree append (optimize-quasiquote-element i)))))) (defun optimize-quasiquote (tree) (add-quasiquote-if-needed (loop for i in tree append (optimize-quasiquote-element i)))) (defun contains-unquote (tree) (cond ((atom tree) nil) ((eq 'unquote (car tree)) t) ((eq 'unquote-splicing (car tree)) t) (t (map-or #'contains-unquote tree)))) (defun add-quasiquote-if-needed (tree) (cond ((numberp tree) tree) ((stringp tree) tree) ((contains-unquote tree) `(quasiquote ,tree)) (t `(quote ,tree)))) ; ------------------- QUASIQUOTE -------------------- ; ---------------------- END ------------------------ ;(list '* (list '/ a b) (list '/ c d)) ; ((list '* (list '/ a b) c) ; (apply-continuation k `(/ ,(* a c) ,b) n)) ; ((list '* c (list '/ a b)) ; (apply-continuation k `(/ ,(* a c) ,b) n)))) (defun reduce-fraction (a b) (let* ((g (gcd a b)) (denominator (/ b g)) (numerator (/ a g))) (cond ((= denominator 1) (/ a g)) ((< denominator 0) `(/ ,(- numerator) ,(- denominator))) (t `(/ ,numerator ,denominator))))) (defun numerator* (fraction) (match fraction ((list '/ a b) a) (otherwise (error "ill-formaed fraction")))) (defun denominator* (fraction) (match fraction ((list '/ a b) b) (otherwise (error "ill-formaed fraction")))) (defun apply-plus (exp k n) (match exp ((guard (list '+ a b) (and (numberp a) (numberp b))) (apply-continuation k (+ a b) n "FUNCTION: +")) ((guard (list '+ a (list '/ c d)) (numberp a)) (apply-continuation k (reduce-fraction (+ (* a d) c) d) n "FUNCTION: +")) ((guard (list '+ (list '/ a b) c) (numberp c)) (apply-continuation k (reduce-fraction (+ a (* b c)) b) n "FUNCTION: +")) ((list '+ (list '/ a b) (list '/ c d)) (apply-continuation k (reduce-fraction (+ (* a d) (* b c)) (* b d)) n "FUNCTION: +")) (otherwise (stop-computation k exp n)))) (defun apply-mul (exp k n) (match exp ((guard (list '* a b) (and (numberp a) (numberp b))) (apply-continuation k (* a b) n "FUNCTION: *")) ((guard (list '* a (list '/ c d)) (numberp a)) (apply-continuation k (reduce-fraction (* a c) d) n "FUNCTION: *")) ((guard (list '* (list '/ a b) c) (numberp c)) (apply-continuation k (reduce-fraction (* a c) b) n "FUNCTION: *")) ((list '* (list '/ a b) (list '/ c d)) (apply-continuation k (reduce-fraction (* a c) (* b d)) n "FUNCTION: *")) (otherwise (stop-computation k exp n)))) (defun apply-minus (exp k n) (match exp ((guard (list '- a b) (and (numberp a) (numberp b))) (apply-continuation k (- a b) n "FUNCTION: -")) ((guard (list '- a (list '/ c d)) (numberp a)) (apply-continuation k (reduce-fraction (- (* a d) c) d) n "FUNCTION: -")) ((guard (list '- (list '/ a b) c) (numberp c)) (apply-continuation k (reduce-fraction (- a (* b c)) b) n "FUNCTION: -")) ((list '- (list '/ a b) (list '/ c d)) (apply-continuation k (reduce-fraction (- (* a d) (* b c)) (* b d)) n "FUNCTION: -")) (otherwise (stop-computation k exp n)))) (defun apply-div (exp k n) (match exp ((list '/ a 0) (stop-computation k exp n)) ((list '/ a 1) (apply-continuation k a n "FUNCTION: /")) ((guard (list '/ a b) (and (numberp a) (numberp b))) (apply-continuation k (reduce-fraction a b) n "FUNCTION: /")) ((guard (list '/ a (list '/ c d)) (numberp a)) (apply-continuation k (reduce-fraction (* a d) c) n "FUNCTION: /")) ((guard (list '/ (list '/ a b) c) (numberp c)) (apply-continuation k (reduce-fraction a (* b c)) n "FUNCTION: /")) ((list '/ (list '/ a b) (list '/ c d)) (apply-continuation k (reduce-fraction (* a d) (* b c)) n "FUNCTION: /")) (otherwise (stop-computation k exp n)))) (defun apply-comparisons (f a b) (cond ((and (numberp a) (numberp b)) (convert-bool (funcall f a b))) ((and (fraction-p a) (fraction-p b)) (compare-fractions f a b)) ((and (fraction-p a) (numberp b)) (compare-fractions f a (list '/ b 1))) ((and (numberp a) (fraction-p b)) (compare-fractions f (list '/ a 1) b)))) ; compare fractions by cross-multiplying (defun compare-fractions (fn a b) (convert-bool (funcall fn (* (numerator* a) (denominator* b)) (* (denominator* a) (numerator* b))))) (defun apply-less-then (exp k n) (match exp ((list '< a b) (apply-continuation k (apply-comparisons #'< a b) n "FUNCTION: <")) (otherwise (stop-computation k exp n)))) (defun apply-greater-then (exp k n) (match exp ((list '> a b) (apply-continuation k (apply-comparisons #'> a b) n "FUNCTION: >")) (otherwise (stop-computation k exp n)))) (defun apply-less-then-or-equal (exp k n) (match exp ((list '<= a b) (apply-continuation k (apply-comparisons #'< a b) n "FUNCTION: <=")) (otherwise (stop-computation k exp n)))) (defun apply-greater-then-or-equal (exp k n) (match exp ((list '>= a b) (apply-continuation k (apply-comparisons #'> a b) n "FUNCTION: >=")) (otherwise (stop-computation k exp n)))) (defun apply-fraction-arithmetic (op a b c d) (cond ((eq '* op) (reduce-fraction (* a c) (* b d))) ((eq '+ op) (reduce-fraction (+ (* a d) (* b c)) (* b d))) ((eq '- op) (reduce-fraction (- (* a d) (* b c)) (* b d))) ((eq '/ op) (reduce-fraction (* a d) (* b c))))) ; ----------------- STRING OPERATIONS --------------------- ; ((guard (list 'string-append arg1 arg2) (and (stringp arg1) (stringp arg2))) ; (apply-continuation k (concatenate 'string arg1 arg2) n)) ; ((guard (list 'subseq str arg) ; (and (stringp str) (numberp arg) (< arg (length str)))) ; (apply-continuation k (subseq str arg) n)) ; ((guard (list 'subseq str arg1 arg2) ; (and (stringp str) (numberp arg1) (numberp arg2) (< arg2 (length str)) (> arg1 0))) ; (apply-continuation k (subseq str arg1 arg2) n)) (defun apply-lambda (body formals actuals k n) (evaluate (beta-reduction body (loop for i in formals for j in actuals collect (cons i j))) k n (format nil "FUNCTION: (LAMBDA ~a …)" formals))) (defun apply-numberp (exp k n) (match exp ((list 'numberp arg) (convert-bool (or (numberp arg) (fraction-p arg)) n "FUNCTION: NUMBERP")) (otherwise (stop-computation k exp n)))) (defun apply-symbolp (exp k n) (match exp ((list 'symbolp (list 'quote x)) 'true n "FUNCTION: SYMBOLP") ((list 'symbolp x) 'false n "FUNCTION: SYMBOLP") (otherwise (stop-computation k exp n)))) (defun apply-null (exp k n) (match exp ((guard (list 'null (list 'quote lst)) (listp lst)) (apply-continuation k (convert-bool (null lst)) n "FUNCTION: NULL")) ((guard (list 'null (list 'quasiquote lst)) (listp lst)) (apply-continuation k (convert-bool (null lst)) n "FUNCTION: NULL")) (otherwise (stop-computation k exp n)))) (defun apply-equality (exp k n) (match exp ((guard (list '= a b) (and (numberp a) (numberp b))) (apply-continuation k (convert-bool (= a b)) n "FUNCTION: =")) ((guard (list '= a b) (and (fraction-p a) (fraction-p b))) (apply-continuation k (convert-bool (equal a b)) n "FUNCTION: =")) ((list '= (list 'quote a) (list 'quote b)) (apply-continuation k (convert-bool (equal a b)) n "FUNCTION: =")) ((list '= 'true 'true) (apply-continuation k 'true n "FUNCTION: =")) ((list '= 'false 'false) (apply-continuation k 'true n "FUNCTION: =")) (t 'false))) (defparameter builtins (make-hash-table)) (setf (gethash '+ builtins) #'apply-plus) (setf (gethash '- builtins) #'apply-minus) (setf (gethash '* builtins) #'apply-mul) (setf (gethash '/ builtins) #'apply-div) (setf (gethash 'car builtins) #'apply-car) (setf (gethash 'cdr builtins) #'apply-cdr) (setf (gethash 'null builtins) #'apply-null) (setf (gethash 'cons builtins) #'apply-cons) (setf (gethash '<= builtins) #'apply-less-then-or-equal) (setf (gethash '>= builtins) #'apply-greater-then-or-equal) (setf (gethash '< builtins) #'apply-less-then) (setf (gethash '> builtins) #'apply-greater-then) (setf (gethash 'numberp builtins) #'apply-numberp) (setf (gethash 'symbolp builtins) #'apply-symbolp) (setf (gethash '= builtins) #'apply-equality) (setf (gethash 'list builtins) #'apply-list) (defun apply-function (exp k n) (match exp ((guard (cons f args) (and (symbolp f) (gethash f builtins))) (multiple-value-bind (fun is-there) (gethash f builtins) (if is-there (funcall fun exp k n) (stop-computation k exp n)))) ((guard (cons (list 'lambda formals body) actuals) (= (length formals) (length actuals))) (apply-lambda body formals actuals k n)) ((guard (cons f args) (assoc f *glob-env*)) (let ((funct (cdr (assoc f *glob-env*)))) (if (= (length (second funct)) (length args)) (evaluate (beta-reduction (third funct) (loop for i in (second funct) for j in args collect (cons i j))) k n (format nil "FUNCTION: ~a" f)) (stop-computation k exp n)))) (otherwise (stop-computation k exp n)))) (defun convert-bool (bool) (if bool 'TRUE 'FALSE)) (defun normalize (form k n) (match form ((guard x (normal-form-p x)) (apply-continuation k x n "NORMAL FORM (TO BE DELETED)")) ((guard (list 'quote arg) (is-quote-unnecessary arg)) (apply-continuation k arg n "SPECIAL OPERATOR: QUOTE")) ((list 'quasiquote arg) (multiple-value-bind (unq body) (find-unquote arg '()) ; (print unq) (terpri) (cond (unq (normalize (second unq) (cons (make-quasiquote-cont :subst unq :body body) k) n)) ((contains-bad-unquote-splicing arg) (stop-computation k form n)) (t (apply-continuation k (optimize-quasiquote arg) n "SPECIAL OPERATOR: QUASIQUOTE"))))) ((list* 'cond args) (normalize-cond form k n)) ((list* 'if args) (normalize-if form k n)) ((list 'let clauses body) (normalize-let (mapcar #'second clauses) '() (mapcar #'first clauses) body k n)) ((list 'let* clauses body) (normalize-let* clauses body k n)) ((cons fun args) (normalize-list-of-forms form nil k n)) (otherwise (stop-computation k form n)))) (defstruct quasiquote-cont subst body) ; исключить из окружения переменные лямбда-списка (defun exclude-variables (vars env) (cond ((null env) nil) ((member (caar env) vars) (exclude-variables vars (cdr env))) (t (cons (car env) (exclude-variables vars (cdr env)))))) (defun replace-in-list (lst env) (loop for i in lst collect (let ((tmp (assoc i env))) (if tmp (cdr tmp) i)))) (defun replace-in-clauses (clauses env) (loop for i in clauses collect (let ((tmp (assoc (car i) env))) (if tmp (list (cdr tmp) (second i)) i)))) (defun dangerous-substitutions (lambda-list env) (loop for i in env when (intersection lambda-list (free (cdr i))) collect i)) (defun reduce-lambda-with-alpha (formals body env) (let* ((dangerous-env (dangerous-substitutions formals env)) (vars-to-be-renamed (mapcar #'cdr dangerous-env)) (new-vars (loop for i in vars-to-be-renamed collect (gentemp))) (new-vars-env (pairlis vars-to-be-renamed new-vars)) (new-formals (replace-in-list formals new-vars-env))) (beta-reduction `(lambda ,new-formals ,(beta-reduction body new-vars-env)) env))) (defun reduce-let-and-let*-with-alpha (l clauses body env) (let* ((dangerous-env (dangerous-substitutions (mapcar #'car clauses) env)) (vars-to-be-renamed (mapcar #'cdr dangerous-env)) (new-vars (loop for i in vars-to-be-renamed collect (gentemp))) (new-vars-env (pairlis vars-to-be-renamed new-vars)) (new-clauses (replace-in-clauses clauses new-vars-env))) (beta-reduction (list l new-clauses (beta-reduction body new-vars-env)) env))) (defun member-let (var clauses) (cond ((null clauses) nil) ((eq (caar clauses) var) t) (t (member var (cdr clauses))))) #| (defun simple-beta-reduction-one-var (tree var subst) (match tree (nil nil) ((guard x (and (symbolp x) (eq x var))) subst) ((guard x (atom x)) x) ((list 'quote arg) tree) ((guard (list 'lambda formals body) (member var formals)) tree) ((guard (list 'lambda formals body) (member var (free subst))) .... ((guard (list (or 'let let*) clauses body) (member-let var clauses)) (list (car tree) (loop for i in clauses collect (list (car i) (simple-beta-reduction-one-var (second i) var subst))) body)) ((list (or 'let let*) clauses body) (list (car tree) (loop for i in clauses collect (list (car i) (simple-beta-reduction-one-var (second i) var subst))) (simple-beta-reduction-one-var body var subst))) ((list 'quasiquote x) (list 'quasiquote (substitute-in-quasiquote-simple-one-var var subst))) (otherwise (mapcar (lambda (i) (beta-reduction i env)) tree)))) (defun substitute-in-quasiquote-simple-one-var (tree var subst) (match tree ((guard x (atom x)) x) ((list 'unquote x) (list 'unquote (simple-beta-reduction-one-var var subst))) ((list 'unquote-splicing x) (list 'unquote-splicing (simple-beta-reduction-one-var var subst))) (otherwise (loop for i in tree collect (substitute-in-quasiquote-simple-one-var i var subst))))) |# (defun beta-reduction (tree env) (match tree (nil nil) ((guard x (and (symbolp x) (assoc x env))) (cdr (assoc x env))) ((guard x (atom x)) x) ((list 'quote arg) tree) ((guard (list 'lambda formals body) (dangerous-substitutions formals env)) (reduce-lambda-with-alpha formals body env)) ((list 'lambda formals body) (list 'lambda formals (beta-reduction body (exclude-variables formals env)))) ((guard (list l clauses body) (and (member l '(let let*)) (dangerous-substitutions (mapcar #'first clauses) env))) (reduce-let-and-let*-with-alpha l clauses body env)) ((guard (list l clauses body) (member l '(let let*))) (list l (loop for i in clauses collect (list (car i) (beta-reduction (second i) env))) (beta-reduction body (exclude-variables (mapcar #'car clauses) env)))) ((list 'quasiquote x) (list 'quasiquote (substitute-in-quasiquote x env))) (otherwise (mapcar (lambda (i) (beta-reduction i env)) tree)))) #| Изначально была идея оптимизировать quasiqote после подстановки прямо в функции подстановки, однако в дальнейшем решено было отказаться от этого. Процедура опитимизации предполагает возможность ошибки (т.е. она является полупредикатом из-за unquote-splicing), тогда как подстановка -- это обычная функция. Кроме того, непонятно на каком основании оптимизируются только quasiqote при подстановке, ведь можно представить подстановку с одновременным вычислением встроенных функций. Вообщем этих двух причин достаточно, чтобы не идти по пути опитимизации (удаления излишних unquote и unquote-splicing) во время подстановки.|# (defun substitute-in-quasiquote (tree env) (match tree ((guard x (atom x)) x) ((list 'unquote x) (list 'unquote (beta-reduction x env))) ((list 'unquote-splicing x) (list 'unquote-splicing (beta-reduction x env))) (otherwise (loop for i in tree collect (substitute-in-quasiquote i env))))) (defun stepper (expr) (if (normal-form-p expr) (format t "NORMAL FORM: ~a~%~%" (to-str expr)) (normalize expr nil 1))) (defun eval-repl-command (expr) (match expr ((guard (list 'defun name formals body) (and (symbolp name) (formal-arguments-p formals))) (push (cons name `(lambda ,formals ,body)) *glob-env*) (format t "FUNCTION ~a DEFINED~%" name) (repl)) ((list 'show 'rules) (format t "~a~%" *rules*) (repl)) ((list 'trace 'on) (setq trace-flag 'on) (repl)) ((list 'trace 'off) (setq trace-flag 'off) (repl)) ((list 'trace 'stack) (setq trace-flag 'stack) (repl)) ((list 'dir) (format t "BUILT-IN FUNCTIONS: ~a~%" (to-str (alexandria:hash-table-keys builtins))) (repl)) (otherwise (check-syntax expr (lambda () (if *trace-time-flag* (time (stepper expr)) (stepper expr)) (repl)) (lambda (form*) (format t "SYNTAX ERROR: ~a~%~%" form*) (repl)))))) (defun to-str (obj) (match obj ('lambda "λ") ((guard x (or (numberp x) (equal x 'true) (equal x 'false))) (green (format nil "~a" x))) ((list 'quote x) (green (format nil "'~a" (to-bland-str x)))) ((list 'quasiquote x) (format nil "~a~a" (green "`") (quasiquote-to-str x))) (nil "()") ((guard x (stringp x)) (green (format nil "\"~a\"" x))) ((guard x (consp x)) (format nil "(~a)" (tail-to-str x))) (otherwise (format nil "~a" obj)))) (defun to-str-reduced (obj) (match obj ((guard x (or (numberp x) (equal x 'true) (equal x 'false))) (red (format nil "~a" x))) ((list 'quote x) (red (format nil "'~a" (to-bland-str x)))) ((list 'quasiquote x) (format nil "~a~a" (red "`") (quasiquote-to-str x))) (nil (red "()")) ((guard x (consp x)) (format nil "~a~a~a" (red "(") (tail-to-str x) (red ")"))) ((guard x (eq nil-atom x)) (red "NIL")) (otherwise (red (format nil "~a" obj))))) (defun tail-to-str (lst) (cond ((null lst) "") ((null (cdr lst)) (format nil "~a" (to-str (car lst)))) (t (format nil "~a ~a" (to-str (car lst)) (tail-to-str (cdr lst)))))) (defun tail-to-str-with-left-space (lst) (if (null lst) "" (format nil " ~a~a" (to-str (car lst)) (tail-to-str-with-left-space (cdr lst))))) (defun tail-to-str-with-right-space (lst) (if (null lst) "" (format nil "~a ~a" (to-str (car lst)) (tail-to-str-with-right-space (cdr lst))))) (defun to-bland-str (obj) (cond ((consp obj) (format nil "(~a)" (tail-to-bland-str obj))) ((stringp obj) (format nil "\"~a\"" obj)) ((null obj) "()") ((eq nil-atom obj) "NIL") (t (format nil "~a" obj)))) (defun tail-to-bland-str (lst) (cond ((null lst) "") ((null (cdr lst)) (format nil "~a" (to-bland-str (car lst)))) (t (format nil "~a ~a" (to-bland-str (car lst)) (tail-to-bland-str (cdr lst)))))) (defun quasiquote-to-str (obj) (match obj ((list 'unquote x) (format nil ",~a" (to-str x))) ((list 'unquote-splicing x) (format nil ",@~a" (to-str x))) ((guard x (consp obj)) (format nil "~a~a~a" (green "(") (quasiquote-tail-to-str obj) (green ")"))) ((guard x (stringp obj)) (green (format nil "\"~a\"" obj))) (nil (green "()")) ((guard x (eq nil-atom obj)) (green "NIL")) (otherwise (green (format nil "~a" obj))))) (defun quasiquote-tail-to-str (lst) (cond ((null lst) "") ((null (cdr lst)) (format nil "~a" (quasiquote-to-str (car lst)))) (t (format nil "~a ~a" (quasiquote-to-str (car lst)) (quasiquote-tail-to-str (cdr lst)))))) (defun substitute-in-continuation (v k) (cond ((funcall-cont-p k) (format nil "(~a~a~a)" (tail-to-str-with-right-space (reverse (funcall-cont-evaled k))) v (tail-to-str-with-left-space (funcall-cont-unevaled k)))) ((let-cont-p k) (format nil "(LET (~{~a~^ ~}) ~a)" (loop for i in (mapcar #'to-str (let-cont-vars k)) for j in (append (mapcar #'to-str (reverse (let-cont-evaled k))) (list v) (mapcar #'to-str (let-cont-unevaled k))) collect (format nil "(~a ~a)" i j)) (to-str (let-cont-body k)))) ((if-cont-p k) (format nil "(IF ~a ~a ~a)" v (to-str (if-cont-exp1 k)) (to-str (if-cont-exp2 k)))) ((cond-cont-p k) (format nil "(COND (~a ~a)~a)" v (to-str (cond-cont-value k)) (tail-to-str-with-left-space (cond-cont-clauses k)))) ((let-star-cont-p k) (format nil "(LET* ((~a ~a)~a) ~a)" (let-star-cont-var k) v (tail-to-str-with-left-space (let-star-cont-clauses k)) (let-star-cont-body k))) ((quasiquote-cont-p k) (unquote-cont-to-str v (quasiquote-cont-body k) (first (quasiquote-cont-subst k)))) (t (error "unknown continuation")))) (defun compose-dump (v k) (cond ((null k) v) (t (compose-dump (substitute-in-continuation v (car k)) (cdr k))))) (defun print-trace (k res n rule) (case trace-flag (stack (format t "~a~%~{~a~^, ~}~%" (yellow (format nil "-----------STEP ~a, ~a" n rule)) (cons (to-str res) (loop for i in k collect (substitute-in-continuation "◯ " i))))) (on (format t "~a~%~a~%" (yellow (format nil "-----------STEP ~a, ~a" n rule)) (compose-dump (to-str-reduced res) k))))) (defun apply-continuation (k res n rule) (print-trace k res n rule) (cond ((null k) (format t "NORMAL FORM: ~a~%~%" (to-str res))) ((funcall-cont-p (car k)) (normalize-list-of-forms (funcall-cont-unevaled (car k)) (cons res (funcall-cont-evaled (car k))) (cdr k) (1+ n))) ((let-cont-p (car k)) (normalize-let (let-cont-unevaled (car k)) (cons res (let-cont-evaled (car k))) (let-cont-vars (car k)) (let-cont-body (car k)) (cdr k) (1+ n))) ((if-cont-p (car k)) (normalize-if `(if ,res ,(if-cont-exp1 (car k)) ,(if-cont-exp2 (car k))) (cdr k) (1+ n))) ((cond-cont-p (car k)) (normalize-cond `(cond (,res ,(cond-cont-value (car k))) ,@(cond-cont-clauses (car k))) (cdr k) (1+ n))) ((let-star-cont-p (car k)) (normalize-let* `((,(let-star-cont-var (car k)) ,res) ,@(let-star-cont-clauses (car k))) (let-star-cont-body (car k)) (cdr k) (1+ n))) ((quasiquote-cont-p (car k)) (normalize `(quasiquote ,(form-unquote `(,(first (quasiquote-cont-subst (car k))) ,res) (quasiquote-cont-body (car k)))) (cdr k) (1+ n))) (t (error "something is off with applying continuation")))) (defun stop-computation (k res n) (format t "~a ~a~%~%" (red "IRREDUCIBLE FORM:") (compose-dump (to-str-reduced res) k))) (defun repl () (princ "NORMALIZE: ") (finish-output) (multiple-value-bind (str missing-p) (read-line *standard-input* nil "") (if missing-p (format t "~%KEEP CALM AND REDUCE!~%") (read-sexpr str (lambda (v rest) (if (verify-end-of-expr rest) (eval-repl-command v) (progn (format t "Syntax error: something is off~%unread characters: ~a~%" rest) (repl)))) (lambda (msg) (format t "~a~%" msg) (repl)))) (finish-output))) (defparameter logo "Reduction-based LISP. Developed by by Popov Roman in 2018. Inspired by John McCarthy and Brian Cantwell Smith.~%") (defun main () (format t logo) (match *posix-argv* ((list name-of-the-interpreter filename) (repl-with-file filename)) ((list name-of-the-interpreter) (repl)) (otherwise (format t "BAD COMMAND LINE PARAMETERS:~%")))) (defun check-file-syntax (lst success failure) (if (null lst) (funcall success) (match (car lst) ((guard (list 'defun name args body) (and (symbolp name) (formal-arguments-p args))) (check-syntax body (lambda () (check-file-syntax (cdr lst) success failure)) failure)) (otherwise (funcall failure (car lst)))))) (defun define-functions (lst) (loop for i in lst do (progn ; (format t "~a~%" i) (match i ((guard (list 'defun name args body) (and (symbolp name) (formal-arguments-p args))) (push (cons (second i) `(lambda ,args ,body)) *glob-env*)) (otherwise (format t "ERROR in DEFINITION: ~a~%" (to-str i)))))) (format t "DEFINED FUNCTIONS: ~a~%" (to-bland-str (loop for i in lst collect (second i))))) (defun repl-with-file (file) (if (probe-file file) (let ((s (alexandria:read-file-into-string file))) (read-bare-list s nil (lambda (v rest) (check-file-syntax v (lambda () (define-functions v)) (lambda (msg) (format t "ERROR WHILE LOADING FILE ~a: ~a~%" file msg))) (repl)) (lambda (msg) (format t "~a~%" msg) (repl)))) (format t "THERE IS NO FILE NAMED ~a~%" file))) (main)
53,256
Common Lisp
.lisp
1,054
36.720114
116
0.50569
komputikisto/HEALED-LISP
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
cde76683c4e715f2d776009ddb53e3b83c64bd34193e9e8872a063f4856bfcbd
38,329
[ -1 ]
38,346
lexical-analizer.lisp
PaperMonoid_common-lisp-exercises/lexical-analizer.lisp
(require "cl-ppcre") (defun is-variable? (string) (cl-ppcre:scan "^[A-Za-z][A-Za-z0-9]*$" string)) (defun is-number? (string) (cl-ppcre:scan "^([\+\-])?[0-9]+(.[0-9]+)?((e|E)([\+\-])?[0-9]+)?$" string)) (defun is-email? (string) (cl-ppcre:scan "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$" string)) (defun is-url? (string) (cl-ppcre:scan "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]$" string)) (defun classify-lexeme (string) (cond ((is-variable? string) (cons 'VARIABLE string)) ((is-number? string) (cons 'NUMBER string)) ((is-email? string) (cons 'EMAIL string)) ((is-url? string) (cons 'URL string)) (t (cons 'NONE string)))) (let ((in (open "lexical-analizer-test.txt" :if-does-not-exist nil))) (when in (loop for line = (read-line in nil) while line do (format t "~a~%" (classify-lexeme line))) (close in)))
888
Common Lisp
.lisp
20
41.45
101
0.577726
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
653874dde4d7a7d4583ff889855df8852bb534dd1514368084086ba0b7900afb
38,346
[ -1 ]
38,347
random.lisp
PaperMonoid_common-lisp-exercises/random.lisp
(defvar *x* 1.0) (defun multiplicative-congruential-random (&optional (a 125.0) (m 255.0)) (progn (setq *x* (* (mod (* a *x*) m) 1.0)) (/ *x* m))) (loop repeat 10 do (print (multiplicative-congruential-random 3.0 255.0)))
240
Common Lisp
.lisp
8
26.75
60
0.613043
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
e6581de1cd810e9380a18f4ecd3e6417c659f33d61c0952bceea3867ee1a0f68
38,347
[ -1 ]
38,348
rock-paper-scissors.lisp
PaperMonoid_common-lisp-exercises/rock-paper-scissors.lisp
(require "cl-ppcre") (defun continue? (string) (cl-ppcre:scan "(?i)(y|ye|yes)" string)) (defun parse-move (string) (cond ((cl-ppcre:scan "(?i)(r|rock)" string) 'ROCK) ((cl-ppcre:scan "(?i)(p|paper)" string) 'PAPER) (t 'SCISSORS))) (defun get-ai-move () (let ((pick (random 3))) (cond ((= pick 1) 'ROCK) ((= pick 2) 'PAPER) (t 'SCISSORS)))) (defun beats? (a b) (or (and (equal 'ROCK a) (equal 'SCISSORS b)) (and (equal 'PAPER a) (equal 'ROCK b)) (and (equal 'SCISSORS a) (equal 'PAPER b)))) (defun get-winner (a b) (cond ((beats? a b) "YOU WIN!") ((beats? b a) "YOU LOSE!") (t "IT'S A TIE"))) (defun prompt () (loop (format *query-io* "Your turn [R/P/S]: ") (force-output) (let ((player-move (parse-move (read-line *query-io*))) (ai-move (get-ai-move))) (format *query-io* "AI PLAYED ~a, ~a~%" ai-move (get-winner player-move ai-move)) (force-output)) (format *query-io* "CONTINUE [y/N]: ") (force-output) (when (null (continue? (read-line *query-io*))) (return))))
1,055
Common Lisp
.lisp
32
29.15625
63
0.582104
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
b1c7cbf794d35d4a4f8a3805ec07758e31ff411ecee5bcb5bf627e3202dacaef
38,348
[ -1 ]
38,349
monte-carlo.lisp
PaperMonoid_common-lisp-exercises/monte-carlo.lisp
(defun U () (random 1.0)) (defun avg (X &optional (n 1)) (let ((sum 0.0)) (loop repeat n do (incf sum (funcall X))) (/ sum n))) (defun inside-circle? () (cond ((<= (+ (expt (- (* (U) 2) 1) 2) (expt (- (* (U) 2) 1) 2)) 1) 1) (t 0))) (defun e-pi (&optional (n 1)) (* (avg #'inside-circle? n) 4)) (e-pi 10000) ; approximating PI (defun inside-x? () (let ((x (U)) (y (U))) (cond ((<= y x) 1) (t 0)))) (defun e-x (&optional (n 1)) (* (avg #'inside-x? n))) (e-x 1000) ; approximating integral of y = x (defun inside-x^2? () (let ((x (U)) (y (U))) (cond ((<= y (expt x 2)) 1) (t 0)))) (defun e-x^2 (&optional (n 1)) (* (avg #'inside-x^2? n))) (e-x^2 1000) ; approximating integral of y = x^2
764
Common Lisp
.lisp
32
20.40625
68
0.493075
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
de6185c3e4e21caacf9eae0fcd16cd609c0813f2149233bfe52bf231c77e3b68
38,349
[ -1 ]
38,350
fizz-buzz.lisp
PaperMonoid_common-lisp-exercises/fizz-buzz.lisp
(defun fizz-buzz (n) (let ((divisible-by-3 (= 0 (mod n 3))) (divisible-by-5 (= 0 (mod n 5)))) (cond ((and divisible-by-3 divisible-by-5) '(FIZZ BUZZ)) (divisible-by-3 'FIZZ) (divisible-by-5 'BUZZ) (t n))))
237
Common Lisp
.lisp
8
24.75
56
0.550218
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
f8743af1f974d63ae51839dc98e90705a13fa4481286911f0e70ca1b8e8ecca2
38,350
[ -1 ]
38,351
fibonacci.lisp
PaperMonoid_common-lisp-exercises/fibonacci.lisp
(defun fibonacci (n) (if (<= n 2) 1 (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
96
Common Lisp
.lisp
4
19.5
51
0.456522
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
8e828770acc164146c074e3f18b566728e0f7d5db0380c17c253f7e187778c74
38,351
[ -1 ]
38,352
let.lisp
PaperMonoid_common-lisp-exercises/let.lisp
(defun foo (x) (format t "Parameter: ~a~%" x) (let ((x 2)) (format t "Outer LET: ~a~%" x) (let ((x 3)) (format t "Inner LET: ~a~%" x)) (format t "Outer LET: ~a~%" x)) (format t "Parameter: ~a~%" x))
223
Common Lisp
.lisp
8
23.875
37
0.493023
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
a2cdc7820bde9355d76e3f393faf735fd6f83269b400e79fa5a759b31cc73395
38,352
[ -1 ]
38,353
clos.lisp
PaperMonoid_common-lisp-exercises/clos.lisp
(defclass Box () ((length :reader get-length :writer set-length) (breadth :reader get-breadth :writer set-breadth) (height :reader get-height :writer set-height))) (make-instance 'Box) (defclass Point () (x y z))
225
Common Lisp
.lisp
7
29.428571
52
0.708333
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
687c325c00f739271aee62b69c926a21f4ac6a6811dfc34a6b9a5922dc34ca9a
38,353
[ -1 ]
38,354
prime.lisp
PaperMonoid_common-lisp-exercises/prime.lisp
(defun is-prime (n) (let ((result t)) (loop for i from 2 to (- n 1) do (setq result (and result (not (= 0 (mod n i)))))) result))
146
Common Lisp
.lisp
5
25
55
0.539007
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
59e48574b87321740aed3eae8c808835342e610ed057142512a2c98259b70e55
38,354
[ -1 ]
38,355
macro.lisp
PaperMonoid_common-lisp-exercises/macro.lisp
(defmacro setTo10(n) (setq n 10) (print n)) (setq x 25) (print x) (setTo10 x)
83
Common Lisp
.lisp
6
12
20
0.657895
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
6bf59b8be61612b136b7a2c48e769407733c6db0bd6a38956e42df7beb779ac0
38,355
[ -1 ]
38,356
loop.lisp
PaperMonoid_common-lisp-exercises/loop.lisp
(loop for i in '(ichi ni san) do (print i)) (loop for x from 1 to 100 for y = (* x 2) collect y) (loop for (a b) in '((x 1) (y 2) (z 3)) collect (list b a) ) (loop repeat 10 do (format t "ok")) (dolist (item '(ichi ni san)) (print item))
274
Common Lisp
.lisp
11
20.636364
39
0.540541
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
7311b3375354d56701148216dd0e9e537bde680cfffff28ff18fc4f5e22be968
38,356
[ -1 ]
38,357
factorization.lisp
PaperMonoid_common-lisp-exercises/factorization.lisp
(defun factorize (n) (let ((limit n)) (loop for i from 2 to limit do (if (zerop (mod n i)) (return i) (setq limit (floor (/ n i))))))) (factorize (* 15485863 32452843))
197
Common Lisp
.lisp
7
23.142857
39
0.560847
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
5f0a54808fa02934a42e0483ad4098c41bd645a0433503654de2f4dc350c97ef
38,357
[ -1 ]
38,358
regex.lisp
PaperMonoid_common-lisp-exercises/regex.lisp
(require "cl-ppcre") (defun continue? (string) (cl-ppcre:scan "(?i)(y|ye|yes)" string)) (defun is-variable? (string) (cl-ppcre:scan "^[A-Za-z][A-Za-z0-9]*$" string)) (defun is-number? (string) (cl-ppcre:scan "^([\+\-])?[0-9]+(.[0-9]+)?((e|E)([\+\-])?[0-9]+)?$" string)) (defun classify-lexeme (string) (cond ((is-variable? string) 'VARIABLE) ((is-number? string) 'NUMBER) (t 'NONE))) (defun prompt () (loop (format *query-io* "LEXEME: ") (force-output) (format *query-io* "~a~%" (classify-lexeme (read-line *query-io*))) (format *query-io* "CONTINUE [y/N]: ") (force-output) (when (null (continue? (read-line *query-io*))) (return))))
676
Common Lisp
.lisp
19
32.421053
78
0.592025
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
d0c0481a26449623744221a4b87c21e27c126244446cdc9e4a0c7cbd64a3df2e
38,358
[ -1 ]
38,359
factorial.lisp
PaperMonoid_common-lisp-exercises/factorial.lisp
(defun factorial (n) (if (> n 1) (* n (factorial (- n 1))) 1)) (defun factorial-loop (n) (let ((result 1)) (dotimes (i n) (setq result (* result (+ i 1)))) result))
178
Common Lisp
.lisp
6
26.5
52
0.549708
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
af3b6543d37d82ad569ecc57c28960a352ad7fa37ad794b16b09704314c3c781
38,359
[ -1 ]
38,360
binary-search.lisp
PaperMonoid_common-lisp-exercises/binary-search.lisp
(defun binary-search (lst elt) (cond ((null lst) nil) ((= (car lst) elt) t) ((< elt (car lst)) (binary-search (car (cdr lst)) elt)) ((> elt (car lst)) (binary-search (car (cdr (cdr lst))) elt))))
222
Common Lisp
.lisp
5
38.2
71
0.534562
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
4dea3a8e95fed87b1dc008606673eeeef10b543bba389e1ebd1360fd0cc86569
38,360
[ 73652 ]
38,361
defparameter.lisp
PaperMonoid_common-lisp-exercises/defparameter.lisp
(defparameter *p* 1) (constantp '*p*) (setq *p* 2) (defparameter *p* 3) *p*
76
Common Lisp
.lisp
5
14.2
20
0.633803
PaperMonoid/common-lisp-exercises
0
0
0
GPL-3.0
9/19/2024, 11:44:42 AM (Europe/Amsterdam)
73036a34aaf5ebe67e590107902e1ecb9ecc32988be77a2fb7e50bc84afc8639
38,361
[ -1 ]