1st commit
52
wwws/apx/apx.apxtri.farm.ants.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"static-server": {
|
||||
"listen": [":443"],
|
||||
"routes": [
|
||||
{
|
||||
"match": [
|
||||
{
|
||||
"host": ["apx.apxtri.farm.ants"]
|
||||
}
|
||||
],
|
||||
"handle": [
|
||||
{
|
||||
"handler": "file_server",
|
||||
"root": "/media/phil/usbfarm/apxtowns/data/apxtri/objects/wwws/apx/dist"
|
||||
},
|
||||
{
|
||||
"handler": "static_response",
|
||||
"body": "404 - Not Found",
|
||||
"status_code": 404
|
||||
}
|
||||
],
|
||||
"terminal": true
|
||||
}
|
||||
],
|
||||
"tls_connection_policies": [{}]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tls": {
|
||||
"certificates": {
|
||||
"automate": ["apx.apxtri.farm.ants"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"logs": {
|
||||
"default": {
|
||||
"level": "INFO",
|
||||
"writer": {
|
||||
"output": "stdout"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"storage": {
|
||||
"module": "file_system",
|
||||
"root": "/var/lib/caddy"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
var app=app||{};
|
||||
app.navbarinline={};
|
||||
|
||||
app.navbarinline.show=(action)=>{
|
||||
console.log('run navbar')
|
||||
if (!action) action="signin";
|
||||
app[action].show();
|
||||
const navdata={btnactions: []}
|
||||
apx.data.tpldata.navbarinlinesquarebtn[action].forEach(b=>{
|
||||
navdata.btnactions.push(apx.data.tpldata.navbarinlinesquarebtn[b])
|
||||
})
|
||||
console.log( navdata)
|
||||
document.querySelector("[name='wallet']").innerHTML=Mustache.render(apx.data.tpl.navbarinlinesquarebtn,navdata);
|
||||
|
||||
}
|
||||
|
||||
apx.readyafterupdate(app.navbarinline.show);
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="d-flex justify-content-center">
|
||||
{{#btnactions}}
|
||||
<button class="m-1 btn btn-outline-primary" onclick="{{onclick}}"
|
||||
data-bs-toggle="tooltip" data-bs-placement="top" title="{{title}}">
|
||||
{{{icon}}}
|
||||
</button>
|
||||
{{/btnactions}}
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"signin": ["addidentity", "forgetkey", "info"],
|
||||
"signup": ["login", "forgetkey", "info"],
|
||||
"info": ["back"],
|
||||
"recoverkey": ["addidentity", "forgetkey", "info"],
|
||||
"wallet": [],
|
||||
"btnlogout": {
|
||||
"onclick": "app.navbarinline.show('signin')",
|
||||
"title": "Sortir",
|
||||
"icon": "<i class='fs-3 bi bi-door-closed'></i>"
|
||||
},
|
||||
"forgetkey": {
|
||||
"onclick": "app.wallet.show('forget')",
|
||||
"title": "Trouver sa clé",
|
||||
"icon": "<i class='fs-3 bi bi-key'></i>"
|
||||
},
|
||||
"addidentity": {
|
||||
"onclick": "app.wallet.show('signup')",
|
||||
"title": "Créer une identité",
|
||||
"icon": "<i class='fs-3 bi bi-person-plus'></i>"
|
||||
},
|
||||
"info": {
|
||||
"onclick": "app.wallet.show('info')",
|
||||
"title": "En savoir plus",
|
||||
"icon": "<i class='fs-3 bi bi-info-circle'></i>"
|
||||
},
|
||||
"login": {
|
||||
"onclick": "app.wallet.show('signin')",
|
||||
"title": "S'identifier",
|
||||
"icon": "<i class='fs-3 bi bi-person-fill-check'></i>"
|
||||
},
|
||||
"back": {
|
||||
"onclick": "app.wallet.show('signin')",
|
||||
"title": "Retour",
|
||||
"icon": "<i class='fs-3 bi bi-arrow-return-left'></i>"
|
||||
}
|
||||
}
|
||||
5
wwws/apx/src/components/signin/signin.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var app=app||{};
|
||||
app.signin={};
|
||||
app.signin.show=()=>{
|
||||
|
||||
}
|
||||
48
wwws/apx/src/components/signin/signin.mustache
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="card {{theme}}">
|
||||
<div class="card-body">
|
||||
<div class="m-sm-4">
|
||||
<div class="text-center">
|
||||
<img src="{{{logo}}}" alt="logo" class="img-fluid" style="max-width:180px" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="inputaliasauth" class="form-label">{{aliaslabel}}</label>
|
||||
<input id="inputaliasauth"
|
||||
class="form-control"
|
||||
type="text"
|
||||
placeholder="{{{aliasplaceholder}}}" />
|
||||
</div>
|
||||
<div class="mb-3 {{#nopassphrase}}d-none{{/nopassphrase}}">
|
||||
<label for="inputpassphraseauth" class="form-label">{{{passphraselabel}}}</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="inputpassphraseauth"
|
||||
placeholder="{{{passphraseplaceholder}}}">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<textarea rows="5"
|
||||
class="form-control"
|
||||
id="privatekeyauth"
|
||||
placeholder="{{privatekeyplaceholder}}"></textarea>
|
||||
<small>
|
||||
<a onclick="{{{forgetonclick}}}">{{{forgetkey}}}</a>
|
||||
</small>
|
||||
</div>
|
||||
<div>
|
||||
<label class="form-check">
|
||||
<input id="remembermeid"
|
||||
class="form-check-input bg-dark text-white"
|
||||
type="checkbox"
|
||||
value=""
|
||||
name="rememberme">
|
||||
<span class="form-check-label" for="remembermeid">{{{rememberme}}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="text-center mt-3">
|
||||
<button class="btn btn-primary"
|
||||
onclick="apx.authentifyme(document.getElementById('inputaliasauth').value,document.getElementById('inputpassphraseauth').value,document.getElementById('privatekeyauth').value);">
|
||||
{{authentifybutton}}
|
||||
</button>
|
||||
<p class="msginfo text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
wwws/apx/src/components/signin/signin_fr.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"logo": "static/img/logo/logoWhiteSimple.png",
|
||||
"commenttheme": "empty for bg-light text-dark , type bg-dark text-white for a dark theme",
|
||||
"theme": "bg-black text-light",
|
||||
"cardclass": "bg-black",
|
||||
"aliaslabel": "Votre alias (attention il est public)",
|
||||
"aliasplaceholder": "L'alias associé à votre clé public",
|
||||
"nopassphrase": true,
|
||||
"forcetrustincurrentdomain": true,
|
||||
"passphraselabel": "La passphrase de votre clé",
|
||||
"passphraseplaceholder": "Si votre clé est protégée par une passphrase",
|
||||
"passphrasecreateplaceholder": " Pour chiffrer la clé privée",
|
||||
"privatekeyplaceholder": "Coller ici votre clé privée",
|
||||
"forgetkey": "j'ai oublié ma clé",
|
||||
"rememberme": "stocker mon identité sur ce navigateur plus de 24heures. Pour supprimer la clé de ce navigateur, il suffit de se deconnecter",
|
||||
"authentifybutton": "M'authentifier"
|
||||
}
|
||||
0
wwws/apx/src/layouts/wallet/wallet.js
Normal file
37
wwws/apx/src/layouts/wallet/wallet.mustache
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{lang}}">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{{seo.title}}</title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<meta content="{{seo.keywords}}" name="keywords" />
|
||||
<meta content="{{seo.description}}" name="description" />
|
||||
<link href="{{favicon}}" rel="icon" />
|
||||
<script type="application/ld+json">{{{stringifyseo}}}</script>
|
||||
<script>const apxtri = {{{stringifyapxtri}}};</script>
|
||||
{{#links}}
|
||||
<link href="{{{.}}}" rel="stylesheet" />
|
||||
{{/links}}
|
||||
{{#jslibs}}<script typescript="lib" src="{{{.}}}"></script>{{/jslibs}}
|
||||
{{#jsapp}}<script src="{{{.}}}"></script>{{/jsapp}}
|
||||
</head>
|
||||
<body class="{{{bodyclass}}}">
|
||||
<main class="d-flex w-100 h-100">
|
||||
<div class="container d-flex flex-column">
|
||||
<div class="row vh-100">
|
||||
<div class="col-sm-12 col-md-8 col-lg-6 mx-auto my-auto d-table h-100">
|
||||
<div class="d-table-cell align-middle">
|
||||
<div class="text-center mt-4 ">
|
||||
<h1 class="h1"></h1>
|
||||
<p class="lead">{{{slogan}}}</p>
|
||||
</div>
|
||||
<div class="card {{theme}}">
|
||||
<div class="card-body">{{{appwallet}}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
0
wwws/apx/src/layouts/wallet/wallet.scss
Normal file
10
wwws/apx/src/layouts/wallet/wallet_fr.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"slogan":"L'Unique",
|
||||
"favicon":"/static/img/logo/favicon.png",
|
||||
"bodyclass":"bg-primary",
|
||||
"links":["/static/css/app.css","/static/lib/bootstrap-icons/font/bootstrap-icons.min.css"],
|
||||
"stringifyapxtri":"",
|
||||
"jslibs":[],
|
||||
"jsapp":[],
|
||||
"appwallet":""
|
||||
}
|
||||
22
wwws/apx/src/static/css copy/twdevstyle.css
Normal file
@@ -0,0 +1,22 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import 'daisyui';
|
||||
|
||||
@Layer base {
|
||||
@font-face{
|
||||
font-family: 'Monserrat';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(static/fonts/Montserrat-VariableFont_wght.woff2) format('woff2');
|
||||
}
|
||||
font-family:"Monserrat", system-ui, sans-serif;
|
||||
@font-face{
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(static/fonts/Inter-VariableFont_slnt,wght.woff2) format('woff2');
|
||||
}
|
||||
}
|
||||
6048
wwws/apx/src/static/css copy/twstyle.css
Normal file
7
wwws/apx/src/static/css/app.css
Normal file
1
wwws/apx/src/static/css/app.css.map
Normal file
0
wwws/apx/src/static/fonts/.gitkeep
Normal file
BIN
wwws/apx/src/static/fonts/Quicksand-VariableFont_wght.woff
Normal file
93
wwws/apx/src/static/fonts/logo/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
wwws/apx/src/static/fonts/logo/Quicksand-VariableFont_wght.ttf
Normal file
BIN
wwws/apx/src/static/fonts/logo/Quicksand-VariableFont_wght.woff
Normal file
BIN
wwws/apx/src/static/fonts/logo/Quicksand.zip
Normal file
67
wwws/apx/src/static/fonts/logo/README.txt
Normal file
@@ -0,0 +1,67 @@
|
||||
Quicksand Variable Font
|
||||
=======================
|
||||
|
||||
This download contains Quicksand as both a variable font and static fonts.
|
||||
|
||||
Quicksand is a variable font with this axis:
|
||||
wght
|
||||
|
||||
This means all the styles are contained in a single file:
|
||||
Quicksand-VariableFont_wght.ttf
|
||||
|
||||
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||
in those cases you can use the static font files for Quicksand:
|
||||
static/Quicksand-Light.ttf
|
||||
static/Quicksand-Regular.ttf
|
||||
static/Quicksand-Medium.ttf
|
||||
static/Quicksand-SemiBold.ttf
|
||||
static/Quicksand-Bold.ttf
|
||||
|
||||
Get started
|
||||
-----------
|
||||
|
||||
1. Install the font files you want to use
|
||||
|
||||
2. Use your app's font picker to view the font family and all the
|
||||
available styles
|
||||
|
||||
Learn more about variable fonts
|
||||
-------------------------------
|
||||
|
||||
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||
https://variablefonts.typenetwork.com
|
||||
https://medium.com/variable-fonts
|
||||
|
||||
In desktop apps
|
||||
|
||||
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||
|
||||
Online
|
||||
|
||||
https://developers.google.com/fonts/docs/getting_started
|
||||
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||
|
||||
Installing fonts
|
||||
|
||||
MacOS: https://support.apple.com/en-us/HT201749
|
||||
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||
|
||||
Android Apps
|
||||
|
||||
https://developers.google.com/fonts/docs/android
|
||||
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||
|
||||
License
|
||||
-------
|
||||
Please read the full license text (OFL.txt) to understand the permissions,
|
||||
restrictions and requirements for usage, redistribution, and modification.
|
||||
|
||||
You can use them in your products & projects – print or digital,
|
||||
commercial or otherwise.
|
||||
|
||||
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||
license for all details.
|
||||
BIN
wwws/apx/src/static/fonts/logo/static/Quicksand-Bold.ttf
Normal file
BIN
wwws/apx/src/static/fonts/logo/static/Quicksand-Light.ttf
Normal file
BIN
wwws/apx/src/static/fonts/logo/static/Quicksand-Medium.ttf
Normal file
BIN
wwws/apx/src/static/fonts/logo/static/Quicksand-Regular.ttf
Normal file
BIN
wwws/apx/src/static/fonts/logo/static/Quicksand-SemiBold.ttf
Normal file
BIN
wwws/apx/src/static/fonts/questrial-regular-webfont.woff
Normal file
93
wwws/apx/src/static/fonts/texte/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2011 The Questrial Project Authors (https://github.com/googlefonts/questrial)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
wwws/apx/src/static/fonts/texte/Questrial-Regular.ttf
Normal file
BIN
wwws/apx/src/static/fonts/texte/Questrial.zip
Normal file
5
wwws/apx/src/static/fonts/texte/generator_config.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
# Font Squirrel Font-face Generator Configuration File
|
||||
# Upload this file to the generator to recreate the settings
|
||||
# you used to create these fonts.
|
||||
|
||||
{"mode":"optimal","formats":["woff","woff2"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}
|
||||
706
wwws/apx/src/static/fonts/texte/questrial-regular-demo.html
Normal file
@@ -0,0 +1,706 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$.fn.easyTabs = function(option) {
|
||||
var param = jQuery.extend({ fadeSpeed: 'fast', defaultContent: 1, activeClass: 'active' }, option);
|
||||
$(this).each(function() {
|
||||
var thisId = '#' + this.id;
|
||||
if ( param.defaultContent == '' )
|
||||
{
|
||||
param.defaultContent = 1;
|
||||
}
|
||||
if ( typeof param.defaultContent == 'number' )
|
||||
{
|
||||
var defaultTab = $(thisId + ' .tabs li:eq(' + (param.defaultContent - 1) + ') a').attr('href').substr(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
var defaultTab = param.defaultContent;
|
||||
}
|
||||
$(thisId + ' .tabs li a').each(function() {
|
||||
var tabToHide = $(this).attr('href').substr(1);
|
||||
$('#' + tabToHide).addClass('easytabs-tab-content');
|
||||
});
|
||||
hideAll();
|
||||
changeContent(defaultTab);
|
||||
|
||||
function hideAll() {$(thisId + ' .easytabs-tab-content').hide();}
|
||||
|
||||
function changeContent(tabId)
|
||||
{
|
||||
hideAll();
|
||||
$(thisId + ' .tabs li').removeClass(param.activeClass);
|
||||
$(thisId + ' .tabs li a[href=#' + tabId + ']').closest('li').addClass(param.activeClass);
|
||||
if ( param.fadeSpeed != 'none' )
|
||||
{
|
||||
$(thisId + ' #' + tabId).fadeIn(param.fadeSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(thisId + ' #' + tabId).show();
|
||||
}
|
||||
}
|
||||
|
||||
$(thisId + ' .tabs li').click(function() {
|
||||
var tabId = $(this).find('a').attr('href').substr(1);
|
||||
changeContent(tabId);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
<link rel="stylesheet" href="specimen_files/specimen_stylesheet.css" type="text/css" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8"/>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: 'questrialregular';
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<title>Questrial Regular Specimen</title>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
$('#container').easyTabs({ defaultContent: 1 });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
Questrial Regular </div>
|
||||
<ul class="tabs">
|
||||
<li><a href="#specimen">Specimen</a></li>
|
||||
<li><a href="#layout">Sample Layout</a></li>
|
||||
<li><a href="#glyphs">Glyphs & Languages</a></li>
|
||||
<li><a href="#installing">Installing Webfonts</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="main_content">
|
||||
|
||||
|
||||
<div id="specimen">
|
||||
|
||||
<div class="section">
|
||||
<div class="grid12 firstcol">
|
||||
<div class="huge">AaBb</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="glyph_range">A​B​C​D​E​F​G​H​I​J​K​L​M​N​O​P​Q​R​S​T​U​V​W​X​Y​Z​a​b​c​d​e​f​g​h​i​j​k​l​m​n​o​p​q​r​s​t​u​v​w​x​y​z​1​2​3​4​5​6​7​8​9​0​&​.​,​?​!​@​(​)​#​$​%​*​+​-​=​:​;</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="grid12 firstcol">
|
||||
<table class="sample_table">
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td class="size10">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11</td>
|
||||
<td class="size11">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td class="size12">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>13</td>
|
||||
<td class="size13">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>14</td>
|
||||
<td class="size14">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>16</td>
|
||||
<td class="size16">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>18</td>
|
||||
<td class="size18">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td class="size20">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>24</td>
|
||||
<td class="size24">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td class="size30">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>36</td>
|
||||
<td class="size36">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>48</td>
|
||||
<td class="size48">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>60</td>
|
||||
<td class="size60">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>72</td>
|
||||
<td class="size72">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>90</td>
|
||||
<td class="size90">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section" id="bodycomparison">
|
||||
|
||||
|
||||
<div id="xheight">
|
||||
<div class="fontbody">◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼body</div>
|
||||
<div class="arialbody">body</div>
|
||||
<div class="verdanabody">body</div>
|
||||
<div class="georgiabody">body</div>
|
||||
</div>
|
||||
<div class="fontbody" style="z-index:1">
|
||||
body<span>Questrial Regular</span>
|
||||
</div>
|
||||
<div class="arialbody" style="z-index:1">
|
||||
body<span>Arial</span>
|
||||
</div>
|
||||
<div class="verdanabody" style="z-index:1">
|
||||
body<span>Verdana</span>
|
||||
</div>
|
||||
<div class="georgiabody" style="z-index:1">
|
||||
body<span>Georgia</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section psample psample_row1" id="">
|
||||
|
||||
<div class="grid2 firstcol">
|
||||
<p class="size10"><span>10.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid3">
|
||||
<p class="size11"><span>11.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid3">
|
||||
<p class="size12"><span>12.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid4">
|
||||
<p class="size13"><span>13.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="white_blend"></div>
|
||||
|
||||
</div>
|
||||
<div class="section psample psample_row2" id="">
|
||||
<div class="grid3 firstcol">
|
||||
<p class="size14"><span>14.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid4">
|
||||
<p class="size16"><span>16.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid5">
|
||||
<p class="size18"><span>18.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="white_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section psample psample_row3" id="">
|
||||
<div class="grid5 firstcol">
|
||||
<p class="size20"><span>20.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
<div class="grid7">
|
||||
<p class="size24"><span>24.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
|
||||
<div class="white_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section psample psample_row4" id="">
|
||||
<div class="grid12 firstcol">
|
||||
<p class="size30"><span>30.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
<div class="white_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section psample psample_row1 fullreverse">
|
||||
<div class="grid2 firstcol">
|
||||
<p class="size10"><span>10.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid3">
|
||||
<p class="size11"><span>11.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid3">
|
||||
<p class="size12"><span>12.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid4">
|
||||
<p class="size13"><span>13.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="black_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section psample psample_row2 fullreverse">
|
||||
<div class="grid3 firstcol">
|
||||
<p class="size14"><span>14.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid4">
|
||||
<p class="size16"><span>16.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="grid5">
|
||||
<p class="size18"><span>18.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
|
||||
</div>
|
||||
<div class="black_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section psample fullreverse psample_row3" id="">
|
||||
<div class="grid5 firstcol">
|
||||
<p class="size20"><span>20.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
<div class="grid7">
|
||||
<p class="size24"><span>24.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
|
||||
<div class="black_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section psample fullreverse psample_row4" id="" style="border-bottom: 20px #000 solid;">
|
||||
<div class="grid12 firstcol">
|
||||
<p class="size30"><span>30.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||
</div>
|
||||
<div class="black_blend"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="layout">
|
||||
|
||||
<div class="section">
|
||||
|
||||
<div class="grid12 firstcol">
|
||||
<h1>Lorem Ipsum Dolor</h1>
|
||||
<h2>Etiam porta sem malesuada magna mollis euismod</h2>
|
||||
|
||||
<p class="byline">By <a href="#link">Aenean Lacinia</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="grid8 firstcol">
|
||||
<p class="large">Donec sed odio dui. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||
|
||||
|
||||
<h3>Pellentesque ornare sem</h3>
|
||||
|
||||
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Maecenas faucibus mollis interdum. Donec ullamcorper nulla non metus auctor fringilla. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit. </p>
|
||||
|
||||
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. </p>
|
||||
|
||||
<p>Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur. </p>
|
||||
|
||||
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. </p>
|
||||
|
||||
<h3>Cras mattis consectetur</h3>
|
||||
|
||||
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Cras mattis consectetur purus sit amet fermentum. </p>
|
||||
|
||||
<p>Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
</div>
|
||||
|
||||
<div class="grid4 sidebar">
|
||||
|
||||
<div class="box reverse">
|
||||
<p class="last">Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
|
||||
</div>
|
||||
|
||||
<p class="caption">Maecenas sed diam eget risus varius.</p>
|
||||
|
||||
<p>Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper. Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||
|
||||
|
||||
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo. </p>
|
||||
|
||||
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec ullamcorper nulla non metus auctor fringilla. Maecenas faucibus mollis interdum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="glyphs">
|
||||
<div class="section">
|
||||
<div class="grid12 firstcol">
|
||||
|
||||
<h1>Language Support</h1>
|
||||
<p>The subset of Questrial Regular in this kit supports the following languages:<br/>
|
||||
|
||||
Albanian, Basque, Breton, Chamorro, Danish, Dutch, English, Faroese, Finnish, French, Frisian, Galician, German, Icelandic, Italian, Malagasy, Norwegian, Portuguese, Spanish, Alsatian, Aragonese, Arapaho, Arrernte, Asturian, Aymara, Bislama, Cebuano, Corsican, Fijian, French_creole, Genoese, Gilbertese, Greenlandic, Haitian_creole, Hiligaynon, Hmong, Hopi, Ibanag, Iloko_ilokano, Indonesian, Interglossa_glosa, Interlingua, Irish_gaelic, Jerriais, Lojban, Lombard, Luxembourgeois, Manx, Mohawk, Norfolk_pitcairnese, Occitan, Oromo, Pangasinan, Papiamento, Piedmontese, Potawatomi, Rhaeto-romance, Romansh, Rotokas, Sami_lule, Samoan, Sardinian, Scots_gaelic, Seychelles_creole, Shona, Sicilian, Somali, Southern_ndebele, Swahili, Swati_swazi, Tagalog_filipino_pilipino, Tetum, Tok_pisin, Uyghur_latinized, Volapuk, Walloon, Warlpiri, Xhosa, Yapese, Zulu, Latinbasic, Ubasic, Demo </p>
|
||||
<h1>Glyph Chart</h1>
|
||||
<p>The subset of Questrial Regular in this kit includes all the glyphs listed below. Unicode entities are included above each glyph to help you insert individual characters into your layout.</p>
|
||||
<div id="glyph_chart">
|
||||
|
||||
<div><p>&#13;</p> </div>
|
||||
<div><p>&#32;</p> </div>
|
||||
<div><p>&#33;</p>!</div>
|
||||
<div><p>&#34;</p>"</div>
|
||||
<div><p>&#35;</p>#</div>
|
||||
<div><p>&#36;</p>$</div>
|
||||
<div><p>&#37;</p>%</div>
|
||||
<div><p>&#38;</p>&</div>
|
||||
<div><p>&#39;</p>'</div>
|
||||
<div><p>&#40;</p>(</div>
|
||||
<div><p>&#41;</p>)</div>
|
||||
<div><p>&#42;</p>*</div>
|
||||
<div><p>&#43;</p>+</div>
|
||||
<div><p>&#44;</p>,</div>
|
||||
<div><p>&#45;</p>-</div>
|
||||
<div><p>&#46;</p>.</div>
|
||||
<div><p>&#47;</p>/</div>
|
||||
<div><p>&#48;</p>0</div>
|
||||
<div><p>&#49;</p>1</div>
|
||||
<div><p>&#50;</p>2</div>
|
||||
<div><p>&#51;</p>3</div>
|
||||
<div><p>&#52;</p>4</div>
|
||||
<div><p>&#53;</p>5</div>
|
||||
<div><p>&#54;</p>6</div>
|
||||
<div><p>&#55;</p>7</div>
|
||||
<div><p>&#56;</p>8</div>
|
||||
<div><p>&#57;</p>9</div>
|
||||
<div><p>&#58;</p>:</div>
|
||||
<div><p>&#59;</p>;</div>
|
||||
<div><p>&#60;</p><</div>
|
||||
<div><p>&#61;</p>=</div>
|
||||
<div><p>&#62;</p>></div>
|
||||
<div><p>&#63;</p>?</div>
|
||||
<div><p>&#64;</p>@</div>
|
||||
<div><p>&#65;</p>A</div>
|
||||
<div><p>&#66;</p>B</div>
|
||||
<div><p>&#67;</p>C</div>
|
||||
<div><p>&#68;</p>D</div>
|
||||
<div><p>&#69;</p>E</div>
|
||||
<div><p>&#70;</p>F</div>
|
||||
<div><p>&#71;</p>G</div>
|
||||
<div><p>&#72;</p>H</div>
|
||||
<div><p>&#73;</p>I</div>
|
||||
<div><p>&#74;</p>J</div>
|
||||
<div><p>&#75;</p>K</div>
|
||||
<div><p>&#76;</p>L</div>
|
||||
<div><p>&#77;</p>M</div>
|
||||
<div><p>&#78;</p>N</div>
|
||||
<div><p>&#79;</p>O</div>
|
||||
<div><p>&#80;</p>P</div>
|
||||
<div><p>&#81;</p>Q</div>
|
||||
<div><p>&#82;</p>R</div>
|
||||
<div><p>&#83;</p>S</div>
|
||||
<div><p>&#84;</p>T</div>
|
||||
<div><p>&#85;</p>U</div>
|
||||
<div><p>&#86;</p>V</div>
|
||||
<div><p>&#87;</p>W</div>
|
||||
<div><p>&#88;</p>X</div>
|
||||
<div><p>&#89;</p>Y</div>
|
||||
<div><p>&#90;</p>Z</div>
|
||||
<div><p>&#91;</p>[</div>
|
||||
<div><p>&#92;</p>\</div>
|
||||
<div><p>&#93;</p>]</div>
|
||||
<div><p>&#94;</p>^</div>
|
||||
<div><p>&#95;</p>_</div>
|
||||
<div><p>&#96;</p>`</div>
|
||||
<div><p>&#97;</p>a</div>
|
||||
<div><p>&#98;</p>b</div>
|
||||
<div><p>&#99;</p>c</div>
|
||||
<div><p>&#100;</p>d</div>
|
||||
<div><p>&#101;</p>e</div>
|
||||
<div><p>&#102;</p>f</div>
|
||||
<div><p>&#103;</p>g</div>
|
||||
<div><p>&#104;</p>h</div>
|
||||
<div><p>&#105;</p>i</div>
|
||||
<div><p>&#106;</p>j</div>
|
||||
<div><p>&#107;</p>k</div>
|
||||
<div><p>&#108;</p>l</div>
|
||||
<div><p>&#109;</p>m</div>
|
||||
<div><p>&#110;</p>n</div>
|
||||
<div><p>&#111;</p>o</div>
|
||||
<div><p>&#112;</p>p</div>
|
||||
<div><p>&#113;</p>q</div>
|
||||
<div><p>&#114;</p>r</div>
|
||||
<div><p>&#115;</p>s</div>
|
||||
<div><p>&#116;</p>t</div>
|
||||
<div><p>&#117;</p>u</div>
|
||||
<div><p>&#118;</p>v</div>
|
||||
<div><p>&#119;</p>w</div>
|
||||
<div><p>&#120;</p>x</div>
|
||||
<div><p>&#121;</p>y</div>
|
||||
<div><p>&#122;</p>z</div>
|
||||
<div><p>&#123;</p>{</div>
|
||||
<div><p>&#124;</p>|</div>
|
||||
<div><p>&#125;</p>}</div>
|
||||
<div><p>&#126;</p>~</div>
|
||||
<div><p>&#160;</p> </div>
|
||||
<div><p>&#161;</p>¡</div>
|
||||
<div><p>&#162;</p>¢</div>
|
||||
<div><p>&#163;</p>£</div>
|
||||
<div><p>&#164;</p>¤</div>
|
||||
<div><p>&#165;</p>¥</div>
|
||||
<div><p>&#166;</p>¦</div>
|
||||
<div><p>&#167;</p>§</div>
|
||||
<div><p>&#168;</p>¨</div>
|
||||
<div><p>&#169;</p>©</div>
|
||||
<div><p>&#170;</p>ª</div>
|
||||
<div><p>&#171;</p>«</div>
|
||||
<div><p>&#172;</p>¬</div>
|
||||
<div><p>&#173;</p>­</div>
|
||||
<div><p>&#174;</p>®</div>
|
||||
<div><p>&#175;</p>¯</div>
|
||||
<div><p>&#176;</p>°</div>
|
||||
<div><p>&#177;</p>±</div>
|
||||
<div><p>&#178;</p>²</div>
|
||||
<div><p>&#179;</p>³</div>
|
||||
<div><p>&#180;</p>´</div>
|
||||
<div><p>&#181;</p>µ</div>
|
||||
<div><p>&#182;</p>¶</div>
|
||||
<div><p>&#183;</p>·</div>
|
||||
<div><p>&#184;</p>¸</div>
|
||||
<div><p>&#185;</p>¹</div>
|
||||
<div><p>&#186;</p>º</div>
|
||||
<div><p>&#187;</p>»</div>
|
||||
<div><p>&#188;</p>¼</div>
|
||||
<div><p>&#189;</p>½</div>
|
||||
<div><p>&#190;</p>¾</div>
|
||||
<div><p>&#191;</p>¿</div>
|
||||
<div><p>&#192;</p>À</div>
|
||||
<div><p>&#193;</p>Á</div>
|
||||
<div><p>&#194;</p>Â</div>
|
||||
<div><p>&#195;</p>Ã</div>
|
||||
<div><p>&#196;</p>Ä</div>
|
||||
<div><p>&#197;</p>Å</div>
|
||||
<div><p>&#198;</p>Æ</div>
|
||||
<div><p>&#199;</p>Ç</div>
|
||||
<div><p>&#200;</p>È</div>
|
||||
<div><p>&#201;</p>É</div>
|
||||
<div><p>&#202;</p>Ê</div>
|
||||
<div><p>&#203;</p>Ë</div>
|
||||
<div><p>&#204;</p>Ì</div>
|
||||
<div><p>&#205;</p>Í</div>
|
||||
<div><p>&#206;</p>Î</div>
|
||||
<div><p>&#207;</p>Ï</div>
|
||||
<div><p>&#208;</p>Ð</div>
|
||||
<div><p>&#209;</p>Ñ</div>
|
||||
<div><p>&#210;</p>Ò</div>
|
||||
<div><p>&#211;</p>Ó</div>
|
||||
<div><p>&#212;</p>Ô</div>
|
||||
<div><p>&#213;</p>Õ</div>
|
||||
<div><p>&#214;</p>Ö</div>
|
||||
<div><p>&#215;</p>×</div>
|
||||
<div><p>&#216;</p>Ø</div>
|
||||
<div><p>&#217;</p>Ù</div>
|
||||
<div><p>&#218;</p>Ú</div>
|
||||
<div><p>&#219;</p>Û</div>
|
||||
<div><p>&#220;</p>Ü</div>
|
||||
<div><p>&#221;</p>Ý</div>
|
||||
<div><p>&#222;</p>Þ</div>
|
||||
<div><p>&#223;</p>ß</div>
|
||||
<div><p>&#224;</p>à</div>
|
||||
<div><p>&#225;</p>á</div>
|
||||
<div><p>&#226;</p>â</div>
|
||||
<div><p>&#227;</p>ã</div>
|
||||
<div><p>&#228;</p>ä</div>
|
||||
<div><p>&#229;</p>å</div>
|
||||
<div><p>&#230;</p>æ</div>
|
||||
<div><p>&#231;</p>ç</div>
|
||||
<div><p>&#232;</p>è</div>
|
||||
<div><p>&#233;</p>é</div>
|
||||
<div><p>&#234;</p>ê</div>
|
||||
<div><p>&#235;</p>ë</div>
|
||||
<div><p>&#236;</p>ì</div>
|
||||
<div><p>&#237;</p>í</div>
|
||||
<div><p>&#238;</p>î</div>
|
||||
<div><p>&#239;</p>ï</div>
|
||||
<div><p>&#240;</p>ð</div>
|
||||
<div><p>&#241;</p>ñ</div>
|
||||
<div><p>&#242;</p>ò</div>
|
||||
<div><p>&#243;</p>ó</div>
|
||||
<div><p>&#244;</p>ô</div>
|
||||
<div><p>&#245;</p>õ</div>
|
||||
<div><p>&#246;</p>ö</div>
|
||||
<div><p>&#247;</p>÷</div>
|
||||
<div><p>&#248;</p>ø</div>
|
||||
<div><p>&#249;</p>ù</div>
|
||||
<div><p>&#250;</p>ú</div>
|
||||
<div><p>&#251;</p>û</div>
|
||||
<div><p>&#252;</p>ü</div>
|
||||
<div><p>&#253;</p>ý</div>
|
||||
<div><p>&#254;</p>þ</div>
|
||||
<div><p>&#255;</p>ÿ</div>
|
||||
<div><p>&#338;</p>Œ</div>
|
||||
<div><p>&#339;</p>œ</div>
|
||||
<div><p>&#376;</p>Ÿ</div>
|
||||
<div><p>&#710;</p>ˆ</div>
|
||||
<div><p>&#732;</p>˜</div>
|
||||
<div><p>&#8192;</p> </div>
|
||||
<div><p>&#8193;</p> </div>
|
||||
<div><p>&#8194;</p> </div>
|
||||
<div><p>&#8195;</p> </div>
|
||||
<div><p>&#8196;</p> </div>
|
||||
<div><p>&#8197;</p> </div>
|
||||
<div><p>&#8198;</p> </div>
|
||||
<div><p>&#8199;</p> </div>
|
||||
<div><p>&#8200;</p> </div>
|
||||
<div><p>&#8201;</p> </div>
|
||||
<div><p>&#8202;</p> </div>
|
||||
<div><p>&#8208;</p>‐</div>
|
||||
<div><p>&#8209;</p>‑</div>
|
||||
<div><p>&#8210;</p>‒</div>
|
||||
<div><p>&#8211;</p>–</div>
|
||||
<div><p>&#8212;</p>—</div>
|
||||
<div><p>&#8216;</p>‘</div>
|
||||
<div><p>&#8217;</p>’</div>
|
||||
<div><p>&#8218;</p>‚</div>
|
||||
<div><p>&#8220;</p>“</div>
|
||||
<div><p>&#8221;</p>”</div>
|
||||
<div><p>&#8222;</p>„</div>
|
||||
<div><p>&#8226;</p>•</div>
|
||||
<div><p>&#8230;</p>…</div>
|
||||
<div><p>&#8239;</p> </div>
|
||||
<div><p>&#8249;</p>‹</div>
|
||||
<div><p>&#8250;</p>›</div>
|
||||
<div><p>&#8287;</p> </div>
|
||||
<div><p>&#8364;</p>€</div>
|
||||
<div><p>&#8482;</p>™</div>
|
||||
<div><p>&#9724;</p>◼</div>
|
||||
<div><p>&#64257;</p>fi</div>
|
||||
<div><p>&#64258;</p>fl</div>
|
||||
<div><p>&#64259;</p>ffi</div>
|
||||
<div><p>&#64260;</p>ffl</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="specs">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="installing">
|
||||
<div class="section">
|
||||
<div class="grid7 firstcol">
|
||||
<h1>Installing Webfonts</h1>
|
||||
|
||||
<p>Webfonts are supported by all major browser platforms but not all in the same way. There are currently four different font formats that must be included in order to target all browsers. This includes TTF, WOFF, EOT and SVG.</p>
|
||||
|
||||
<h2>1. Upload your webfonts</h2>
|
||||
<p>You must upload your webfont kit to your website. They should be in or near the same directory as your CSS files.</p>
|
||||
|
||||
<h2>2. Include the webfont stylesheet</h2>
|
||||
<p>A special CSS @font-face declaration helps the various browsers select the appropriate font it needs without causing you a bunch of headaches. Learn more about this syntax by reading the <a href="https://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax">Fontspring blog post</a> about it. The code for it is as follows:</p>
|
||||
|
||||
|
||||
<code>
|
||||
@font-face{
|
||||
font-family: 'MyWebFont';
|
||||
src: url('WebFont.eot');
|
||||
src: url('WebFont.eot?#iefix') format('embedded-opentype'),
|
||||
url('WebFont.woff') format('woff'),
|
||||
url('WebFont.ttf') format('truetype'),
|
||||
url('WebFont.svg#webfont') format('svg');
|
||||
}
|
||||
</code>
|
||||
|
||||
<p>We've already gone ahead and generated the code for you. All you have to do is link to the stylesheet in your HTML, like this:</p>
|
||||
<code><link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" /></code>
|
||||
|
||||
<h2>3. Modify your own stylesheet</h2>
|
||||
<p>To take advantage of your new fonts, you must tell your stylesheet to use them. Look at the original @font-face declaration above and find the property called "font-family." The name linked there will be what you use to reference the font. Prepend that webfont name to the font stack in the "font-family" property, inside the selector you want to change. For example:</p>
|
||||
<code>p { font-family: 'WebFont', Arial, sans-serif; }</code>
|
||||
|
||||
<h2>4. Test</h2>
|
||||
<p>Getting webfonts to work cross-browser <em>can</em> be tricky. Use the information in the sidebar to help you if you find that fonts aren't loading in a particular browser.</p>
|
||||
</div>
|
||||
|
||||
<div class="grid5 sidebar">
|
||||
<div class="box">
|
||||
<h2>Troubleshooting<br/>Font-Face Problems</h2>
|
||||
<p>Having trouble getting your webfonts to load in your new website? Here are some tips to sort out what might be the problem.</p>
|
||||
|
||||
<h3>Fonts not showing in any browser</h3>
|
||||
|
||||
<p>This sounds like you need to work on the plumbing. You either did not upload the fonts to the correct directory, or you did not link the fonts properly in the CSS. If you've confirmed that all this is correct and you still have a problem, take a look at your .htaccess file and see if requests are getting intercepted.</p>
|
||||
|
||||
<h3>Fonts not loading in iPhone or iPad</h3>
|
||||
|
||||
<p>The most common problem here is that you are serving the fonts from an IIS server. IIS refuses to serve files that have unknown MIME types. If that is the case, you must set the MIME type for SVG to "image/svg+xml" in the server settings. Follow these instructions from Microsoft if you need help.</p>
|
||||
|
||||
<h3>Fonts not loading in Firefox</h3>
|
||||
|
||||
<p>The primary reason for this failure? You are still using a version Firefox older than 3.5. So upgrade already! If that isn't it, then you are very likely serving fonts from a different domain. Firefox requires that all font assets be served from the same domain. Lastly it is possible that you need to add WOFF to your list of MIME types (if you are serving via IIS.)</p>
|
||||
|
||||
<h3>Fonts not loading in IE</h3>
|
||||
|
||||
<p>Are you looking at Internet Explorer on an actual Windows machine or are you cheating by using a service like Adobe BrowserLab? Many of these screenshot services do not render @font-face for IE. Best to test it on a real machine.</p>
|
||||
|
||||
<h3>Fonts not loading in IE9</h3>
|
||||
|
||||
<p>IE9, like Firefox, requires that fonts be served from the same domain as the website. Make sure that is the case.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>©2010-2017 Font Squirrel. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
wwws/apx/src/static/fonts/texte/questrial-regular-webfont.woff
Normal file
BIN
wwws/apx/src/static/fonts/texte/questrial-regular-webfont.woff2
Normal file
@@ -0,0 +1 @@
|
||||
.section{margin-bottom:18px}.section:after{clear:both;content:".";display:block;height:0;visibility:hidden}.section{*zoom:1}.section .firstcol,.section .firstcolumn{margin-left:0}.border{margin-left:7px;padding-left:7px}.border,.colborder{border-left:1px solid #eee}.colborder{margin-left:42px;padding-left:42px}.grid1,.grid10,.grid10_3cols,.grid10_4cols,.grid11,.grid11_2cols,.grid11_3cols,.grid11_4cols,.grid12,.grid1_2cols,.grid1_3cols,.grid1_4cols,.grid2,.grid2_3cols,.grid2_4cols,.grid3,.grid3_2cols,.grid3_4cols,.grid4,.grid4_3cols,.grid5,.grid5_2cols,.grid5_3cols,.grid5_4cols,.grid6,.grid6_4cols,.grid7,.grid7_2cols,.grid7_3cols,.grid7_4cols,.grid8,.grid8_3cols,.grid9,.grid9_2cols,.grid9_4cols{display:inline;float:left;margin-left:15px;overflow:hidden}.grid1,.span-1,.width1{width:55px}.grid1_2cols,.width1_2cols{width:20px}.grid1_3cols,.width1_3cols{width:8px}.grid1_4cols,.width1_4cols{width:2px}.input_width1{width:49px}.grid2,.span-2,.width2{width:125px}.grid2_3cols,.width2_3cols{width:31px}.grid2_4cols,.width2_4cols{width:20px}.input_width2{width:119px}.grid3,.span-3,.width3{width:195px}.grid3_2cols,.width3_2cols{width:90px}.grid3_4cols,.width3_4cols{width:37px}.input_width3{width:189px}.grid4,.span-4,.width4{width:265px}.grid4_3cols,.width4_3cols{width:78px}.input_width4{width:259px}.grid5,.span-5,.width5{width:335px}.grid5_2cols,.width5_2cols{width:160px}.grid5_3cols,.width5_3cols{width:101px}.grid5_4cols,.width5_4cols{width:72px}.input_width5{width:329px}.grid6,.span-6,.width6{width:405px}.grid6_4cols,.width6_4cols{width:90px}.input_width6{width:399px}.grid7,.span-7,.width7{width:475px}.grid7_2cols,.width7_2cols{width:230px}.grid7_3cols,.width7_3cols{width:148px}.grid7_4cols,.width7_4cols{width:107px}.input_width7{width:469px}.grid8,.span-8,.width8{width:545px}.grid8_3cols,.width8_3cols{width:171px}.input_width8{width:539px}.grid9,.span-9,.width9{width:615px}.grid9_2cols,.width9_2cols{width:300px}.grid9_4cols,.width9_4cols{width:142px}.input_width9{width:609px}.grid10,.span-10,.width10{width:685px}.grid10_3cols,.width10_3cols{width:218px}.grid10_4cols,.width10_4cols{width:160px}.input_width10{width:679px}.grid11,.span-11,.width11{width:755px}.grid11_2cols,.width11_2cols{width:370px}.grid11_3cols,.width11_3cols{width:241px}.grid11_4cols,.width11_4cols{width:177px}.input_width11{width:749px}.grid12,.span-12,.width12{width:825px}.input_width12{width:819px}.emptycols_left1,.prepend-1{padding-left:70px}.append-1,.emptycols_right1{padding-right:70px}.emptycols_left2,.prepend-2{padding-left:140px}.append-2,.emptycols_right2{padding-right:140px}.emptycols_left3,.prepend-3{padding-left:210px}.append-3,.emptycols_right3{padding-right:210px}.emptycols_left4,.prepend-4{padding-left:280px}.append-4,.emptycols_right4{padding-right:280px}.emptycols_left5,.prepend-5{padding-left:350px}.append-5,.emptycols_right5{padding-right:350px}.emptycols_left6,.prepend-6{padding-left:420px}.append-6,.emptycols_right6{padding-right:420px}.emptycols_left7,.prepend-7{padding-left:490px}.append-7,.emptycols_right7{padding-right:490px}.emptycols_left8,.prepend-8{padding-left:560px}.append-8,.emptycols_right8{padding-right:560px}.emptycols_left9,.prepend-9{padding-left:630px}.append-9,.emptycols_right9{padding-right:630px}.emptycols_left10,.prepend-10{padding-left:700px}.append-10,.emptycols_right10{padding-right:700px}.emptycols_left11,.prepend-11{padding-left:770px}.append-11,.emptycols_right11{padding-right:770px}.pull-1{margin-left:-70px}.push-1{float:right;margin-left:18px;margin-right:-70px}.pull-2{margin-left:-140px}.push-2{float:right;margin-left:18px;margin-right:-140px}.pull-3{margin-left:-210px}.push-3{float:right;margin-left:18px;margin-right:-210px}.pull-4{margin-left:-280px}.push-4{float:right;margin-left:18px;margin-right:-280px}
|
||||
1
wwws/apx/src/static/fonts/texte/stylesheet.css
Normal file
@@ -0,0 +1 @@
|
||||
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on May 3, 2023 */@font-face{font-family:questrialregular;font-style:normal;font-weight:400;src:url(questrial-regular-webfont.woff2) format("woff2"),url(questrial-regular-webfont.woff) format("woff")}
|
||||
BIN
wwws/apx/src/static/fonts/texte/webfontkit-20230503-055110.zip
Normal file
BIN
wwws/apx/src/static/img/avatars/avatar-2.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
wwws/apx/src/static/img/avatars/avatar-3.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
wwws/apx/src/static/img/avatars/avatar-4.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
wwws/apx/src/static/img/avatars/avatar-5.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
wwws/apx/src/static/img/avatars/avatar.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
wwws/apx/src/static/img/icons/icon-48x48.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
wwws/apx/src/static/img/logo/favicon.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
wwws/apx/src/static/img/logo/favicondark.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
wwws/apx/src/static/img/logo/faviconlight.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
wwws/apx/src/static/img/logo/logobgdark.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
168
wwws/apx/src/static/img/logo/logobgdark.svg
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="74.422066mm"
|
||||
height="39.408447mm"
|
||||
viewBox="0 0 74.422066 39.408447"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||
sodipodi:docname="planchelogoapXtrib.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.3786088"
|
||||
inkscape:cx="429.03231"
|
||||
inkscape:cy="188.5556"
|
||||
inkscape:window-width="1868"
|
||||
inkscape:window-height="1141"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4281-6"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||
<inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4223-1-5"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipath_lpe_path-effect4281-6">
|
||||
<rect
|
||||
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||
id="rect12221"
|
||||
width="3.9103701"
|
||||
height="17.277628"
|
||||
x="72.929848"
|
||||
y="18.71629"
|
||||
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||
<path
|
||||
id="lpe_path-effect4281-6"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||
class="powerclip"
|
||||
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipath_lpe_path-effect4223-1-5">
|
||||
<rect
|
||||
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect12226"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="45.057877"
|
||||
y="13.160081"
|
||||
clip-path="none"
|
||||
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||
<path
|
||||
id="lpe_path-effect4223-1-5"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
class="powerclip"
|
||||
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-33.762223,-52.949721)">
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect12066-9"
|
||||
width="74.422066"
|
||||
height="39.408443"
|
||||
x="33.685085"
|
||||
y="52.371716" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:0.0159938;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect12066-6"
|
||||
width="74.422066"
|
||||
height="39.408443"
|
||||
x="33.762222"
|
||||
y="52.949718"
|
||||
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||
inkscape:export-xdpi="105.58897"
|
||||
inkscape:export-ydpi="105.58897" />
|
||||
<path
|
||||
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4221-6"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="45.057877"
|
||||
y="13.160081"
|
||||
clip-path="url(#clipath_lpe_path-effect4281-6)"
|
||||
inkscape:path-effect="#path-effect4281-6"
|
||||
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||
sodipodi:type="rect"
|
||||
transform="translate(0.7877763,47.235812)" />
|
||||
<path
|
||||
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4212-5-3"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="40.844711"
|
||||
y="9.2966976"
|
||||
clip-path="url(#clipath_lpe_path-effect4223-1-5)"
|
||||
inkscape:path-effect="#path-effect4223-1-5"
|
||||
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||
sodipodi:type="rect"
|
||||
transform="translate(1.2107703,47.421564)" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||
x="48.645107"
|
||||
y="76.664268"
|
||||
id="text168-9"
|
||||
inkscape:highlight-color="#2e7fc8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan166-4"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||
x="48.645107"
|
||||
y="76.664268"><tspan
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
id="tspan12445">ap</tspan><tspan
|
||||
style="fill:#ffc332;fill-opacity:1"
|
||||
id="tspan11889-8">X</tspan><tspan
|
||||
style="fill:#ffffff;fill-opacity:0.985099"
|
||||
id="tspan12341">trib</tspan></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||
x="54.550327"
|
||||
y="82.090439"
|
||||
id="text168-0-1"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan166-9-2"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;fill-opacity:1;stroke-width:0.264583"
|
||||
x="54.550327"
|
||||
y="82.090439">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.2 KiB |
BIN
wwws/apx/src/static/img/logo/logobglight.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
156
wwws/apx/src/static/img/logo/logobglight.svg
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="74.687065mm"
|
||||
height="39.673443mm"
|
||||
viewBox="0 0 74.687065 39.673443"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||
sodipodi:docname="planchelogoapXtrib.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.3786088"
|
||||
inkscape:cx="429.03231"
|
||||
inkscape:cy="188.5556"
|
||||
inkscape:window-width="1868"
|
||||
inkscape:window-height="1141"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4281"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath4219-7">
|
||||
<rect
|
||||
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4221-7"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="45.057877"
|
||||
y="13.160081"
|
||||
clip-path="none"
|
||||
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||
<path
|
||||
id="lpe_path-effect4223-1"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
class="powerclip"
|
||||
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||
</clipPath>
|
||||
<inkscape:path-effect
|
||||
effect="powerclip"
|
||||
id="path-effect4223-1"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
inverse="true"
|
||||
flatten="false"
|
||||
hide_clip="false"
|
||||
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath4277">
|
||||
<rect
|
||||
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||
id="rect4279"
|
||||
width="3.9103701"
|
||||
height="17.277628"
|
||||
x="72.929848"
|
||||
y="18.71629"
|
||||
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||
<path
|
||||
id="lpe_path-effect4281"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||
class="powerclip"
|
||||
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-32.764809,-5.0034045)">
|
||||
<path
|
||||
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4221"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="45.057877"
|
||||
y="13.160081"
|
||||
clip-path="url(#clipPath4277)"
|
||||
inkscape:path-effect="#path-effect4281"
|
||||
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||
sodipodi:type="rect" />
|
||||
<path
|
||||
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4212-5"
|
||||
width="29.109257"
|
||||
height="29.109257"
|
||||
x="40.844711"
|
||||
y="9.2966976"
|
||||
clip-path="url(#clipPath4219-7)"
|
||||
inkscape:path-effect="#path-effect4223-1"
|
||||
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||
sodipodi:type="rect"
|
||||
transform="translate(0.42299389,0.18575204)" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||
x="47.857334"
|
||||
y="29.428459"
|
||||
id="text168"
|
||||
inkscape:highlight-color="#2e7fc8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan166"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||
x="47.857334"
|
||||
y="29.428459">ap<tspan
|
||||
style="fill:#ffc332;fill-opacity:1"
|
||||
id="tspan11889">X</tspan>trib</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||
x="53.762562"
|
||||
y="34.85463"
|
||||
id="text168-0"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan166-9"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||
x="53.762562"
|
||||
y="34.85463">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect12066"
|
||||
width="74.422066"
|
||||
height="39.408443"
|
||||
x="32.897308"
|
||||
y="5.1359038"
|
||||
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||
inkscape:export-xdpi="105.58897"
|
||||
inkscape:export-ydpi="105.58897" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.6 KiB |
BIN
wwws/apx/src/static/img/logo/logocarredark.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
wwws/apx/src/static/img/logo/logocarrelight.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
wwws/apx/src/static/img/photos/unsplash-1.jpg
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
wwws/apx/src/static/img/photos/unsplash-2.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
wwws/apx/src/static/img/photos/unsplash-3.jpg
Normal file
|
After Width: | Height: | Size: 147 KiB |
3
wwws/apx/src/static/js/app.js
Normal file
514
wwws/apx/src/static/js/app.js.LICENSE.txt
Normal file
@@ -0,0 +1,514 @@
|
||||
/*!
|
||||
* Bootstrap v5.3.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
Copyright (c) 2016 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Chart.js v2.9.4
|
||||
* https://www.chartjs.org
|
||||
* (c) 2020 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
|
||||
/*! ../../internals/path */
|
||||
|
||||
/*! ../../modules/es.array.from */
|
||||
|
||||
/*! ../../modules/es.string.iterator */
|
||||
|
||||
/*! ../dist/icons.json */
|
||||
|
||||
/*! ../internals/a-function */
|
||||
|
||||
/*! ../internals/an-object */
|
||||
|
||||
/*! ../internals/array-from */
|
||||
|
||||
/*! ../internals/array-includes */
|
||||
|
||||
/*! ../internals/bind-context */
|
||||
|
||||
/*! ../internals/call-with-safe-iteration-closing */
|
||||
|
||||
/*! ../internals/check-correctness-of-iteration */
|
||||
|
||||
/*! ../internals/classof */
|
||||
|
||||
/*! ../internals/classof-raw */
|
||||
|
||||
/*! ../internals/copy-constructor-properties */
|
||||
|
||||
/*! ../internals/correct-prototype-getter */
|
||||
|
||||
/*! ../internals/create-iterator-constructor */
|
||||
|
||||
/*! ../internals/create-property */
|
||||
|
||||
/*! ../internals/create-property-descriptor */
|
||||
|
||||
/*! ../internals/define-iterator */
|
||||
|
||||
/*! ../internals/descriptors */
|
||||
|
||||
/*! ../internals/document-create-element */
|
||||
|
||||
/*! ../internals/enum-bug-keys */
|
||||
|
||||
/*! ../internals/export */
|
||||
|
||||
/*! ../internals/fails */
|
||||
|
||||
/*! ../internals/function-to-string */
|
||||
|
||||
/*! ../internals/get-iterator-method */
|
||||
|
||||
/*! ../internals/global */
|
||||
|
||||
/*! ../internals/has */
|
||||
|
||||
/*! ../internals/hidden-keys */
|
||||
|
||||
/*! ../internals/hide */
|
||||
|
||||
/*! ../internals/html */
|
||||
|
||||
/*! ../internals/ie8-dom-define */
|
||||
|
||||
/*! ../internals/indexed-object */
|
||||
|
||||
/*! ../internals/internal-state */
|
||||
|
||||
/*! ../internals/is-array-iterator-method */
|
||||
|
||||
/*! ../internals/is-forced */
|
||||
|
||||
/*! ../internals/is-object */
|
||||
|
||||
/*! ../internals/is-pure */
|
||||
|
||||
/*! ../internals/iterators */
|
||||
|
||||
/*! ../internals/iterators-core */
|
||||
|
||||
/*! ../internals/native-symbol */
|
||||
|
||||
/*! ../internals/native-weak-map */
|
||||
|
||||
/*! ../internals/object-create */
|
||||
|
||||
/*! ../internals/object-define-properties */
|
||||
|
||||
/*! ../internals/object-define-property */
|
||||
|
||||
/*! ../internals/object-get-own-property-descriptor */
|
||||
|
||||
/*! ../internals/object-get-own-property-names */
|
||||
|
||||
/*! ../internals/object-get-own-property-symbols */
|
||||
|
||||
/*! ../internals/object-get-prototype-of */
|
||||
|
||||
/*! ../internals/object-keys */
|
||||
|
||||
/*! ../internals/object-keys-internal */
|
||||
|
||||
/*! ../internals/object-property-is-enumerable */
|
||||
|
||||
/*! ../internals/object-set-prototype-of */
|
||||
|
||||
/*! ../internals/own-keys */
|
||||
|
||||
/*! ../internals/redefine */
|
||||
|
||||
/*! ../internals/require-object-coercible */
|
||||
|
||||
/*! ../internals/set-global */
|
||||
|
||||
/*! ../internals/set-to-string-tag */
|
||||
|
||||
/*! ../internals/shared */
|
||||
|
||||
/*! ../internals/shared-key */
|
||||
|
||||
/*! ../internals/string-at */
|
||||
|
||||
/*! ../internals/to-absolute-index */
|
||||
|
||||
/*! ../internals/to-indexed-object */
|
||||
|
||||
/*! ../internals/to-integer */
|
||||
|
||||
/*! ../internals/to-length */
|
||||
|
||||
/*! ../internals/to-object */
|
||||
|
||||
/*! ../internals/to-primitive */
|
||||
|
||||
/*! ../internals/uid */
|
||||
|
||||
/*! ../internals/validate-set-prototype-of-arguments */
|
||||
|
||||
/*! ../internals/well-known-symbol */
|
||||
|
||||
/*! ./../../webpack/buildin/global.js */
|
||||
|
||||
/*! ./default-attrs.json */
|
||||
|
||||
/*! ./icon */
|
||||
|
||||
/*! ./icons */
|
||||
|
||||
/*! ./replace */
|
||||
|
||||
/*! ./tags.json */
|
||||
|
||||
/*! ./to-svg */
|
||||
|
||||
/*! /home/runner/work/feather/feather/src/index.js */
|
||||
|
||||
/*! classnames/dedupe */
|
||||
|
||||
/*! core-js/es/array/from */
|
||||
|
||||
/*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, aperture, archive, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, award, bar-chart-2, bar-chart, battery-charging, battery, bell-off, bell, bluetooth, bold, book-open, book, bookmark, box, briefcase, calendar, camera-off, camera, cast, check-circle, check-square, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, chrome, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-off, cloud-rain, cloud-snow, cloud, code, codepen, codesandbox, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, divide-circle, divide-square, divide, dollar-sign, download-cloud, download, dribbble, droplet, edit-2, edit-3, edit, external-link, eye-off, eye, facebook, fast-forward, feather, figma, file-minus, file-plus, file-text, file, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, grid, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, info, instagram, italic, key, layers, layout, life-buoy, link-2, link, linkedin, list, loader, lock, log-in, log-out, mail, map-pin, map, maximize-2, maximize, meh, menu, message-circle, message-square, mic-off, mic, minimize-2, minimize, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation-2, navigation, octagon, package, paperclip, pause-circle, pause, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, pie-chart, play-circle, play, plus-circle, plus-square, plus, pocket, power, printer, radio, refresh-ccw, refresh-cw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, server, settings, share-2, share, shield-off, shield, shopping-bag, shopping-cart, shuffle, sidebar, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, square, star, stop-circle, sun, sunrise, sunset, table, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash-2, trash, trello, trending-down, trending-up, triangle, truck, tv, twitch, twitter, type, umbrella, underline, unlock, upload-cloud, upload, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume-1, volume-2, volume-x, volume, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */
|
||||
|
||||
/*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-bouy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */
|
||||
|
||||
/*! exports provided: xmlns, width, height, viewBox, fill, stroke, stroke-width, stroke-linecap, stroke-linejoin, default */
|
||||
|
||||
/*! no static exports found */
|
||||
|
||||
/*!*********************!*\
|
||||
!*** ./src/icon.js ***!
|
||||
\*********************/
|
||||
|
||||
/*!**********************!*\
|
||||
!*** ./src/icons.js ***!
|
||||
\**********************/
|
||||
|
||||
/*!**********************!*\
|
||||
!*** ./src/index.js ***!
|
||||
\**********************/
|
||||
|
||||
/*!***********************!*\
|
||||
!*** ./src/tags.json ***!
|
||||
\***********************/
|
||||
|
||||
/*!***********************!*\
|
||||
!*** ./src/to-svg.js ***!
|
||||
\***********************/
|
||||
|
||||
/*!************************!*\
|
||||
!*** ./src/replace.js ***!
|
||||
\************************/
|
||||
|
||||
/*!*************************!*\
|
||||
!*** ./dist/icons.json ***!
|
||||
\*************************/
|
||||
|
||||
/*!********************************!*\
|
||||
!*** ./src/default-attrs.json ***!
|
||||
\********************************/
|
||||
|
||||
/*!***********************************!*\
|
||||
!*** (webpack)/buildin/global.js ***!
|
||||
\***********************************/
|
||||
|
||||
/*!*******************************************!*\
|
||||
!*** ./node_modules/classnames/dedupe.js ***!
|
||||
\*******************************************/
|
||||
|
||||
/*!***********************************************!*\
|
||||
!*** ./node_modules/core-js/es/array/from.js ***!
|
||||
\***********************************************/
|
||||
|
||||
/*!***********************************************!*\
|
||||
!*** ./node_modules/core-js/internals/has.js ***!
|
||||
\***********************************************/
|
||||
|
||||
/*!***********************************************!*\
|
||||
!*** ./node_modules/core-js/internals/uid.js ***!
|
||||
\***********************************************/
|
||||
|
||||
/*!************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/hide.js ***!
|
||||
\************************************************/
|
||||
|
||||
/*!************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/html.js ***!
|
||||
\************************************************/
|
||||
|
||||
/*!************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/path.js ***!
|
||||
\************************************************/
|
||||
|
||||
/*!*************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/fails.js ***!
|
||||
\*************************************************/
|
||||
|
||||
/*!**************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/export.js ***!
|
||||
\**************************************************/
|
||||
|
||||
/*!**************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/global.js ***!
|
||||
\**************************************************/
|
||||
|
||||
/*!**************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/shared.js ***!
|
||||
\**************************************************/
|
||||
|
||||
/*!**************************************************!*\
|
||||
!*** multi core-js/es/array/from ./src/index.js ***!
|
||||
\**************************************************/
|
||||
|
||||
/*!***************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/classof.js ***!
|
||||
\***************************************************/
|
||||
|
||||
/*!***************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/is-pure.js ***!
|
||||
\***************************************************/
|
||||
|
||||
/*!****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/own-keys.js ***!
|
||||
\****************************************************/
|
||||
|
||||
/*!****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/redefine.js ***!
|
||||
\****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/an-object.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/is-forced.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/is-object.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/iterators.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/string-at.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-length.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-object.js ***!
|
||||
\*****************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/a-function.js ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/array-from.js ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/set-global.js ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/shared-key.js ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-integer.js ***!
|
||||
\******************************************************/
|
||||
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/classof-raw.js ***!
|
||||
\*******************************************************/
|
||||
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/descriptors.js ***!
|
||||
\*******************************************************/
|
||||
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
|
||||
\*******************************************************/
|
||||
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-keys.js ***!
|
||||
\*******************************************************/
|
||||
|
||||
/*!*******************************************************!*\
|
||||
!*** ./node_modules/core-js/modules/es.array.from.js ***!
|
||||
\*******************************************************/
|
||||
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/bind-context.js ***!
|
||||
\********************************************************/
|
||||
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-primitive.js ***!
|
||||
\********************************************************/
|
||||
|
||||
/*!*********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
|
||||
\*********************************************************/
|
||||
|
||||
/*!*********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/native-symbol.js ***!
|
||||
\*********************************************************/
|
||||
|
||||
/*!*********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-create.js ***!
|
||||
\*********************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/array-includes.js ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/indexed-object.js ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/internal-state.js ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/iterators-core.js ***!
|
||||
\**********************************************************/
|
||||
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/create-property.js ***!
|
||||
\***********************************************************/
|
||||
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/define-iterator.js ***!
|
||||
\***********************************************************/
|
||||
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/native-weak-map.js ***!
|
||||
\***********************************************************/
|
||||
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/core-js/modules/es.string.iterator.js ***!
|
||||
\************************************************************/
|
||||
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
|
||||
\*************************************************************/
|
||||
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-absolute-index.js ***!
|
||||
\*************************************************************/
|
||||
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/to-indexed-object.js ***!
|
||||
\*************************************************************/
|
||||
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/well-known-symbol.js ***!
|
||||
\*************************************************************/
|
||||
|
||||
/*!**************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/function-to-string.js ***!
|
||||
\**************************************************************/
|
||||
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/get-iterator-method.js ***!
|
||||
\***************************************************************/
|
||||
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-keys-internal.js ***!
|
||||
\****************************************************************/
|
||||
|
||||
/*!******************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-define-property.js ***!
|
||||
\******************************************************************/
|
||||
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/document-create-element.js ***!
|
||||
\*******************************************************************/
|
||||
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
|
||||
\*******************************************************************/
|
||||
|
||||
/*!*******************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
|
||||
\*******************************************************************/
|
||||
|
||||
/*!********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
|
||||
\********************************************************************/
|
||||
|
||||
/*!********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
|
||||
\********************************************************************/
|
||||
|
||||
/*!********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-define-properties.js ***!
|
||||
\********************************************************************/
|
||||
|
||||
/*!********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
|
||||
\********************************************************************/
|
||||
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
|
||||
\**********************************************************************/
|
||||
|
||||
/*!***********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
|
||||
\***********************************************************************/
|
||||
|
||||
/*!***********************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
|
||||
\***********************************************************************/
|
||||
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
|
||||
\*************************************************************************/
|
||||
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
|
||||
\*************************************************************************/
|
||||
|
||||
/*!**************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
|
||||
\**************************************************************************/
|
||||
|
||||
/*!***************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
|
||||
\***************************************************************************/
|
||||
|
||||
/*!****************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
|
||||
\****************************************************************************/
|
||||
|
||||
/*!******************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
|
||||
\******************************************************************************/
|
||||
|
||||
/*!*******************************************************************************!*\
|
||||
!*** ./node_modules/core-js/internals/validate-set-prototype-of-arguments.js ***!
|
||||
\*******************************************************************************/
|
||||
|
||||
//! moment.js
|
||||
|
||||
//! moment.js locale configuration
|
||||
1
wwws/apx/src/static/js/app.js.map
Normal file
1064
wwws/apx/src/static/lib/ASUPappbuilder/js/apx.js
Normal file
2
wwws/apx/src/static/lib/axios/dist/axios.min.js
vendored
Normal file
5
wwws/apx/src/static/lib/bootstrap-icons/font/bootstrap-icons.min.css
vendored
Normal file
7
wwws/apx/src/static/lib/bootstrap/dist/js/bootstrap.bundle.min.js
vendored
Normal file
344
wwws/apx/src/static/lib/codemirror/codemirror.css
Normal file
@@ -0,0 +1,344 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-line::selection,
|
||||
.cm-fat-cursor .CodeMirror-line > span::selection,
|
||||
.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }
|
||||
.cm-fat-cursor .CodeMirror-line::-moz-selection,
|
||||
.cm-fat-cursor .CodeMirror-line > span::-moz-selection,
|
||||
.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }
|
||||
.cm-fat-cursor { caret-color: transparent; }
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 50px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -50px; margin-right: -50px;
|
||||
padding-bottom: 50px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 50px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
outline: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -50px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre.CodeMirror-line,
|
||||
.CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
9884
wwws/apx/src/static/lib/codemirror/codemirror.js
Normal file
862
wwws/apx/src/static/lib/codemirror/css/css.js
Normal file
@@ -0,0 +1,862 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("css", function(config, parserConfig) {
|
||||
var inline = parserConfig.inline
|
||||
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
|
||||
|
||||
var indentUnit = config.indentUnit,
|
||||
tokenHooks = parserConfig.tokenHooks,
|
||||
documentTypes = parserConfig.documentTypes || {},
|
||||
mediaTypes = parserConfig.mediaTypes || {},
|
||||
mediaFeatures = parserConfig.mediaFeatures || {},
|
||||
mediaValueKeywords = parserConfig.mediaValueKeywords || {},
|
||||
propertyKeywords = parserConfig.propertyKeywords || {},
|
||||
nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
|
||||
fontProperties = parserConfig.fontProperties || {},
|
||||
counterDescriptors = parserConfig.counterDescriptors || {},
|
||||
colorKeywords = parserConfig.colorKeywords || {},
|
||||
valueKeywords = parserConfig.valueKeywords || {},
|
||||
allowNested = parserConfig.allowNested,
|
||||
lineComment = parserConfig.lineComment,
|
||||
supportsAtComponent = parserConfig.supportsAtComponent === true,
|
||||
highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
|
||||
|
||||
var type, override;
|
||||
function ret(style, tp) { type = tp; return style; }
|
||||
|
||||
// Tokenizers
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (tokenHooks[ch]) {
|
||||
var result = tokenHooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
if (ch == "@") {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("def", stream.current());
|
||||
} else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
|
||||
return ret(null, "compare");
|
||||
} else if (ch == "\"" || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "#") {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("atom", "hash");
|
||||
} else if (ch == "!") {
|
||||
stream.match(/^\s*\w*/);
|
||||
return ret("keyword", "important");
|
||||
} else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
|
||||
stream.eatWhile(/[\w.%]/);
|
||||
return ret("number", "unit");
|
||||
} else if (ch === "-") {
|
||||
if (/[\d.]/.test(stream.peek())) {
|
||||
stream.eatWhile(/[\w.%]/);
|
||||
return ret("number", "unit");
|
||||
} else if (stream.match(/^-[\w\\\-]*/)) {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ret("variable-2", "variable-definition");
|
||||
return ret("variable-2", "variable");
|
||||
} else if (stream.match(/^\w+-/)) {
|
||||
return ret("meta", "meta");
|
||||
}
|
||||
} else if (/[,+>*\/]/.test(ch)) {
|
||||
return ret(null, "select-op");
|
||||
} else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
|
||||
return ret("qualifier", "qualifier");
|
||||
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
||||
return ret(null, ch);
|
||||
} else if (stream.match(/^[\w-.]+(?=\()/)) {
|
||||
if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
|
||||
state.tokenize = tokenParenthesized;
|
||||
}
|
||||
return ret("variable callee", "variable");
|
||||
} else if (/[\w\\\-]/.test(ch)) {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("property", "word");
|
||||
} else {
|
||||
return ret(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == quote && !escaped) {
|
||||
if (quote == ")") stream.backUp(1);
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && ch == "\\";
|
||||
}
|
||||
if (ch == quote || !escaped && quote != ")") state.tokenize = null;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenParenthesized(stream, state) {
|
||||
stream.next(); // Must be '('
|
||||
if (!stream.match(/^\s*[\"\')]/, false))
|
||||
state.tokenize = tokenString(")");
|
||||
else
|
||||
state.tokenize = null;
|
||||
return ret(null, "(");
|
||||
}
|
||||
|
||||
// Context management
|
||||
|
||||
function Context(type, indent, prev) {
|
||||
this.type = type;
|
||||
this.indent = indent;
|
||||
this.prev = prev;
|
||||
}
|
||||
|
||||
function pushContext(state, stream, type, indent) {
|
||||
state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
|
||||
return type;
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
if (state.context.prev)
|
||||
state.context = state.context.prev;
|
||||
return state.context.type;
|
||||
}
|
||||
|
||||
function pass(type, stream, state) {
|
||||
return states[state.context.type](type, stream, state);
|
||||
}
|
||||
function popAndPass(type, stream, state, n) {
|
||||
for (var i = n || 1; i > 0; i--)
|
||||
state.context = state.context.prev;
|
||||
return pass(type, stream, state);
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
function wordAsValue(stream) {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (valueKeywords.hasOwnProperty(word))
|
||||
override = "atom";
|
||||
else if (colorKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else
|
||||
override = "variable";
|
||||
}
|
||||
|
||||
var states = {};
|
||||
|
||||
states.top = function(type, stream, state) {
|
||||
if (type == "{") {
|
||||
return pushContext(state, stream, "block");
|
||||
} else if (type == "}" && state.context.prev) {
|
||||
return popContext(state);
|
||||
} else if (supportsAtComponent && /@component/i.test(type)) {
|
||||
return pushContext(state, stream, "atComponentBlock");
|
||||
} else if (/^@(-moz-)?document$/i.test(type)) {
|
||||
return pushContext(state, stream, "documentTypes");
|
||||
} else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
|
||||
return pushContext(state, stream, "atBlock");
|
||||
} else if (/^@(font-face|counter-style)/i.test(type)) {
|
||||
state.stateArg = type;
|
||||
return "restricted_atBlock_before";
|
||||
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
|
||||
return "keyframes";
|
||||
} else if (type && type.charAt(0) == "@") {
|
||||
return pushContext(state, stream, "at");
|
||||
} else if (type == "hash") {
|
||||
override = "builtin";
|
||||
} else if (type == "word") {
|
||||
override = "tag";
|
||||
} else if (type == "variable-definition") {
|
||||
return "maybeprop";
|
||||
} else if (type == "interpolation") {
|
||||
return pushContext(state, stream, "interpolation");
|
||||
} else if (type == ":") {
|
||||
return "pseudo";
|
||||
} else if (allowNested && type == "(") {
|
||||
return pushContext(state, stream, "parens");
|
||||
}
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.block = function(type, stream, state) {
|
||||
if (type == "word") {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (propertyKeywords.hasOwnProperty(word)) {
|
||||
override = "property";
|
||||
return "maybeprop";
|
||||
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
|
||||
override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
|
||||
return "maybeprop";
|
||||
} else if (allowNested) {
|
||||
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
|
||||
return "block";
|
||||
} else {
|
||||
override += " error";
|
||||
return "maybeprop";
|
||||
}
|
||||
} else if (type == "meta") {
|
||||
return "block";
|
||||
} else if (!allowNested && (type == "hash" || type == "qualifier")) {
|
||||
override = "error";
|
||||
return "block";
|
||||
} else {
|
||||
return states.top(type, stream, state);
|
||||
}
|
||||
};
|
||||
|
||||
states.maybeprop = function(type, stream, state) {
|
||||
if (type == ":") return pushContext(state, stream, "prop");
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.prop = function(type, stream, state) {
|
||||
if (type == ";") return popContext(state);
|
||||
if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
|
||||
if (type == "}" || type == "{") return popAndPass(type, stream, state);
|
||||
if (type == "(") return pushContext(state, stream, "parens");
|
||||
|
||||
if (type == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {
|
||||
override += " error";
|
||||
} else if (type == "word") {
|
||||
wordAsValue(stream);
|
||||
} else if (type == "interpolation") {
|
||||
return pushContext(state, stream, "interpolation");
|
||||
}
|
||||
return "prop";
|
||||
};
|
||||
|
||||
states.propBlock = function(type, _stream, state) {
|
||||
if (type == "}") return popContext(state);
|
||||
if (type == "word") { override = "property"; return "maybeprop"; }
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.parens = function(type, stream, state) {
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
||||
if (type == ")") return popContext(state);
|
||||
if (type == "(") return pushContext(state, stream, "parens");
|
||||
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
||||
if (type == "word") wordAsValue(stream);
|
||||
return "parens";
|
||||
};
|
||||
|
||||
states.pseudo = function(type, stream, state) {
|
||||
if (type == "meta") return "pseudo";
|
||||
|
||||
if (type == "word") {
|
||||
override = "variable-3";
|
||||
return state.context.type;
|
||||
}
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.documentTypes = function(type, stream, state) {
|
||||
if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
|
||||
override = "tag";
|
||||
return state.context.type;
|
||||
} else {
|
||||
return states.atBlock(type, stream, state);
|
||||
}
|
||||
};
|
||||
|
||||
states.atBlock = function(type, stream, state) {
|
||||
if (type == "(") return pushContext(state, stream, "atBlock_parens");
|
||||
if (type == "}" || type == ";") return popAndPass(type, stream, state);
|
||||
if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
|
||||
|
||||
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
||||
|
||||
if (type == "word") {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (word == "only" || word == "not" || word == "and" || word == "or")
|
||||
override = "keyword";
|
||||
else if (mediaTypes.hasOwnProperty(word))
|
||||
override = "attribute";
|
||||
else if (mediaFeatures.hasOwnProperty(word))
|
||||
override = "property";
|
||||
else if (mediaValueKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else if (propertyKeywords.hasOwnProperty(word))
|
||||
override = "property";
|
||||
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
||||
override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
|
||||
else if (valueKeywords.hasOwnProperty(word))
|
||||
override = "atom";
|
||||
else if (colorKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else
|
||||
override = "error";
|
||||
}
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.atComponentBlock = function(type, stream, state) {
|
||||
if (type == "}")
|
||||
return popAndPass(type, stream, state);
|
||||
if (type == "{")
|
||||
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
|
||||
if (type == "word")
|
||||
override = "error";
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.atBlock_parens = function(type, stream, state) {
|
||||
if (type == ")") return popContext(state);
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
|
||||
return states.atBlock(type, stream, state);
|
||||
};
|
||||
|
||||
states.restricted_atBlock_before = function(type, stream, state) {
|
||||
if (type == "{")
|
||||
return pushContext(state, stream, "restricted_atBlock");
|
||||
if (type == "word" && state.stateArg == "@counter-style") {
|
||||
override = "variable";
|
||||
return "restricted_atBlock_before";
|
||||
}
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.restricted_atBlock = function(type, stream, state) {
|
||||
if (type == "}") {
|
||||
state.stateArg = null;
|
||||
return popContext(state);
|
||||
}
|
||||
if (type == "word") {
|
||||
if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
|
||||
(state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
|
||||
override = "error";
|
||||
else
|
||||
override = "property";
|
||||
return "maybeprop";
|
||||
}
|
||||
return "restricted_atBlock";
|
||||
};
|
||||
|
||||
states.keyframes = function(type, stream, state) {
|
||||
if (type == "word") { override = "variable"; return "keyframes"; }
|
||||
if (type == "{") return pushContext(state, stream, "top");
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.at = function(type, stream, state) {
|
||||
if (type == ";") return popContext(state);
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
||||
if (type == "word") override = "tag";
|
||||
else if (type == "hash") override = "builtin";
|
||||
return "at";
|
||||
};
|
||||
|
||||
states.interpolation = function(type, stream, state) {
|
||||
if (type == "}") return popContext(state);
|
||||
if (type == "{" || type == ";") return popAndPass(type, stream, state);
|
||||
if (type == "word") override = "variable";
|
||||
else if (type != "variable" && type != "(" && type != ")") override = "error";
|
||||
return "interpolation";
|
||||
};
|
||||
|
||||
return {
|
||||
startState: function(base) {
|
||||
return {tokenize: null,
|
||||
state: inline ? "block" : "top",
|
||||
stateArg: null,
|
||||
context: new Context(inline ? "block" : "top", base || 0, null)};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (!state.tokenize && stream.eatSpace()) return null;
|
||||
var style = (state.tokenize || tokenBase)(stream, state);
|
||||
if (style && typeof style == "object") {
|
||||
type = style[1];
|
||||
style = style[0];
|
||||
}
|
||||
override = style;
|
||||
if (type != "comment")
|
||||
state.state = states[state.state](type, stream, state);
|
||||
return override;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
var cx = state.context, ch = textAfter && textAfter.charAt(0);
|
||||
var indent = cx.indent;
|
||||
if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
|
||||
if (cx.prev) {
|
||||
if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
|
||||
cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
|
||||
// Resume indentation from parent context.
|
||||
cx = cx.prev;
|
||||
indent = cx.indent;
|
||||
} else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
|
||||
ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
|
||||
// Dedent relative to current context.
|
||||
indent = Math.max(0, cx.indent - indentUnit);
|
||||
}
|
||||
}
|
||||
return indent;
|
||||
},
|
||||
|
||||
electricChars: "}",
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
blockCommentContinue: " * ",
|
||||
lineComment: lineComment,
|
||||
fold: "brace"
|
||||
};
|
||||
});
|
||||
|
||||
function keySet(array) {
|
||||
var keys = {};
|
||||
for (var i = 0; i < array.length; ++i) {
|
||||
keys[array[i].toLowerCase()] = true;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
var documentTypes_ = [
|
||||
"domain", "regexp", "url", "url-prefix"
|
||||
], documentTypes = keySet(documentTypes_);
|
||||
|
||||
var mediaTypes_ = [
|
||||
"all", "aural", "braille", "handheld", "print", "projection", "screen",
|
||||
"tty", "tv", "embossed"
|
||||
], mediaTypes = keySet(mediaTypes_);
|
||||
|
||||
var mediaFeatures_ = [
|
||||
"width", "min-width", "max-width", "height", "min-height", "max-height",
|
||||
"device-width", "min-device-width", "max-device-width", "device-height",
|
||||
"min-device-height", "max-device-height", "aspect-ratio",
|
||||
"min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
|
||||
"min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
|
||||
"max-color", "color-index", "min-color-index", "max-color-index",
|
||||
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
||||
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
||||
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
||||
"pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
|
||||
"dynamic-range", "video-dynamic-range"
|
||||
], mediaFeatures = keySet(mediaFeatures_);
|
||||
|
||||
var mediaValueKeywords_ = [
|
||||
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
||||
"interlace", "progressive",
|
||||
"dark", "light",
|
||||
"standard", "high"
|
||||
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
||||
|
||||
var propertyKeywords_ = [
|
||||
"align-content", "align-items", "align-self", "alignment-adjust",
|
||||
"alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
|
||||
"animation-direction", "animation-duration", "animation-fill-mode",
|
||||
"animation-iteration-count", "animation-name", "animation-play-state",
|
||||
"animation-timing-function", "appearance", "azimuth", "backdrop-filter",
|
||||
"backface-visibility", "background", "background-attachment",
|
||||
"background-blend-mode", "background-clip", "background-color",
|
||||
"background-image", "background-origin", "background-position",
|
||||
"background-position-x", "background-position-y", "background-repeat",
|
||||
"background-size", "baseline-shift", "binding", "bleed", "block-size",
|
||||
"bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
|
||||
"border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
|
||||
"border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
|
||||
"border-collapse", "border-color", "border-image", "border-image-outset",
|
||||
"border-image-repeat", "border-image-slice", "border-image-source",
|
||||
"border-image-width", "border-left", "border-left-color", "border-left-style",
|
||||
"border-left-width", "border-radius", "border-right", "border-right-color",
|
||||
"border-right-style", "border-right-width", "border-spacing", "border-style",
|
||||
"border-top", "border-top-color", "border-top-left-radius",
|
||||
"border-top-right-radius", "border-top-style", "border-top-width",
|
||||
"border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
|
||||
"break-after", "break-before", "break-inside", "caption-side", "caret-color",
|
||||
"clear", "clip", "color", "color-profile", "column-count", "column-fill",
|
||||
"column-gap", "column-rule", "column-rule-color", "column-rule-style",
|
||||
"column-rule-width", "column-span", "column-width", "columns", "contain",
|
||||
"content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
|
||||
"cue-before", "cursor", "direction", "display", "dominant-baseline",
|
||||
"drop-initial-after-adjust", "drop-initial-after-align",
|
||||
"drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
|
||||
"drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
|
||||
"flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
|
||||
"flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
|
||||
"font", "font-family", "font-feature-settings", "font-kerning",
|
||||
"font-language-override", "font-optical-sizing", "font-size",
|
||||
"font-size-adjust", "font-stretch", "font-style", "font-synthesis",
|
||||
"font-variant", "font-variant-alternates", "font-variant-caps",
|
||||
"font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
|
||||
"font-variant-position", "font-variation-settings", "font-weight", "gap",
|
||||
"grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
|
||||
"grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
|
||||
"grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
|
||||
"grid-template", "grid-template-areas", "grid-template-columns",
|
||||
"grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
|
||||
"image-orientation", "image-rendering", "image-resolution", "inline-box-align",
|
||||
"inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
|
||||
"inset-inline-end", "inset-inline-start", "isolation", "justify-content",
|
||||
"justify-items", "justify-self", "left", "letter-spacing", "line-break",
|
||||
"line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
|
||||
"line-stacking-shift", "line-stacking-strategy", "list-style",
|
||||
"list-style-image", "list-style-position", "list-style-type", "margin",
|
||||
"margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
|
||||
"marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
|
||||
"marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
|
||||
"mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
|
||||
"max-block-size", "max-height", "max-inline-size",
|
||||
"max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
|
||||
"mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
|
||||
"nav-up", "object-fit", "object-position", "offset", "offset-anchor",
|
||||
"offset-distance", "offset-path", "offset-position", "offset-rotate",
|
||||
"opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
|
||||
"outline-style", "outline-width", "overflow", "overflow-style",
|
||||
"overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
|
||||
"padding-left", "padding-right", "padding-top", "page", "page-break-after",
|
||||
"page-break-before", "page-break-inside", "page-policy", "pause",
|
||||
"pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
|
||||
"pitch-range", "place-content", "place-items", "place-self", "play-during",
|
||||
"position", "presentation-level", "punctuation-trim", "quotes",
|
||||
"region-break-after", "region-break-before", "region-break-inside",
|
||||
"region-fragment", "rendering-intent", "resize", "rest", "rest-after",
|
||||
"rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
|
||||
"row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
|
||||
"scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
|
||||
"scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
|
||||
"scroll-margin-inline", "scroll-margin-inline-end",
|
||||
"scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
|
||||
"scroll-margin-top", "scroll-padding", "scroll-padding-block",
|
||||
"scroll-padding-block-end", "scroll-padding-block-start",
|
||||
"scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
|
||||
"scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
|
||||
"scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
|
||||
"shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
|
||||
"size", "speak", "speak-as", "speak-header", "speak-numeral",
|
||||
"speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
|
||||
"table-layout", "target", "target-name", "target-new", "target-position",
|
||||
"text-align", "text-align-last", "text-combine-upright", "text-decoration",
|
||||
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
|
||||
"text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
|
||||
"text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
|
||||
"text-height", "text-indent", "text-justify", "text-orientation",
|
||||
"text-outline", "text-overflow", "text-rendering", "text-shadow",
|
||||
"text-size-adjust", "text-space-collapse", "text-transform",
|
||||
"text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
|
||||
"transform-style", "transition", "transition-delay", "transition-duration",
|
||||
"transition-property", "transition-timing-function", "translate",
|
||||
"unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
|
||||
"voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
|
||||
"voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
|
||||
"will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
|
||||
// SVG-specific
|
||||
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
|
||||
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
||||
"color-interpolation", "color-interpolation-filters",
|
||||
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
||||
"marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
|
||||
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
||||
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
||||
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
||||
"glyph-orientation-vertical", "text-anchor", "writing-mode",
|
||||
], propertyKeywords = keySet(propertyKeywords_);
|
||||
|
||||
var nonStandardPropertyKeywords_ = [
|
||||
"accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
|
||||
"border-block-end-color", "border-block-end-style", "border-block-end-width",
|
||||
"border-block-start", "border-block-start-color", "border-block-start-style",
|
||||
"border-block-start-width", "border-block-style", "border-block-width",
|
||||
"border-inline", "border-inline-color", "border-inline-end",
|
||||
"border-inline-end-color", "border-inline-end-style",
|
||||
"border-inline-end-width", "border-inline-start", "border-inline-start-color",
|
||||
"border-inline-start-style", "border-inline-start-width",
|
||||
"border-inline-style", "border-inline-width", "content-visibility", "margin-block",
|
||||
"margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
|
||||
"margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
|
||||
"padding-block-start", "padding-inline", "padding-inline-end",
|
||||
"padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
|
||||
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
|
||||
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
|
||||
"scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
|
||||
"searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
|
||||
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
|
||||
|
||||
var fontProperties_ = [
|
||||
"font-display", "font-family", "src", "unicode-range", "font-variant",
|
||||
"font-feature-settings", "font-stretch", "font-weight", "font-style"
|
||||
], fontProperties = keySet(fontProperties_);
|
||||
|
||||
var counterDescriptors_ = [
|
||||
"additive-symbols", "fallback", "negative", "pad", "prefix", "range",
|
||||
"speak-as", "suffix", "symbols", "system"
|
||||
], counterDescriptors = keySet(counterDescriptors_);
|
||||
|
||||
var colorKeywords_ = [
|
||||
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
|
||||
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
||||
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
||||
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
||||
"darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
|
||||
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
||||
"darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
|
||||
"deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
|
||||
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
||||
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
||||
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
||||
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
||||
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
|
||||
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
|
||||
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
||||
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
||||
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
||||
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
|
||||
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
|
||||
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
|
||||
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
||||
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
||||
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
||||
"slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
|
||||
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
||||
"whitesmoke", "yellow", "yellowgreen"
|
||||
], colorKeywords = keySet(colorKeywords_);
|
||||
|
||||
var valueKeywords_ = [
|
||||
"above", "absolute", "activeborder", "additive", "activecaption", "afar",
|
||||
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
||||
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
||||
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
|
||||
"avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
||||
"bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
|
||||
"both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button",
|
||||
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
||||
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
|
||||
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
|
||||
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
|
||||
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
|
||||
"compact", "condensed", "conic-gradient", "contain", "content", "contents",
|
||||
"content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
|
||||
"cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
||||
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
|
||||
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
||||
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
||||
"dot-dash", "dot-dot-dash",
|
||||
"dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
||||
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
|
||||
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
|
||||
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
|
||||
"ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
|
||||
"ethiopic-halehame-gez", "ethiopic-halehame-om-et",
|
||||
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
||||
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
||||
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
||||
"extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
||||
"forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
|
||||
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
||||
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
||||
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
|
||||
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
||||
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
||||
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
|
||||
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
||||
"katakana", "katakana-iroha", "keep-all", "khmer",
|
||||
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
||||
"landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
|
||||
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
||||
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
||||
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
||||
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
|
||||
"media-play-button", "media-slider", "media-sliderthumb",
|
||||
"media-volume-slider", "media-volume-sliderthumb", "medium",
|
||||
"menu", "menulist", "menulist-button",
|
||||
"menutext", "message-box", "middle", "min-intrinsic",
|
||||
"mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
|
||||
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
||||
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
||||
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
|
||||
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
||||
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
||||
"painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
|
||||
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
||||
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
||||
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
||||
"relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",
|
||||
"repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
||||
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
|
||||
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
|
||||
"s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
|
||||
"scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
|
||||
"searchfield-cancel-button", "searchfield-decoration",
|
||||
"searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
|
||||
"semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
|
||||
"simp-chinese-formal", "simp-chinese-informal", "single",
|
||||
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
||||
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
||||
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
||||
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
|
||||
"square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
|
||||
"subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
||||
"table-caption", "table-cell", "table-column", "table-column-group",
|
||||
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
||||
"tamil",
|
||||
"telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
|
||||
"thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
|
||||
"threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
|
||||
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
||||
"trad-chinese-formal", "trad-chinese-informal", "transform",
|
||||
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
||||
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
|
||||
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
||||
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
||||
"var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
|
||||
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
||||
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
||||
"xx-large", "xx-small"
|
||||
], valueKeywords = keySet(valueKeywords_);
|
||||
|
||||
var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
|
||||
.concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
|
||||
.concat(valueKeywords_);
|
||||
CodeMirror.registerHelper("hintWords", "css", allWords);
|
||||
|
||||
function tokenCComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (maybeEnd && ch == "/") {
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ["comment", "comment"];
|
||||
}
|
||||
|
||||
CodeMirror.defineMIME("text/css", {
|
||||
documentTypes: documentTypes,
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
fontProperties: fontProperties,
|
||||
counterDescriptors: counterDescriptors,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (!stream.eat("*")) return false;
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
}
|
||||
},
|
||||
name: "css"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-scss", {
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
fontProperties: fontProperties,
|
||||
allowNested: true,
|
||||
lineComment: "//",
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ["comment", "comment"];
|
||||
} else if (stream.eat("*")) {
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
} else {
|
||||
return ["operator", "operator"];
|
||||
}
|
||||
},
|
||||
":": function(stream) {
|
||||
if (stream.match(/^\s*\{/, false))
|
||||
return [null, null]
|
||||
return false;
|
||||
},
|
||||
"$": function(stream) {
|
||||
stream.match(/^[\w-]+/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ["variable-2", "variable-definition"];
|
||||
return ["variable-2", "variable"];
|
||||
},
|
||||
"#": function(stream) {
|
||||
if (!stream.eat("{")) return false;
|
||||
return [null, "interpolation"];
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "scss"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-less", {
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
fontProperties: fontProperties,
|
||||
allowNested: true,
|
||||
lineComment: "//",
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ["comment", "comment"];
|
||||
} else if (stream.eat("*")) {
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
} else {
|
||||
return ["operator", "operator"];
|
||||
}
|
||||
},
|
||||
"@": function(stream) {
|
||||
if (stream.eat("{")) return [null, "interpolation"];
|
||||
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ["variable-2", "variable-definition"];
|
||||
return ["variable-2", "variable"];
|
||||
},
|
||||
"&": function() {
|
||||
return ["atom", "atom"];
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "less"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-gss", {
|
||||
documentTypes: documentTypes,
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
fontProperties: fontProperties,
|
||||
counterDescriptors: counterDescriptors,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
supportsAtComponent: true,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (!stream.eat("*")) return false;
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "gss"
|
||||
});
|
||||
|
||||
});
|
||||
70
wwws/apx/src/static/lib/codemirror/handlebars/handlebars.js
Normal file
@@ -0,0 +1,70 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../../addon/mode/simple"), require("../../addon/mode/multiplex"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../../addon/mode/simple", "../../addon/mode/multiplex"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineSimpleMode("handlebars-tags", {
|
||||
start: [
|
||||
{ regex: /\{\{\{/, push: "handlebars_raw", token: "tag" },
|
||||
{ regex: /\{\{!--/, push: "dash_comment", token: "comment" },
|
||||
{ regex: /\{\{!/, push: "comment", token: "comment" },
|
||||
{ regex: /\{\{/, push: "handlebars", token: "tag" }
|
||||
],
|
||||
handlebars_raw: [
|
||||
{ regex: /\}\}\}/, pop: true, token: "tag" },
|
||||
],
|
||||
handlebars: [
|
||||
{ regex: /\}\}/, pop: true, token: "tag" },
|
||||
|
||||
// Double and single quotes
|
||||
{ regex: /"(?:[^\\"]|\\.)*"?/, token: "string" },
|
||||
{ regex: /'(?:[^\\']|\\.)*'?/, token: "string" },
|
||||
|
||||
// Handlebars keywords
|
||||
{ regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" },
|
||||
{ regex: /(?:else|this)\b/, token: "keyword" },
|
||||
|
||||
// Numeral
|
||||
{ regex: /\d+/i, token: "number" },
|
||||
|
||||
// Atoms like = and .
|
||||
{ regex: /=|~|@|true|false/, token: "atom" },
|
||||
|
||||
// Paths
|
||||
{ regex: /(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/, token: "variable-2" }
|
||||
],
|
||||
dash_comment: [
|
||||
{ regex: /--\}\}/, pop: true, token: "comment" },
|
||||
|
||||
// Commented code
|
||||
{ regex: /./, token: "comment"}
|
||||
],
|
||||
comment: [
|
||||
{ regex: /\}\}/, pop: true, token: "comment" },
|
||||
{ regex: /./, token: "comment" }
|
||||
],
|
||||
meta: {
|
||||
blockCommentStart: "{{--",
|
||||
blockCommentEnd: "--}}"
|
||||
}
|
||||
});
|
||||
|
||||
CodeMirror.defineMode("handlebars", function(config, parserConfig) {
|
||||
var handlebars = CodeMirror.getMode(config, "handlebars-tags");
|
||||
if (!parserConfig || !parserConfig.base) return handlebars;
|
||||
return CodeMirror.multiplexingMode(
|
||||
CodeMirror.getMode(config, parserConfig.base),
|
||||
{open: "{{", close: /\}\}\}?/, mode: handlebars, parseDelimiters: true}
|
||||
);
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-handlebars-template", "handlebars");
|
||||
});
|
||||
153
wwws/apx/src/static/lib/codemirror/htmlmixed/htmlmixed.js
Normal file
@@ -0,0 +1,153 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var defaultTags = {
|
||||
script: [
|
||||
["lang", /(javascript|babel)/i, "javascript"],
|
||||
["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
|
||||
["type", /./, "text/plain"],
|
||||
[null, null, "javascript"]
|
||||
],
|
||||
style: [
|
||||
["lang", /^css$/i, "css"],
|
||||
["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
|
||||
["type", /./, "text/plain"],
|
||||
[null, null, "css"]
|
||||
]
|
||||
};
|
||||
|
||||
function maybeBackup(stream, pat, style) {
|
||||
var cur = stream.current(), close = cur.search(pat);
|
||||
if (close > -1) {
|
||||
stream.backUp(cur.length - close);
|
||||
} else if (cur.match(/<\/?$/)) {
|
||||
stream.backUp(cur.length);
|
||||
if (!stream.match(pat, false)) stream.match(cur);
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
var attrRegexpCache = {};
|
||||
function getAttrRegexp(attr) {
|
||||
var regexp = attrRegexpCache[attr];
|
||||
if (regexp) return regexp;
|
||||
return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
|
||||
}
|
||||
|
||||
function getAttrValue(text, attr) {
|
||||
var match = text.match(getAttrRegexp(attr))
|
||||
return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
|
||||
}
|
||||
|
||||
function getTagRegexp(tagName, anchored) {
|
||||
return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
|
||||
}
|
||||
|
||||
function addTags(from, to) {
|
||||
for (var tag in from) {
|
||||
var dest = to[tag] || (to[tag] = []);
|
||||
var source = from[tag];
|
||||
for (var i = source.length - 1; i >= 0; i--)
|
||||
dest.unshift(source[i])
|
||||
}
|
||||
}
|
||||
|
||||
function findMatchingMode(tagInfo, tagText) {
|
||||
for (var i = 0; i < tagInfo.length; i++) {
|
||||
var spec = tagInfo[i];
|
||||
if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
|
||||
var htmlMode = CodeMirror.getMode(config, {
|
||||
name: "xml",
|
||||
htmlMode: true,
|
||||
multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
|
||||
multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
|
||||
allowMissingTagName: parserConfig.allowMissingTagName,
|
||||
});
|
||||
|
||||
var tags = {};
|
||||
var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
|
||||
addTags(defaultTags, tags);
|
||||
if (configTags) addTags(configTags, tags);
|
||||
if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
|
||||
tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
|
||||
|
||||
function html(stream, state) {
|
||||
var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
|
||||
if (tag && !/[<>\s\/]/.test(stream.current()) &&
|
||||
(tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
|
||||
tags.hasOwnProperty(tagName)) {
|
||||
state.inTag = tagName + " "
|
||||
} else if (state.inTag && tag && />$/.test(stream.current())) {
|
||||
var inTag = /^([\S]+) (.*)/.exec(state.inTag)
|
||||
state.inTag = null
|
||||
var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
|
||||
var mode = CodeMirror.getMode(config, modeSpec)
|
||||
var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
|
||||
state.token = function (stream, state) {
|
||||
if (stream.match(endTagA, false)) {
|
||||
state.token = html;
|
||||
state.localState = state.localMode = null;
|
||||
return null;
|
||||
}
|
||||
return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
|
||||
};
|
||||
state.localMode = mode;
|
||||
state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
|
||||
} else if (state.inTag) {
|
||||
state.inTag += stream.current()
|
||||
if (stream.eol()) state.inTag += " "
|
||||
}
|
||||
return style;
|
||||
};
|
||||
|
||||
return {
|
||||
startState: function () {
|
||||
var state = CodeMirror.startState(htmlMode);
|
||||
return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
|
||||
},
|
||||
|
||||
copyState: function (state) {
|
||||
var local;
|
||||
if (state.localState) {
|
||||
local = CodeMirror.copyState(state.localMode, state.localState);
|
||||
}
|
||||
return {token: state.token, inTag: state.inTag,
|
||||
localMode: state.localMode, localState: local,
|
||||
htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
|
||||
},
|
||||
|
||||
token: function (stream, state) {
|
||||
return state.token(stream, state);
|
||||
},
|
||||
|
||||
indent: function (state, textAfter, line) {
|
||||
if (!state.localMode || /^\s*<\//.test(textAfter))
|
||||
return htmlMode.indent(state.htmlState, textAfter, line);
|
||||
else if (state.localMode.indent)
|
||||
return state.localMode.indent(state.localState, textAfter, line);
|
||||
else
|
||||
return CodeMirror.Pass;
|
||||
},
|
||||
|
||||
innerMode: function (state) {
|
||||
return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
|
||||
}
|
||||
};
|
||||
}, "xml", "javascript", "css");
|
||||
|
||||
CodeMirror.defineMIME("text/html", "htmlmixed");
|
||||
});
|
||||
960
wwws/apx/src/static/lib/codemirror/javascript/javascript.js
Normal file
@@ -0,0 +1,960 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
var jsonldMode = parserConfig.jsonld;
|
||||
var jsonMode = parserConfig.json || jsonldMode;
|
||||
var trackScope = parserConfig.trackScope !== false
|
||||
var isTS = parserConfig.typescript;
|
||||
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
|
||||
|
||||
// Tokenizer
|
||||
|
||||
var keywords = function(){
|
||||
function kw(type) {return {type: type, style: "keyword"};}
|
||||
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
|
||||
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
||||
|
||||
return {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
|
||||
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
||||
"await": C
|
||||
};
|
||||
}();
|
||||
|
||||
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
|
||||
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
|
||||
|
||||
function readRegexp(stream) {
|
||||
var escaped = false, next, inSet = false;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped) {
|
||||
if (next == "/" && !inSet) return;
|
||||
if (next == "[") inSet = true;
|
||||
else if (inSet && next == "]") inSet = false;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
}
|
||||
|
||||
// Used as scratch variables to communicate multiple values without
|
||||
// consing up tons of objects.
|
||||
var type, content;
|
||||
function ret(tp, style, cont) {
|
||||
type = tp; content = cont;
|
||||
return style;
|
||||
}
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '"' || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
|
||||
return ret("number", "number");
|
||||
} else if (ch == "." && stream.match("..")) {
|
||||
return ret("spread", "meta");
|
||||
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
return ret(ch);
|
||||
} else if (ch == "=" && stream.eat(">")) {
|
||||
return ret("=>", "operator");
|
||||
} else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
} else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
} else if (expressionAllowed(stream, state, 1)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
} else {
|
||||
stream.eat("=");
|
||||
return ret("operator", "operator", stream.current());
|
||||
}
|
||||
} else if (ch == "`") {
|
||||
state.tokenize = tokenQuasi;
|
||||
return tokenQuasi(stream, state);
|
||||
} else if (ch == "#" && stream.peek() == "!") {
|
||||
stream.skipToEnd();
|
||||
return ret("meta", "meta");
|
||||
} else if (ch == "#" && stream.eatWhile(wordRE)) {
|
||||
return ret("variable", "property")
|
||||
} else if (ch == "<" && stream.match("!--") ||
|
||||
(ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
|
||||
stream.skipToEnd()
|
||||
return ret("comment", "comment")
|
||||
} else if (isOperatorChar.test(ch)) {
|
||||
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
||||
if (stream.eat("=")) {
|
||||
if (ch == "!" || ch == "=") stream.eat("=")
|
||||
} else if (/[<>*+\-|&?]/.test(ch)) {
|
||||
stream.eat(ch)
|
||||
if (ch == ">") stream.eat(ch)
|
||||
}
|
||||
}
|
||||
if (ch == "?" && stream.eat(".")) return ret(".")
|
||||
return ret("operator", "operator", stream.current());
|
||||
} else if (wordRE.test(ch)) {
|
||||
stream.eatWhile(wordRE);
|
||||
var word = stream.current()
|
||||
if (state.lastType != ".") {
|
||||
if (keywords.propertyIsEnumerable(word)) {
|
||||
var kw = keywords[word]
|
||||
return ret(kw.type, kw.style, word)
|
||||
}
|
||||
if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
|
||||
return ret("async", "keyword", word)
|
||||
}
|
||||
return ret("variable", "variable", word)
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, next;
|
||||
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
|
||||
state.tokenize = tokenBase;
|
||||
return ret("jsonld-keyword", "meta");
|
||||
}
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == quote && !escaped) break;
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
if (!escaped) state.tokenize = tokenBase;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
|
||||
function tokenQuasi(stream, state) {
|
||||
var escaped = false, next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
return ret("quasi", "string-2", stream.current());
|
||||
}
|
||||
|
||||
var brackets = "([{}])";
|
||||
// This is a crude lookahead trick to try and notice that we're
|
||||
// parsing the argument patterns for a fat-arrow function before we
|
||||
// actually hit the arrow token. It only works if the arrow is on
|
||||
// the same line as the arguments and there's no strange noise
|
||||
// (comments) in between. Fallback is to only notice when we hit the
|
||||
// arrow, and not declare the arguments as locals for the arrow
|
||||
// body.
|
||||
function findFatArrow(stream, state) {
|
||||
if (state.fatArrowAt) state.fatArrowAt = null;
|
||||
var arrow = stream.string.indexOf("=>", stream.start);
|
||||
if (arrow < 0) return;
|
||||
|
||||
if (isTS) { // Try to skip TypeScript return type declarations after the arguments
|
||||
var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
|
||||
if (m) arrow = m.index
|
||||
}
|
||||
|
||||
var depth = 0, sawSomething = false;
|
||||
for (var pos = arrow - 1; pos >= 0; --pos) {
|
||||
var ch = stream.string.charAt(pos);
|
||||
var bracket = brackets.indexOf(ch);
|
||||
if (bracket >= 0 && bracket < 3) {
|
||||
if (!depth) { ++pos; break; }
|
||||
if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
|
||||
} else if (bracket >= 3 && bracket < 6) {
|
||||
++depth;
|
||||
} else if (wordRE.test(ch)) {
|
||||
sawSomething = true;
|
||||
} else if (/["'\/`]/.test(ch)) {
|
||||
for (;; --pos) {
|
||||
if (pos == 0) return
|
||||
var next = stream.string.charAt(pos - 1)
|
||||
if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
|
||||
}
|
||||
} else if (sawSomething && !depth) {
|
||||
++pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sawSomething && !depth) state.fatArrowAt = pos;
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
|
||||
"regexp": true, "this": true, "import": true, "jsonld-keyword": true};
|
||||
|
||||
function JSLexical(indented, column, type, align, prev, info) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.prev = prev;
|
||||
this.info = info;
|
||||
if (align != null) this.align = align;
|
||||
}
|
||||
|
||||
function inScope(state, varname) {
|
||||
if (!trackScope) return false
|
||||
for (var v = state.localVars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
for (var cx = state.context; cx; cx = cx.prev) {
|
||||
for (var v = cx.vars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
}
|
||||
}
|
||||
|
||||
function parseJS(state, style, type, content, stream) {
|
||||
var cc = state.cc;
|
||||
// Communicate our context to the combinators.
|
||||
// (Less wasteful than consing up a hundred closures on every call.)
|
||||
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
|
||||
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = true;
|
||||
|
||||
while(true) {
|
||||
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
|
||||
if (combinator(type, content)) {
|
||||
while(cc.length && cc[cc.length - 1].lex)
|
||||
cc.pop()();
|
||||
if (cx.marked) return cx.marked;
|
||||
if (type == "variable" && inScope(state, content)) return "variable-2";
|
||||
return style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combinator utils
|
||||
|
||||
var cx = {state: null, column: null, marked: null, cc: null};
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function inList(name, list) {
|
||||
for (var v = list; v; v = v.next) if (v.name == name) return true
|
||||
return false;
|
||||
}
|
||||
function register(varname) {
|
||||
var state = cx.state;
|
||||
cx.marked = "def";
|
||||
if (!trackScope) return
|
||||
if (state.context) {
|
||||
if (state.lexical.info == "var" && state.context && state.context.block) {
|
||||
// FIXME function decls are also not block scoped
|
||||
var newContext = registerVarScoped(varname, state.context)
|
||||
if (newContext != null) {
|
||||
state.context = newContext
|
||||
return
|
||||
}
|
||||
} else if (!inList(varname, state.localVars)) {
|
||||
state.localVars = new Var(varname, state.localVars)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Fall through means this is global
|
||||
if (parserConfig.globalVars && !inList(varname, state.globalVars))
|
||||
state.globalVars = new Var(varname, state.globalVars)
|
||||
}
|
||||
function registerVarScoped(varname, context) {
|
||||
if (!context) {
|
||||
return null
|
||||
} else if (context.block) {
|
||||
var inner = registerVarScoped(varname, context.prev)
|
||||
if (!inner) return null
|
||||
if (inner == context.prev) return context
|
||||
return new Context(inner, context.vars, true)
|
||||
} else if (inList(varname, context.vars)) {
|
||||
return context
|
||||
} else {
|
||||
return new Context(context.prev, new Var(varname, context.vars), false)
|
||||
}
|
||||
}
|
||||
|
||||
function isModifier(name) {
|
||||
return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
|
||||
}
|
||||
|
||||
// Combinators
|
||||
|
||||
function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
|
||||
function Var(name, next) { this.name = name; this.next = next }
|
||||
|
||||
var defaultVars = new Var("this", new Var("arguments", null))
|
||||
function pushcontext() {
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
|
||||
cx.state.localVars = defaultVars
|
||||
}
|
||||
function pushblockcontext() {
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
|
||||
cx.state.localVars = null
|
||||
}
|
||||
pushcontext.lex = pushblockcontext.lex = true
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars
|
||||
cx.state.context = cx.state.context.prev
|
||||
}
|
||||
popcontext.lex = true
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
if (state.lexical.type == "stat") indent = state.lexical.indented;
|
||||
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
|
||||
indent = outer.indented;
|
||||
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
||||
};
|
||||
result.lex = true;
|
||||
return result;
|
||||
}
|
||||
function poplex() {
|
||||
var state = cx.state;
|
||||
if (state.lexical.prev) {
|
||||
if (state.lexical.type == ")")
|
||||
state.indented = state.lexical.indented;
|
||||
state.lexical = state.lexical.prev;
|
||||
}
|
||||
}
|
||||
poplex.lex = true;
|
||||
|
||||
function expect(wanted) {
|
||||
function exp(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
|
||||
else return cont(exp);
|
||||
};
|
||||
return exp;
|
||||
}
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
||||
if (type == "debugger") return cont(expect(";"));
|
||||
if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
cx.state.cc.pop()();
|
||||
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
|
||||
}
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
|
||||
if (type == "class" || (isTS && value == "interface")) {
|
||||
cx.marked = "keyword"
|
||||
return cont(pushlex("form", type == "class" ? type : value), className, poplex)
|
||||
}
|
||||
if (type == "variable") {
|
||||
if (isTS && value == "declare") {
|
||||
cx.marked = "keyword"
|
||||
return cont(statement)
|
||||
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
|
||||
cx.marked = "keyword"
|
||||
if (value == "enum") return cont(enumdef);
|
||||
else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
|
||||
else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
|
||||
} else if (isTS && value == "namespace") {
|
||||
cx.marked = "keyword"
|
||||
return cont(pushlex("form"), expression, statement, poplex)
|
||||
} else if (isTS && value == "abstract") {
|
||||
cx.marked = "keyword"
|
||||
return cont(statement)
|
||||
} else {
|
||||
return cont(pushlex("stat"), maybelabel);
|
||||
}
|
||||
}
|
||||
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
|
||||
block, poplex, poplex, popcontext);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
|
||||
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
||||
if (type == "async") return cont(statement)
|
||||
if (value == "@") return cont(expression, statement)
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function maybeCatchBinding(type) {
|
||||
if (type == "(") return cont(funarg, expect(")"))
|
||||
}
|
||||
function expression(type, value) {
|
||||
return expressionInner(type, value, false);
|
||||
}
|
||||
function expressionNoComma(type, value) {
|
||||
return expressionInner(type, value, true);
|
||||
}
|
||||
function parenExpr(type) {
|
||||
if (type != "(") return pass()
|
||||
return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
|
||||
}
|
||||
function expressionInner(type, value, noComma) {
|
||||
if (cx.state.fatArrowAt == cx.stream.start) {
|
||||
var body = noComma ? arrowBodyNoComma : arrowBody;
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
||||
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
|
||||
}
|
||||
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef, maybeop);
|
||||
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
|
||||
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
||||
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
||||
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
||||
if (type == "quasi") return pass(quasi, maybeop);
|
||||
if (type == "new") return cont(maybeTarget(noComma));
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expression);
|
||||
}
|
||||
|
||||
function maybeoperatorComma(type, value) {
|
||||
if (type == ",") return cont(maybeexpression);
|
||||
return maybeoperatorNoComma(type, value, false);
|
||||
}
|
||||
function maybeoperatorNoComma(type, value, noComma) {
|
||||
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
||||
var expr = noComma == false ? expression : expressionNoComma;
|
||||
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
||||
if (type == "operator") {
|
||||
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
|
||||
if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
|
||||
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
|
||||
if (value == "?") return cont(expression, expect(":"), expr);
|
||||
return cont(expr);
|
||||
}
|
||||
if (type == "quasi") { return pass(quasi, me); }
|
||||
if (type == ";") return;
|
||||
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
|
||||
if (type == ".") return cont(property, me);
|
||||
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
||||
if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
|
||||
if (type == "regexp") {
|
||||
cx.state.lastType = cx.marked = "operator"
|
||||
cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
|
||||
return cont(expr)
|
||||
}
|
||||
}
|
||||
function quasi(type, value) {
|
||||
if (type != "quasi") return pass();
|
||||
if (value.slice(value.length - 2) != "${") return cont(quasi);
|
||||
return cont(maybeexpression, continueQuasi);
|
||||
}
|
||||
function continueQuasi(type) {
|
||||
if (type == "}") {
|
||||
cx.marked = "string-2";
|
||||
cx.state.tokenize = tokenQuasi;
|
||||
return cont(quasi);
|
||||
}
|
||||
}
|
||||
function arrowBody(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expression);
|
||||
}
|
||||
function arrowBodyNoComma(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expressionNoComma);
|
||||
}
|
||||
function maybeTarget(noComma) {
|
||||
return function(type) {
|
||||
if (type == ".") return cont(noComma ? targetNoComma : target);
|
||||
else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
|
||||
else return pass(noComma ? expressionNoComma : expression);
|
||||
};
|
||||
}
|
||||
function target(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
|
||||
}
|
||||
function targetNoComma(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
}
|
||||
function property(type) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "async") {
|
||||
cx.marked = "property";
|
||||
return cont(objprop);
|
||||
} else if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
|
||||
if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
|
||||
cx.state.fatArrowAt = cx.stream.pos + m[0].length
|
||||
return cont(afterprop);
|
||||
} else if (type == "number" || type == "string") {
|
||||
cx.marked = jsonldMode ? "property" : (cx.style + " property");
|
||||
return cont(afterprop);
|
||||
} else if (type == "jsonld-keyword") {
|
||||
return cont(afterprop);
|
||||
} else if (isTS && isModifier(value)) {
|
||||
cx.marked = "keyword"
|
||||
return cont(objprop)
|
||||
} else if (type == "[") {
|
||||
return cont(expression, maybetype, expect("]"), afterprop);
|
||||
} else if (type == "spread") {
|
||||
return cont(expressionNoComma, afterprop);
|
||||
} else if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(objprop);
|
||||
} else if (type == ":") {
|
||||
return pass(afterprop)
|
||||
}
|
||||
}
|
||||
function getterSetter(type) {
|
||||
if (type != "variable") return pass(afterprop);
|
||||
cx.marked = "property";
|
||||
return cont(functiondef);
|
||||
}
|
||||
function afterprop(type) {
|
||||
if (type == ":") return cont(expressionNoComma);
|
||||
if (type == "(") return pass(functiondef);
|
||||
}
|
||||
function commasep(what, end, sep) {
|
||||
function proceed(type, value) {
|
||||
if (sep ? sep.indexOf(type) > -1 : type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(function(type, value) {
|
||||
if (type == end || value == end) return pass()
|
||||
return pass(what)
|
||||
}, proceed);
|
||||
}
|
||||
if (type == end || value == end) return cont();
|
||||
if (sep && sep.indexOf(";") > -1) return pass(what)
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type, value) {
|
||||
if (type == end || value == end) return cont();
|
||||
return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
function contCommasep(what, end, info) {
|
||||
for (var i = 3; i < arguments.length; i++)
|
||||
cx.cc.push(arguments[i]);
|
||||
return cont(pushlex(end, info), commasep(what, end), poplex);
|
||||
}
|
||||
function block(type) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type, value) {
|
||||
if (isTS) {
|
||||
if (type == ":") return cont(typeexpr);
|
||||
if (value == "?") return cont(maybetype);
|
||||
}
|
||||
}
|
||||
function maybetypeOrIn(type, value) {
|
||||
if (isTS && (type == ":" || value == "in")) return cont(typeexpr)
|
||||
}
|
||||
function mayberettype(type) {
|
||||
if (isTS && type == ":") {
|
||||
if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
|
||||
else return cont(typeexpr)
|
||||
}
|
||||
}
|
||||
function isKW(_, value) {
|
||||
if (value == "is") {
|
||||
cx.marked = "keyword"
|
||||
return cont()
|
||||
}
|
||||
}
|
||||
function typeexpr(type, value) {
|
||||
if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
|
||||
cx.marked = "keyword"
|
||||
return cont(value == "typeof" ? expressionNoComma : typeexpr)
|
||||
}
|
||||
if (type == "variable" || value == "void") {
|
||||
cx.marked = "type"
|
||||
return cont(afterType)
|
||||
}
|
||||
if (value == "|" || value == "&") return cont(typeexpr)
|
||||
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
||||
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
||||
if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
|
||||
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
|
||||
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
||||
if (type == "quasi") { return pass(quasiType, afterType); }
|
||||
}
|
||||
function maybeReturnType(type) {
|
||||
if (type == "=>") return cont(typeexpr)
|
||||
}
|
||||
function typeprops(type) {
|
||||
if (type.match(/[\}\)\]]/)) return cont()
|
||||
if (type == "," || type == ";") return cont(typeprops)
|
||||
return pass(typeprop, typeprops)
|
||||
}
|
||||
function typeprop(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property"
|
||||
return cont(typeprop)
|
||||
} else if (value == "?" || type == "number" || type == "string") {
|
||||
return cont(typeprop)
|
||||
} else if (type == ":") {
|
||||
return cont(typeexpr)
|
||||
} else if (type == "[") {
|
||||
return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
|
||||
} else if (type == "(") {
|
||||
return pass(functiondecl, typeprop)
|
||||
} else if (!type.match(/[;\}\)\],]/)) {
|
||||
return cont()
|
||||
}
|
||||
}
|
||||
function quasiType(type, value) {
|
||||
if (type != "quasi") return pass();
|
||||
if (value.slice(value.length - 2) != "${") return cont(quasiType);
|
||||
return cont(typeexpr, continueQuasiType);
|
||||
}
|
||||
function continueQuasiType(type) {
|
||||
if (type == "}") {
|
||||
cx.marked = "string-2";
|
||||
cx.state.tokenize = tokenQuasi;
|
||||
return cont(quasiType);
|
||||
}
|
||||
}
|
||||
function typearg(type, value) {
|
||||
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
|
||||
if (type == ":") return cont(typeexpr)
|
||||
if (type == "spread") return cont(typearg)
|
||||
return pass(typeexpr)
|
||||
}
|
||||
function afterType(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
if (value == "|" || type == "." || value == "&") return cont(typeexpr)
|
||||
if (type == "[") return cont(typeexpr, expect("]"), afterType)
|
||||
if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
|
||||
if (value == "?") return cont(typeexpr, expect(":"), typeexpr)
|
||||
}
|
||||
function maybeTypeArgs(_, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
}
|
||||
function typeparam() {
|
||||
return pass(typeexpr, maybeTypeDefault)
|
||||
}
|
||||
function maybeTypeDefault(_, value) {
|
||||
if (value == "=") return cont(typeexpr)
|
||||
}
|
||||
function vardef(_, value) {
|
||||
if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
|
||||
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
||||
}
|
||||
function pattern(type, value) {
|
||||
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
|
||||
if (type == "variable") { register(value); return cont(); }
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "[") return contCommasep(eltpattern, "]");
|
||||
if (type == "{") return contCommasep(proppattern, "}");
|
||||
}
|
||||
function proppattern(type, value) {
|
||||
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
|
||||
register(value);
|
||||
return cont(maybeAssign);
|
||||
}
|
||||
if (type == "variable") cx.marked = "property";
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "}") return pass();
|
||||
if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
|
||||
return cont(expect(":"), pattern, maybeAssign);
|
||||
}
|
||||
function eltpattern() {
|
||||
return pass(pattern, maybeAssign)
|
||||
}
|
||||
function maybeAssign(_type, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
}
|
||||
function vardefCont(type) {
|
||||
if (type == ",") return cont(vardef);
|
||||
}
|
||||
function maybeelse(type, value) {
|
||||
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
||||
}
|
||||
function forspec(type, value) {
|
||||
if (value == "await") return cont(forspec);
|
||||
if (type == "(") return cont(pushlex(")"), forspec1, poplex);
|
||||
}
|
||||
function forspec1(type) {
|
||||
if (type == "var") return cont(vardef, forspec2);
|
||||
if (type == "variable") return cont(forspec2);
|
||||
return pass(forspec2)
|
||||
}
|
||||
function forspec2(type, value) {
|
||||
if (type == ")") return cont()
|
||||
if (type == ";") return cont(forspec2)
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }
|
||||
return pass(expression, forspec2)
|
||||
}
|
||||
function functiondef(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
|
||||
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
|
||||
}
|
||||
function functiondecl(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}
|
||||
if (type == "variable") {register(value); return cont(functiondecl);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
|
||||
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)
|
||||
}
|
||||
function typename(type, value) {
|
||||
if (type == "keyword" || type == "variable") {
|
||||
cx.marked = "type"
|
||||
return cont(typename)
|
||||
} else if (value == "<") {
|
||||
return cont(pushlex(">"), commasep(typeparam, ">"), poplex)
|
||||
}
|
||||
}
|
||||
function funarg(type, value) {
|
||||
if (value == "@") cont(expression, funarg)
|
||||
if (type == "spread") return cont(funarg);
|
||||
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
|
||||
if (isTS && type == "this") return cont(maybetype, maybeAssign)
|
||||
return pass(pattern, maybetype, maybeAssign);
|
||||
}
|
||||
function classExpression(type, value) {
|
||||
// Class expressions may have an optional name.
|
||||
if (type == "variable") return className(type, value);
|
||||
return classNameAfter(type, value);
|
||||
}
|
||||
function className(type, value) {
|
||||
if (type == "variable") {register(value); return cont(classNameAfter);}
|
||||
}
|
||||
function classNameAfter(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
|
||||
if (value == "extends" || value == "implements" || (isTS && type == ",")) {
|
||||
if (value == "implements") cx.marked = "keyword";
|
||||
return cont(isTS ? typeexpr : expression, classNameAfter);
|
||||
}
|
||||
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
||||
}
|
||||
function classBody(type, value) {
|
||||
if (type == "async" ||
|
||||
(type == "variable" &&
|
||||
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
|
||||
cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
return cont(classfield, classBody);
|
||||
}
|
||||
if (type == "number" || type == "string") return cont(classfield, classBody);
|
||||
if (type == "[")
|
||||
return cont(expression, maybetype, expect("]"), classfield, classBody)
|
||||
if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (isTS && type == "(") return pass(functiondecl, classBody)
|
||||
if (type == ";" || type == ",") return cont(classBody);
|
||||
if (type == "}") return cont();
|
||||
if (value == "@") return cont(expression, classBody)
|
||||
}
|
||||
function classfield(type, value) {
|
||||
if (value == "!") return cont(classfield)
|
||||
if (value == "?") return cont(classfield)
|
||||
if (type == ":") return cont(typeexpr, maybeAssign)
|
||||
if (value == "=") return cont(expressionNoComma)
|
||||
var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"
|
||||
return pass(isInterface ? functiondecl : functiondef)
|
||||
}
|
||||
function afterExport(type, value) {
|
||||
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
|
||||
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
|
||||
if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
|
||||
return pass(statement);
|
||||
}
|
||||
function exportField(type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
|
||||
if (type == "variable") return pass(expressionNoComma, exportField);
|
||||
}
|
||||
function afterImport(type) {
|
||||
if (type == "string") return cont();
|
||||
if (type == "(") return pass(expression);
|
||||
if (type == ".") return pass(maybeoperatorComma);
|
||||
return pass(importSpec, maybeMoreImports, maybeFrom);
|
||||
}
|
||||
function importSpec(type, value) {
|
||||
if (type == "{") return contCommasep(importSpec, "}");
|
||||
if (type == "variable") register(value);
|
||||
if (value == "*") cx.marked = "keyword";
|
||||
return cont(maybeAs);
|
||||
}
|
||||
function maybeMoreImports(type) {
|
||||
if (type == ",") return cont(importSpec, maybeMoreImports)
|
||||
}
|
||||
function maybeAs(_type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
|
||||
}
|
||||
function maybeFrom(_type, value) {
|
||||
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
|
||||
}
|
||||
function arrayLiteral(type) {
|
||||
if (type == "]") return cont();
|
||||
return pass(commasep(expressionNoComma, "]"));
|
||||
}
|
||||
function enumdef() {
|
||||
return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
|
||||
}
|
||||
function enummember() {
|
||||
return pass(pattern, maybeAssign);
|
||||
}
|
||||
|
||||
function isContinuedStatement(state, textAfter) {
|
||||
return state.lastType == "operator" || state.lastType == "," ||
|
||||
isOperatorChar.test(textAfter.charAt(0)) ||
|
||||
/[,.]/.test(textAfter.charAt(0));
|
||||
}
|
||||
|
||||
function expressionAllowed(stream, state, backUp) {
|
||||
return state.tokenize == tokenBase &&
|
||||
/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
||||
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
var state = {
|
||||
tokenize: tokenBase,
|
||||
lastType: "sof",
|
||||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && new Context(null, null, false),
|
||||
indented: basecolumn || 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
state.globalVars = parserConfig.globalVars;
|
||||
return state;
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = false;
|
||||
state.indented = stream.indentation();
|
||||
findFatArrow(stream, state);
|
||||
}
|
||||
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if (type == "comment") return style;
|
||||
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
||||
return parseJS(state, style, type, content, stream);
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse && c != popcontext) break;
|
||||
}
|
||||
while ((lexical.type == "stat" || lexical.type == "form") &&
|
||||
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
|
||||
(top == maybeoperatorComma || top == maybeoperatorNoComma) &&
|
||||
!/^[,\.=+\-*:?[\(]/.test(textAfter))))
|
||||
lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
|
||||
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
||||
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
||||
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
||||
else return lexical.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
||||
blockCommentStart: jsonMode ? null : "/*",
|
||||
blockCommentEnd: jsonMode ? null : "*/",
|
||||
blockCommentContinue: jsonMode ? null : " * ",
|
||||
lineComment: jsonMode ? null : "//",
|
||||
fold: "brace",
|
||||
closeBrackets: "()[]{}''\"\"``",
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonldMode: jsonldMode,
|
||||
jsonMode: jsonMode,
|
||||
|
||||
expressionAllowed: expressionAllowed,
|
||||
|
||||
skipExpression: function(state) {
|
||||
parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null))
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
|
||||
|
||||
CodeMirror.defineMIME("text/javascript", "javascript");
|
||||
CodeMirror.defineMIME("text/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/x-javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/json", { name: "javascript", json: true });
|
||||
CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true });
|
||||
CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true })
|
||||
CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true });
|
||||
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
||||
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
||||
|
||||
});
|
||||
886
wwws/apx/src/static/lib/codemirror/markdown/markdown.js
Normal file
@@ -0,0 +1,886 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
||||
|
||||
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
||||
var htmlModeMissing = htmlMode.name == "null"
|
||||
|
||||
function getMode(name) {
|
||||
if (CodeMirror.findModeByName) {
|
||||
var found = CodeMirror.findModeByName(name);
|
||||
if (found) name = found.mime || found.mimes[0];
|
||||
}
|
||||
var mode = CodeMirror.getMode(cmCfg, name);
|
||||
return mode.name == "null" ? null : mode;
|
||||
}
|
||||
|
||||
// Should characters that affect highlighting be highlighted separate?
|
||||
// Does not include characters that will be output (such as `1.` and `-` for lists)
|
||||
if (modeCfg.highlightFormatting === undefined)
|
||||
modeCfg.highlightFormatting = false;
|
||||
|
||||
// Maximum number of nested blockquotes. Set to 0 for infinite nesting.
|
||||
// Excess `>` will emit `error` token.
|
||||
if (modeCfg.maxBlockquoteDepth === undefined)
|
||||
modeCfg.maxBlockquoteDepth = 0;
|
||||
|
||||
// Turn on task lists? ("- [ ] " and "- [x] ")
|
||||
if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
|
||||
|
||||
// Turn on strikethrough syntax
|
||||
if (modeCfg.strikethrough === undefined)
|
||||
modeCfg.strikethrough = false;
|
||||
|
||||
if (modeCfg.emoji === undefined)
|
||||
modeCfg.emoji = false;
|
||||
|
||||
if (modeCfg.fencedCodeBlockHighlighting === undefined)
|
||||
modeCfg.fencedCodeBlockHighlighting = true;
|
||||
|
||||
if (modeCfg.fencedCodeBlockDefaultMode === undefined)
|
||||
modeCfg.fencedCodeBlockDefaultMode = 'text/plain';
|
||||
|
||||
if (modeCfg.xml === undefined)
|
||||
modeCfg.xml = true;
|
||||
|
||||
// Allow token types to be overridden by user-provided token types.
|
||||
if (modeCfg.tokenTypeOverrides === undefined)
|
||||
modeCfg.tokenTypeOverrides = {};
|
||||
|
||||
var tokenTypes = {
|
||||
header: "header",
|
||||
code: "comment",
|
||||
quote: "quote",
|
||||
list1: "variable-2",
|
||||
list2: "variable-3",
|
||||
list3: "keyword",
|
||||
hr: "hr",
|
||||
image: "image",
|
||||
imageAltText: "image-alt-text",
|
||||
imageMarker: "image-marker",
|
||||
formatting: "formatting",
|
||||
linkInline: "link",
|
||||
linkEmail: "link",
|
||||
linkText: "link",
|
||||
linkHref: "string",
|
||||
em: "em",
|
||||
strong: "strong",
|
||||
strikethrough: "strikethrough",
|
||||
emoji: "builtin"
|
||||
};
|
||||
|
||||
for (var tokenType in tokenTypes) {
|
||||
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
|
||||
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
|
||||
}
|
||||
}
|
||||
|
||||
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
|
||||
, listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
|
||||
, taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
|
||||
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
|
||||
, setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
|
||||
, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
|
||||
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
|
||||
, linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
|
||||
, punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
|
||||
, expandedTab = " " // CommonMark specifies tab as 4 spaces
|
||||
|
||||
function switchInline(stream, state, f) {
|
||||
state.f = state.inline = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function switchBlock(stream, state, f) {
|
||||
state.f = state.block = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function lineIsEmpty(line) {
|
||||
return !line || !/\S/.test(line.string)
|
||||
}
|
||||
|
||||
// Blocks
|
||||
|
||||
function blankLine(state) {
|
||||
// Reset linkTitle state
|
||||
state.linkTitle = false;
|
||||
state.linkHref = false;
|
||||
state.linkText = false;
|
||||
// Reset EM state
|
||||
state.em = false;
|
||||
// Reset STRONG state
|
||||
state.strong = false;
|
||||
// Reset strikethrough state
|
||||
state.strikethrough = false;
|
||||
// Reset state.quote
|
||||
state.quote = 0;
|
||||
// Reset state.indentedCode
|
||||
state.indentedCode = false;
|
||||
if (state.f == htmlBlock) {
|
||||
var exit = htmlModeMissing
|
||||
if (!exit) {
|
||||
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
||||
exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
|
||||
(!inner.state.context && inner.state.tokenize.isInText)
|
||||
}
|
||||
if (exit) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
state.htmlState = null;
|
||||
}
|
||||
}
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
// Mark this line as blank
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = {stream: null}
|
||||
return null;
|
||||
}
|
||||
|
||||
function blockNormal(stream, state) {
|
||||
var firstTokenOnLine = stream.column() === state.indentation;
|
||||
var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
|
||||
var prevLineIsIndentedCode = state.indentedCode;
|
||||
var prevLineIsHr = state.prevLine.hr;
|
||||
var prevLineIsList = state.list !== false;
|
||||
var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
|
||||
|
||||
state.indentedCode = false;
|
||||
|
||||
var lineIndentation = state.indentation;
|
||||
// compute once per line (on first token)
|
||||
if (state.indentationDiff === null) {
|
||||
state.indentationDiff = state.indentation;
|
||||
if (prevLineIsList) {
|
||||
state.list = null;
|
||||
// While this list item's marker's indentation is less than the deepest
|
||||
// list item's content's indentation,pop the deepest list item
|
||||
// indentation off the stack, and update block indentation state
|
||||
while (lineIndentation < state.listStack[state.listStack.length - 1]) {
|
||||
state.listStack.pop();
|
||||
if (state.listStack.length) {
|
||||
state.indentation = state.listStack[state.listStack.length - 1];
|
||||
// less than the first list's indent -> the line is no longer a list
|
||||
} else {
|
||||
state.list = false;
|
||||
}
|
||||
}
|
||||
if (state.list !== false) {
|
||||
state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// not comprehensive (currently only for setext detection purposes)
|
||||
var allowsInlineContinuation = (
|
||||
!prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
|
||||
(!prevLineIsList || !prevLineIsIndentedCode) &&
|
||||
!state.prevLine.fencedCodeEnd
|
||||
);
|
||||
|
||||
var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
|
||||
state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
|
||||
|
||||
var match = null;
|
||||
if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
|
||||
state.prevLine.header || prevLineLineIsEmpty)) {
|
||||
stream.skipToEnd();
|
||||
state.indentedCode = true;
|
||||
return tokenTypes.code;
|
||||
} else if (stream.eatSpace()) {
|
||||
return null;
|
||||
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
|
||||
state.quote = 0;
|
||||
state.header = match[1].length;
|
||||
state.thisLine.header = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
|
||||
state.quote = firstTokenOnLine ? 1 : state.quote + 1;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "quote";
|
||||
stream.eatSpace();
|
||||
return getType(state);
|
||||
} else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
|
||||
var listType = match[1] ? "ol" : "ul";
|
||||
|
||||
state.indentation = lineIndentation + stream.current().length;
|
||||
state.list = true;
|
||||
state.quote = 0;
|
||||
|
||||
// Add this list item's content's indentation to the stack
|
||||
state.listStack.push(state.indentation);
|
||||
// Reset inline styles which shouldn't propagate across list items
|
||||
state.em = false;
|
||||
state.strong = false;
|
||||
state.code = false;
|
||||
state.strikethrough = false;
|
||||
|
||||
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
|
||||
state.taskList = true;
|
||||
}
|
||||
state.f = state.inline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
|
||||
return getType(state);
|
||||
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
|
||||
state.quote = 0;
|
||||
state.fencedEndRE = new RegExp(match[1] + "+ *$");
|
||||
// try switching mode
|
||||
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
|
||||
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
||||
state.f = state.block = local;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
state.code = -1
|
||||
return getType(state);
|
||||
// SETEXT has lowest block-scope precedence after HR, so check it after
|
||||
// the others (code, blockquote, list...)
|
||||
} else if (
|
||||
// if setext set, indicates line after ---/===
|
||||
state.setext || (
|
||||
// line before ---/===
|
||||
(!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
|
||||
!state.code && !isHr && !linkDefRE.test(stream.string) &&
|
||||
(match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
|
||||
)
|
||||
) {
|
||||
if ( !state.setext ) {
|
||||
state.header = match[0].charAt(0) == '=' ? 1 : 2;
|
||||
state.setext = state.header;
|
||||
} else {
|
||||
state.header = state.setext;
|
||||
// has no effect on type so we can reset it now
|
||||
state.setext = 0;
|
||||
stream.skipToEnd();
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
}
|
||||
state.thisLine.header = true;
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (isHr) {
|
||||
stream.skipToEnd();
|
||||
state.hr = true;
|
||||
state.thisLine.hr = true;
|
||||
return tokenTypes.hr;
|
||||
} else if (stream.peek() === '[') {
|
||||
return switchInline(stream, state, footnoteLink);
|
||||
}
|
||||
|
||||
return switchInline(stream, state, state.inline);
|
||||
}
|
||||
|
||||
function htmlBlock(stream, state) {
|
||||
var style = htmlMode.token(stream, state.htmlState);
|
||||
if (!htmlModeMissing) {
|
||||
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
||||
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
|
||||
(!inner.state.context && inner.state.tokenize.isInText)) ||
|
||||
(state.md_inside && stream.current().indexOf(">") > -1)) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
state.htmlState = null;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
function local(stream, state) {
|
||||
var currListInd = state.listStack[state.listStack.length - 1] || 0;
|
||||
var hasExitedList = state.indentation < currListInd;
|
||||
var maxFencedEndInd = currListInd + 3;
|
||||
if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
var returnType;
|
||||
if (!hasExitedList) returnType = getType(state)
|
||||
state.localMode = state.localState = null;
|
||||
state.block = blockNormal;
|
||||
state.f = inlineNormal;
|
||||
state.fencedEndRE = null;
|
||||
state.code = 0
|
||||
state.thisLine.fencedCodeEnd = true;
|
||||
if (hasExitedList) return switchBlock(stream, state, state.block);
|
||||
return returnType;
|
||||
} else if (state.localMode) {
|
||||
return state.localMode.token(stream, state.localState);
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
return tokenTypes.code;
|
||||
}
|
||||
}
|
||||
|
||||
// Inline
|
||||
function getType(state) {
|
||||
var styles = [];
|
||||
|
||||
if (state.formatting) {
|
||||
styles.push(tokenTypes.formatting);
|
||||
|
||||
if (typeof state.formatting === "string") state.formatting = [state.formatting];
|
||||
|
||||
for (var i = 0; i < state.formatting.length; i++) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
|
||||
|
||||
if (state.formatting[i] === "header") {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
|
||||
}
|
||||
|
||||
// Add `formatting-quote` and `formatting-quote-#` for blockquotes
|
||||
// Add `error` instead if the maximum blockquote nesting depth is passed
|
||||
if (state.formatting[i] === "quote") {
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
|
||||
} else {
|
||||
styles.push("error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state.taskOpen) {
|
||||
styles.push("meta");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
if (state.taskClosed) {
|
||||
styles.push("property");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
if (state.linkHref) {
|
||||
styles.push(tokenTypes.linkHref, "url");
|
||||
} else { // Only apply inline styles to non-url text
|
||||
if (state.strong) { styles.push(tokenTypes.strong); }
|
||||
if (state.em) { styles.push(tokenTypes.em); }
|
||||
if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
|
||||
if (state.emoji) { styles.push(tokenTypes.emoji); }
|
||||
if (state.linkText) { styles.push(tokenTypes.linkText); }
|
||||
if (state.code) { styles.push(tokenTypes.code); }
|
||||
if (state.image) { styles.push(tokenTypes.image); }
|
||||
if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
|
||||
if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
|
||||
}
|
||||
|
||||
if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
|
||||
|
||||
if (state.quote) {
|
||||
styles.push(tokenTypes.quote);
|
||||
|
||||
// Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.quote + "-" + state.quote);
|
||||
} else {
|
||||
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.list !== false) {
|
||||
var listMod = (state.listStack.length - 1) % 3;
|
||||
if (!listMod) {
|
||||
styles.push(tokenTypes.list1);
|
||||
} else if (listMod === 1) {
|
||||
styles.push(tokenTypes.list2);
|
||||
} else {
|
||||
styles.push(tokenTypes.list3);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.trailingSpaceNewLine) {
|
||||
styles.push("trailing-space-new-line");
|
||||
} else if (state.trailingSpace) {
|
||||
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
|
||||
}
|
||||
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
function handleText(stream, state) {
|
||||
if (stream.match(textRE, true)) {
|
||||
return getType(state);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function inlineNormal(stream, state) {
|
||||
var style = state.text(stream, state);
|
||||
if (typeof style !== 'undefined')
|
||||
return style;
|
||||
|
||||
if (state.list) { // List marker (*, +, -, 1., etc)
|
||||
state.list = null;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (state.taskList) {
|
||||
var taskOpen = stream.match(taskListRE, true)[1] === " ";
|
||||
if (taskOpen) state.taskOpen = true;
|
||||
else state.taskClosed = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "task";
|
||||
state.taskList = false;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
state.taskOpen = false;
|
||||
state.taskClosed = false;
|
||||
|
||||
if (state.header && stream.match(/^#+$/, true)) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
|
||||
// Matches link titles present on next line
|
||||
if (state.linkTitle) {
|
||||
state.linkTitle = false;
|
||||
var matchCh = ch;
|
||||
if (ch === '(') {
|
||||
matchCh = ')';
|
||||
}
|
||||
matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
|
||||
var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
|
||||
if (stream.match(new RegExp(regex), true)) {
|
||||
return tokenTypes.linkHref;
|
||||
}
|
||||
}
|
||||
|
||||
// If this block is changed, it may need to be updated in GFM mode
|
||||
if (ch === '`') {
|
||||
var previousFormatting = state.formatting;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code";
|
||||
stream.eatWhile('`');
|
||||
var count = stream.current().length
|
||||
if (state.code == 0 && (!state.quote || count == 1)) {
|
||||
state.code = count
|
||||
return getType(state)
|
||||
} else if (count == state.code) { // Must be exact
|
||||
var t = getType(state)
|
||||
state.code = 0
|
||||
return t
|
||||
} else {
|
||||
state.formatting = previousFormatting
|
||||
return getType(state)
|
||||
}
|
||||
} else if (state.code) {
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === '\\') {
|
||||
stream.next();
|
||||
if (modeCfg.highlightFormatting) {
|
||||
var type = getType(state);
|
||||
var formattingEscape = tokenTypes.formatting + "-escape";
|
||||
return type ? type + " " + formattingEscape : formattingEscape;
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
||||
state.imageMarker = true;
|
||||
state.image = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
|
||||
state.imageMarker = false;
|
||||
state.imageAltText = true
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === ']' && state.imageAltText) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "image";
|
||||
var type = getType(state);
|
||||
state.imageAltText = false;
|
||||
state.image = false;
|
||||
state.inline = state.f = linkHref;
|
||||
return type;
|
||||
}
|
||||
|
||||
if (ch === '[' && !state.image) {
|
||||
if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
|
||||
state.linkText = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === ']' && state.linkText) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
state.linkText = false;
|
||||
state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
|
||||
return type;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkEmail;
|
||||
}
|
||||
|
||||
if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
|
||||
var end = stream.string.indexOf(">", stream.pos);
|
||||
if (end != -1) {
|
||||
var atts = stream.string.substring(stream.start, end);
|
||||
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
|
||||
}
|
||||
stream.backUp(1);
|
||||
state.htmlState = CodeMirror.startState(htmlMode);
|
||||
return switchBlock(stream, state, htmlBlock);
|
||||
}
|
||||
|
||||
if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
|
||||
state.md_inside = false;
|
||||
return "tag";
|
||||
} else if (ch === "*" || ch === "_") {
|
||||
var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
|
||||
while (len < 3 && stream.eat(ch)) len++
|
||||
var after = stream.peek() || " "
|
||||
// See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
|
||||
var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
|
||||
var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
|
||||
var setEm = null, setStrong = null
|
||||
if (len % 2) { // Em
|
||||
if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
||||
setEm = true
|
||||
else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
||||
setEm = false
|
||||
}
|
||||
if (len > 1) { // Strong
|
||||
if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
||||
setStrong = true
|
||||
else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
||||
setStrong = false
|
||||
}
|
||||
if (setStrong != null || setEm != null) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
|
||||
if (setEm === true) state.em = ch
|
||||
if (setStrong === true) state.strong = ch
|
||||
var t = getType(state)
|
||||
if (setEm === false) state.em = false
|
||||
if (setStrong === false) state.strong = false
|
||||
return t
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeCfg.strikethrough) {
|
||||
if (ch === '~' && stream.eatWhile(ch)) {
|
||||
if (state.strikethrough) {// Remove strikethrough
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
var t = getType(state);
|
||||
state.strikethrough = false;
|
||||
return t;
|
||||
} else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
|
||||
state.strikethrough = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
return getType(state);
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.match('~~', true)) { // Probably surrounded by space
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
|
||||
state.emoji = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "emoji";
|
||||
var retType = getType(state);
|
||||
state.emoji = false;
|
||||
return retType;
|
||||
}
|
||||
|
||||
if (ch === ' ') {
|
||||
if (stream.match(/^ +$/, false)) {
|
||||
state.trailingSpace++;
|
||||
} else if (state.trailingSpace) {
|
||||
state.trailingSpaceNewLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
function linkInline(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === ">") {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
stream.match(/^[^>]+/, true);
|
||||
|
||||
return tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
function linkHref(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
var ch = stream.next();
|
||||
if (ch === '(' || ch === '[') {
|
||||
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
var linkRE = {
|
||||
")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
|
||||
"]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
|
||||
}
|
||||
|
||||
function getLinkHrefInside(endChar) {
|
||||
return function(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === endChar) {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
var returnState = getType(state);
|
||||
state.linkHref = false;
|
||||
return returnState;
|
||||
}
|
||||
|
||||
stream.match(linkRE[endChar])
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
};
|
||||
}
|
||||
|
||||
function footnoteLink(stream, state) {
|
||||
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
|
||||
state.f = footnoteLinkInside;
|
||||
stream.next(); // Consume [
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
state.linkText = true;
|
||||
return getType(state);
|
||||
}
|
||||
return switchInline(stream, state, inlineNormal);
|
||||
}
|
||||
|
||||
function footnoteLinkInside(stream, state) {
|
||||
if (stream.match(']:', true)) {
|
||||
state.f = state.inline = footnoteUrl;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var returnType = getType(state);
|
||||
state.linkText = false;
|
||||
return returnType;
|
||||
}
|
||||
|
||||
stream.match(/^([^\]\\]|\\.)+/, true);
|
||||
|
||||
return tokenTypes.linkText;
|
||||
}
|
||||
|
||||
function footnoteUrl(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
// Match URL
|
||||
stream.match(/^[^\s]+/, true);
|
||||
// Check for link title
|
||||
if (stream.peek() === undefined) { // End of line, set flag to check next line
|
||||
state.linkTitle = true;
|
||||
} else { // More content on line, check if link title
|
||||
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true);
|
||||
}
|
||||
state.f = state.inline = inlineNormal;
|
||||
return tokenTypes.linkHref + " url";
|
||||
}
|
||||
|
||||
var mode = {
|
||||
startState: function() {
|
||||
return {
|
||||
f: blockNormal,
|
||||
|
||||
prevLine: {stream: null},
|
||||
thisLine: {stream: null},
|
||||
|
||||
block: blockNormal,
|
||||
htmlState: null,
|
||||
indentation: 0,
|
||||
|
||||
inline: inlineNormal,
|
||||
text: handleText,
|
||||
|
||||
formatting: false,
|
||||
linkText: false,
|
||||
linkHref: false,
|
||||
linkTitle: false,
|
||||
code: 0,
|
||||
em: false,
|
||||
strong: false,
|
||||
header: 0,
|
||||
setext: 0,
|
||||
hr: false,
|
||||
taskList: false,
|
||||
list: false,
|
||||
listStack: [],
|
||||
quote: 0,
|
||||
trailingSpace: 0,
|
||||
trailingSpaceNewLine: false,
|
||||
strikethrough: false,
|
||||
emoji: false,
|
||||
fencedEndRE: null
|
||||
};
|
||||
},
|
||||
|
||||
copyState: function(s) {
|
||||
return {
|
||||
f: s.f,
|
||||
|
||||
prevLine: s.prevLine,
|
||||
thisLine: s.thisLine,
|
||||
|
||||
block: s.block,
|
||||
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
||||
indentation: s.indentation,
|
||||
|
||||
localMode: s.localMode,
|
||||
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
||||
|
||||
inline: s.inline,
|
||||
text: s.text,
|
||||
formatting: false,
|
||||
linkText: s.linkText,
|
||||
linkTitle: s.linkTitle,
|
||||
linkHref: s.linkHref,
|
||||
code: s.code,
|
||||
em: s.em,
|
||||
strong: s.strong,
|
||||
strikethrough: s.strikethrough,
|
||||
emoji: s.emoji,
|
||||
header: s.header,
|
||||
setext: s.setext,
|
||||
hr: s.hr,
|
||||
taskList: s.taskList,
|
||||
list: s.list,
|
||||
listStack: s.listStack.slice(0),
|
||||
quote: s.quote,
|
||||
indentedCode: s.indentedCode,
|
||||
trailingSpace: s.trailingSpace,
|
||||
trailingSpaceNewLine: s.trailingSpaceNewLine,
|
||||
md_inside: s.md_inside,
|
||||
fencedEndRE: s.fencedEndRE
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
|
||||
// Reset state.formatting
|
||||
state.formatting = false;
|
||||
|
||||
if (stream != state.thisLine.stream) {
|
||||
state.header = 0;
|
||||
state.hr = false;
|
||||
|
||||
if (stream.match(/^\s*$/, true)) {
|
||||
blankLine(state);
|
||||
return null;
|
||||
}
|
||||
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = {stream: stream}
|
||||
|
||||
// Reset state.taskList
|
||||
state.taskList = false;
|
||||
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
|
||||
if (!state.localState) {
|
||||
state.f = state.block;
|
||||
if (state.f != htmlBlock) {
|
||||
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
|
||||
state.indentation = indentation;
|
||||
state.indentationDiff = null;
|
||||
if (indentation > 0) return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return state.f(stream, state);
|
||||
},
|
||||
|
||||
innerMode: function(state) {
|
||||
if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
|
||||
if (state.localState) return {state: state.localState, mode: state.localMode};
|
||||
return {state: state, mode: mode};
|
||||
},
|
||||
|
||||
indent: function(state, textAfter, line) {
|
||||
if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
|
||||
if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
|
||||
return CodeMirror.Pass
|
||||
},
|
||||
|
||||
blankLine: blankLine,
|
||||
|
||||
getType: getType,
|
||||
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
closeBrackets: "()[]{}''\"\"``",
|
||||
fold: "markdown"
|
||||
};
|
||||
return mode;
|
||||
}, "xml");
|
||||
|
||||
CodeMirror.defineMIME("text/markdown", "markdown");
|
||||
|
||||
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
||||
|
||||
});
|
||||
178
wwws/apx/src/static/lib/codemirror/nginx/nginx.js
Normal file
402
wwws/apx/src/static/lib/codemirror/python/python.js
Normal file
@@ -0,0 +1,402 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
function wordRegexp(words) {
|
||||
return new RegExp("^((" + words.join(")|(") + "))\\b");
|
||||
}
|
||||
|
||||
var wordOperators = wordRegexp(["and", "or", "not", "is"]);
|
||||
var commonKeywords = ["as", "assert", "break", "class", "continue",
|
||||
"def", "del", "elif", "else", "except", "finally",
|
||||
"for", "from", "global", "if", "import",
|
||||
"lambda", "pass", "raise", "return",
|
||||
"try", "while", "with", "yield", "in", "False", "True"];
|
||||
var commonBuiltins = ["abs", "all", "any", "bin", "bool", "bytearray", "callable", "chr",
|
||||
"classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod",
|
||||
"enumerate", "eval", "filter", "float", "format", "frozenset",
|
||||
"getattr", "globals", "hasattr", "hash", "help", "hex", "id",
|
||||
"input", "int", "isinstance", "issubclass", "iter", "len",
|
||||
"list", "locals", "map", "max", "memoryview", "min", "next",
|
||||
"object", "oct", "open", "ord", "pow", "property", "range",
|
||||
"repr", "reversed", "round", "set", "setattr", "slice",
|
||||
"sorted", "staticmethod", "str", "sum", "super", "tuple",
|
||||
"type", "vars", "zip", "__import__", "NotImplemented",
|
||||
"Ellipsis", "__debug__"];
|
||||
CodeMirror.registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins).concat(["exec", "print"]));
|
||||
|
||||
function top(state) {
|
||||
return state.scopes[state.scopes.length - 1];
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("python", function(conf, parserConf) {
|
||||
var ERRORCLASS = "error";
|
||||
|
||||
var delimiters = parserConf.delimiters || parserConf.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/;
|
||||
// (Backwards-compatibility with old, cumbersome config system)
|
||||
var operators = [parserConf.singleOperators, parserConf.doubleOperators, parserConf.doubleDelimiters, parserConf.tripleDelimiters,
|
||||
parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/]
|
||||
for (var i = 0; i < operators.length; i++) if (!operators[i]) operators.splice(i--, 1)
|
||||
|
||||
var hangingIndent = parserConf.hangingIndent || conf.indentUnit;
|
||||
|
||||
var myKeywords = commonKeywords, myBuiltins = commonBuiltins;
|
||||
if (parserConf.extra_keywords != undefined)
|
||||
myKeywords = myKeywords.concat(parserConf.extra_keywords);
|
||||
|
||||
if (parserConf.extra_builtins != undefined)
|
||||
myBuiltins = myBuiltins.concat(parserConf.extra_builtins);
|
||||
|
||||
var py3 = !(parserConf.version && Number(parserConf.version) < 3)
|
||||
if (py3) {
|
||||
// since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator
|
||||
var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
|
||||
myKeywords = myKeywords.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]);
|
||||
myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]);
|
||||
var stringPrefixes = new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|\"{3}|['\"]))", "i");
|
||||
} else {
|
||||
var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/;
|
||||
myKeywords = myKeywords.concat(["exec", "print"]);
|
||||
myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile",
|
||||
"file", "intern", "long", "raw_input", "reduce", "reload",
|
||||
"unichr", "unicode", "xrange", "None"]);
|
||||
var stringPrefixes = new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i");
|
||||
}
|
||||
var keywords = wordRegexp(myKeywords);
|
||||
var builtins = wordRegexp(myBuiltins);
|
||||
|
||||
// tokenizers
|
||||
function tokenBase(stream, state) {
|
||||
var sol = stream.sol() && state.lastToken != "\\"
|
||||
if (sol) state.indent = stream.indentation()
|
||||
// Handle scope changes
|
||||
if (sol && top(state).type == "py") {
|
||||
var scopeOffset = top(state).offset;
|
||||
if (stream.eatSpace()) {
|
||||
var lineOffset = stream.indentation();
|
||||
if (lineOffset > scopeOffset)
|
||||
pushPyScope(state);
|
||||
else if (lineOffset < scopeOffset && dedent(stream, state) && stream.peek() != "#")
|
||||
state.errorToken = true;
|
||||
return null;
|
||||
} else {
|
||||
var style = tokenBaseInner(stream, state);
|
||||
if (scopeOffset > 0 && dedent(stream, state))
|
||||
style += " " + ERRORCLASS;
|
||||
return style;
|
||||
}
|
||||
}
|
||||
return tokenBaseInner(stream, state);
|
||||
}
|
||||
|
||||
function tokenBaseInner(stream, state, inFormat) {
|
||||
if (stream.eatSpace()) return null;
|
||||
|
||||
// Handle Comments
|
||||
if (!inFormat && stream.match(/^#.*/)) return "comment";
|
||||
|
||||
// Handle Number Literals
|
||||
if (stream.match(/^[0-9\.]/, false)) {
|
||||
var floatLiteral = false;
|
||||
// Floats
|
||||
if (stream.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; }
|
||||
if (stream.match(/^[\d_]+\.\d*/)) { floatLiteral = true; }
|
||||
if (stream.match(/^\.\d+/)) { floatLiteral = true; }
|
||||
if (floatLiteral) {
|
||||
// Float literals may be "imaginary"
|
||||
stream.eat(/J/i);
|
||||
return "number";
|
||||
}
|
||||
// Integers
|
||||
var intLiteral = false;
|
||||
// Hex
|
||||
if (stream.match(/^0x[0-9a-f_]+/i)) intLiteral = true;
|
||||
// Binary
|
||||
if (stream.match(/^0b[01_]+/i)) intLiteral = true;
|
||||
// Octal
|
||||
if (stream.match(/^0o[0-7_]+/i)) intLiteral = true;
|
||||
// Decimal
|
||||
if (stream.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)) {
|
||||
// Decimal literals may be "imaginary"
|
||||
stream.eat(/J/i);
|
||||
// TODO - Can you have imaginary longs?
|
||||
intLiteral = true;
|
||||
}
|
||||
// Zero by itself with no other piece of number.
|
||||
if (stream.match(/^0(?![\dx])/i)) intLiteral = true;
|
||||
if (intLiteral) {
|
||||
// Integer literals may be "long"
|
||||
stream.eat(/L/i);
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
|
||||
// Handle Strings
|
||||
if (stream.match(stringPrefixes)) {
|
||||
var isFmtString = stream.current().toLowerCase().indexOf('f') !== -1;
|
||||
if (!isFmtString) {
|
||||
state.tokenize = tokenStringFactory(stream.current(), state.tokenize);
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
state.tokenize = formatStringFactory(stream.current(), state.tokenize);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < operators.length; i++)
|
||||
if (stream.match(operators[i])) return "operator"
|
||||
|
||||
if (stream.match(delimiters)) return "punctuation";
|
||||
|
||||
if (state.lastToken == "." && stream.match(identifiers))
|
||||
return "property";
|
||||
|
||||
if (stream.match(keywords) || stream.match(wordOperators))
|
||||
return "keyword";
|
||||
|
||||
if (stream.match(builtins))
|
||||
return "builtin";
|
||||
|
||||
if (stream.match(/^(self|cls)\b/))
|
||||
return "variable-2";
|
||||
|
||||
if (stream.match(identifiers)) {
|
||||
if (state.lastToken == "def" || state.lastToken == "class")
|
||||
return "def";
|
||||
return "variable";
|
||||
}
|
||||
|
||||
// Handle non-detected items
|
||||
stream.next();
|
||||
return inFormat ? null :ERRORCLASS;
|
||||
}
|
||||
|
||||
function formatStringFactory(delimiter, tokenOuter) {
|
||||
while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
|
||||
delimiter = delimiter.substr(1);
|
||||
|
||||
var singleline = delimiter.length == 1;
|
||||
var OUTCLASS = "string";
|
||||
|
||||
function tokenNestedExpr(depth) {
|
||||
return function(stream, state) {
|
||||
var inner = tokenBaseInner(stream, state, true)
|
||||
if (inner == "punctuation") {
|
||||
if (stream.current() == "{") {
|
||||
state.tokenize = tokenNestedExpr(depth + 1)
|
||||
} else if (stream.current() == "}") {
|
||||
if (depth > 1) state.tokenize = tokenNestedExpr(depth - 1)
|
||||
else state.tokenize = tokenString
|
||||
}
|
||||
}
|
||||
return inner
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
stream.eatWhile(/[^'"\{\}\\]/);
|
||||
if (stream.eat("\\")) {
|
||||
stream.next();
|
||||
if (singleline && stream.eol())
|
||||
return OUTCLASS;
|
||||
} else if (stream.match(delimiter)) {
|
||||
state.tokenize = tokenOuter;
|
||||
return OUTCLASS;
|
||||
} else if (stream.match('{{')) {
|
||||
// ignore {{ in f-str
|
||||
return OUTCLASS;
|
||||
} else if (stream.match('{', false)) {
|
||||
// switch to nested mode
|
||||
state.tokenize = tokenNestedExpr(0)
|
||||
if (stream.current()) return OUTCLASS;
|
||||
else return state.tokenize(stream, state)
|
||||
} else if (stream.match('}}')) {
|
||||
return OUTCLASS;
|
||||
} else if (stream.match('}')) {
|
||||
// single } in f-string is an error
|
||||
return ERRORCLASS;
|
||||
} else {
|
||||
stream.eat(/['"]/);
|
||||
}
|
||||
}
|
||||
if (singleline) {
|
||||
if (parserConf.singleLineStringErrors)
|
||||
return ERRORCLASS;
|
||||
else
|
||||
state.tokenize = tokenOuter;
|
||||
}
|
||||
return OUTCLASS;
|
||||
}
|
||||
tokenString.isString = true;
|
||||
return tokenString;
|
||||
}
|
||||
|
||||
function tokenStringFactory(delimiter, tokenOuter) {
|
||||
while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
|
||||
delimiter = delimiter.substr(1);
|
||||
|
||||
var singleline = delimiter.length == 1;
|
||||
var OUTCLASS = "string";
|
||||
|
||||
function tokenString(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
stream.eatWhile(/[^'"\\]/);
|
||||
if (stream.eat("\\")) {
|
||||
stream.next();
|
||||
if (singleline && stream.eol())
|
||||
return OUTCLASS;
|
||||
} else if (stream.match(delimiter)) {
|
||||
state.tokenize = tokenOuter;
|
||||
return OUTCLASS;
|
||||
} else {
|
||||
stream.eat(/['"]/);
|
||||
}
|
||||
}
|
||||
if (singleline) {
|
||||
if (parserConf.singleLineStringErrors)
|
||||
return ERRORCLASS;
|
||||
else
|
||||
state.tokenize = tokenOuter;
|
||||
}
|
||||
return OUTCLASS;
|
||||
}
|
||||
tokenString.isString = true;
|
||||
return tokenString;
|
||||
}
|
||||
|
||||
function pushPyScope(state) {
|
||||
while (top(state).type != "py") state.scopes.pop()
|
||||
state.scopes.push({offset: top(state).offset + conf.indentUnit,
|
||||
type: "py",
|
||||
align: null})
|
||||
}
|
||||
|
||||
function pushBracketScope(stream, state, type) {
|
||||
var align = stream.match(/^[\s\[\{\(]*(?:#|$)/, false) ? null : stream.column() + 1
|
||||
state.scopes.push({offset: state.indent + hangingIndent,
|
||||
type: type,
|
||||
align: align})
|
||||
}
|
||||
|
||||
function dedent(stream, state) {
|
||||
var indented = stream.indentation();
|
||||
while (state.scopes.length > 1 && top(state).offset > indented) {
|
||||
if (top(state).type != "py") return true;
|
||||
state.scopes.pop();
|
||||
}
|
||||
return top(state).offset != indented;
|
||||
}
|
||||
|
||||
function tokenLexer(stream, state) {
|
||||
if (stream.sol()) {
|
||||
state.beginningOfLine = true;
|
||||
state.dedent = false;
|
||||
}
|
||||
|
||||
var style = state.tokenize(stream, state);
|
||||
var current = stream.current();
|
||||
|
||||
// Handle decorators
|
||||
if (state.beginningOfLine && current == "@")
|
||||
return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS;
|
||||
|
||||
if (/\S/.test(current)) state.beginningOfLine = false;
|
||||
|
||||
if ((style == "variable" || style == "builtin")
|
||||
&& state.lastToken == "meta")
|
||||
style = "meta";
|
||||
|
||||
// Handle scope changes.
|
||||
if (current == "pass" || current == "return")
|
||||
state.dedent = true;
|
||||
|
||||
if (current == "lambda") state.lambda = true;
|
||||
if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\s*(?:#|$)/, false))
|
||||
pushPyScope(state);
|
||||
|
||||
if (current.length == 1 && !/string|comment/.test(style)) {
|
||||
var delimiter_index = "[({".indexOf(current);
|
||||
if (delimiter_index != -1)
|
||||
pushBracketScope(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
|
||||
|
||||
delimiter_index = "])}".indexOf(current);
|
||||
if (delimiter_index != -1) {
|
||||
if (top(state).type == current) state.indent = state.scopes.pop().offset - hangingIndent
|
||||
else return ERRORCLASS;
|
||||
}
|
||||
}
|
||||
if (state.dedent && stream.eol() && top(state).type == "py" && state.scopes.length > 1)
|
||||
state.scopes.pop();
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
var external = {
|
||||
startState: function(basecolumn) {
|
||||
return {
|
||||
tokenize: tokenBase,
|
||||
scopes: [{offset: basecolumn || 0, type: "py", align: null}],
|
||||
indent: basecolumn || 0,
|
||||
lastToken: null,
|
||||
lambda: false,
|
||||
dedent: 0
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
var addErr = state.errorToken;
|
||||
if (addErr) state.errorToken = false;
|
||||
var style = tokenLexer(stream, state);
|
||||
|
||||
if (style && style != "comment")
|
||||
state.lastToken = (style == "keyword" || style == "punctuation") ? stream.current() : style;
|
||||
if (style == "punctuation") style = null;
|
||||
|
||||
if (stream.eol() && state.lambda)
|
||||
state.lambda = false;
|
||||
return addErr ? style + " " + ERRORCLASS : style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize != tokenBase)
|
||||
return state.tokenize.isString ? CodeMirror.Pass : 0;
|
||||
|
||||
var scope = top(state)
|
||||
var closing = scope.type == textAfter.charAt(0) ||
|
||||
scope.type == "py" && !state.dedent && /^(else:|elif |except |finally:)/.test(textAfter)
|
||||
if (scope.align != null)
|
||||
return scope.align - (closing ? 1 : 0)
|
||||
else
|
||||
return scope.offset - (closing ? hangingIndent : 0)
|
||||
},
|
||||
|
||||
electricInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
|
||||
closeBrackets: {triples: "'\""},
|
||||
lineComment: "#",
|
||||
fold: "indent"
|
||||
};
|
||||
return external;
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-python", "python");
|
||||
|
||||
var words = function(str) { return str.split(" "); };
|
||||
|
||||
CodeMirror.defineMIME("text/x-cython", {
|
||||
name: "python",
|
||||
extra_keywords: words("by cdef cimport cpdef ctypedef enum except "+
|
||||
"extern gil include nogil property public "+
|
||||
"readonly struct union DEF IF ELIF ELSE")
|
||||
});
|
||||
|
||||
});
|
||||
459
wwws/apx/src/static/lib/codemirror/sass/sass.js
Normal file
@@ -0,0 +1,459 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../css/css"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../css/css"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("sass", function(config) {
|
||||
var cssMode = CodeMirror.mimeModes["text/css"];
|
||||
var propertyKeywords = cssMode.propertyKeywords || {},
|
||||
colorKeywords = cssMode.colorKeywords || {},
|
||||
valueKeywords = cssMode.valueKeywords || {},
|
||||
fontProperties = cssMode.fontProperties || {};
|
||||
|
||||
function tokenRegexp(words) {
|
||||
return new RegExp("^" + words.join("|"));
|
||||
}
|
||||
|
||||
var keywords = ["true", "false", "null", "auto"];
|
||||
var keywordsRegexp = new RegExp("^" + keywords.join("|"));
|
||||
|
||||
var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-",
|
||||
"\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"];
|
||||
var opRegexp = tokenRegexp(operators);
|
||||
|
||||
var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/;
|
||||
|
||||
var word;
|
||||
|
||||
function isEndLine(stream) {
|
||||
return !stream.peek() || stream.match(/\s+$/, false);
|
||||
}
|
||||
|
||||
function urlTokens(stream, state) {
|
||||
var ch = stream.peek();
|
||||
|
||||
if (ch === ")") {
|
||||
stream.next();
|
||||
state.tokenizer = tokenBase;
|
||||
return "operator";
|
||||
} else if (ch === "(") {
|
||||
stream.next();
|
||||
stream.eatSpace();
|
||||
|
||||
return "operator";
|
||||
} else if (ch === "'" || ch === '"') {
|
||||
state.tokenizer = buildStringTokenizer(stream.next());
|
||||
return "string";
|
||||
} else {
|
||||
state.tokenizer = buildStringTokenizer(")", false);
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
function comment(indentation, multiLine) {
|
||||
return function(stream, state) {
|
||||
if (stream.sol() && stream.indentation() <= indentation) {
|
||||
state.tokenizer = tokenBase;
|
||||
return tokenBase(stream, state);
|
||||
}
|
||||
|
||||
if (multiLine && stream.skipTo("*/")) {
|
||||
stream.next();
|
||||
stream.next();
|
||||
state.tokenizer = tokenBase;
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
}
|
||||
|
||||
return "comment";
|
||||
};
|
||||
}
|
||||
|
||||
function buildStringTokenizer(quote, greedy) {
|
||||
if (greedy == null) { greedy = true; }
|
||||
|
||||
function stringTokenizer(stream, state) {
|
||||
var nextChar = stream.next();
|
||||
var peekChar = stream.peek();
|
||||
var previousChar = stream.string.charAt(stream.pos-2);
|
||||
|
||||
var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));
|
||||
|
||||
if (endingString) {
|
||||
if (nextChar !== quote && greedy) { stream.next(); }
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
state.tokenizer = tokenBase;
|
||||
return "string";
|
||||
} else if (nextChar === "#" && peekChar === "{") {
|
||||
state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
|
||||
stream.next();
|
||||
return "operator";
|
||||
} else {
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
|
||||
return stringTokenizer;
|
||||
}
|
||||
|
||||
function buildInterpolationTokenizer(currentTokenizer) {
|
||||
return function(stream, state) {
|
||||
if (stream.peek() === "}") {
|
||||
stream.next();
|
||||
state.tokenizer = currentTokenizer;
|
||||
return "operator";
|
||||
} else {
|
||||
return tokenBase(stream, state);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function indent(state) {
|
||||
if (state.indentCount == 0) {
|
||||
state.indentCount++;
|
||||
var lastScopeOffset = state.scopes[0].offset;
|
||||
var currentOffset = lastScopeOffset + config.indentUnit;
|
||||
state.scopes.unshift({ offset:currentOffset });
|
||||
}
|
||||
}
|
||||
|
||||
function dedent(state) {
|
||||
if (state.scopes.length == 1) return;
|
||||
|
||||
state.scopes.shift();
|
||||
}
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.peek();
|
||||
|
||||
// Comment
|
||||
if (stream.match("/*")) {
|
||||
state.tokenizer = comment(stream.indentation(), true);
|
||||
return state.tokenizer(stream, state);
|
||||
}
|
||||
if (stream.match("//")) {
|
||||
state.tokenizer = comment(stream.indentation(), false);
|
||||
return state.tokenizer(stream, state);
|
||||
}
|
||||
|
||||
// Interpolation
|
||||
if (stream.match("#{")) {
|
||||
state.tokenizer = buildInterpolationTokenizer(tokenBase);
|
||||
return "operator";
|
||||
}
|
||||
|
||||
// Strings
|
||||
if (ch === '"' || ch === "'") {
|
||||
stream.next();
|
||||
state.tokenizer = buildStringTokenizer(ch);
|
||||
return "string";
|
||||
}
|
||||
|
||||
if(!state.cursorHalf){// state.cursorHalf === 0
|
||||
// first half i.e. before : for key-value pairs
|
||||
// including selectors
|
||||
|
||||
if (ch === "-") {
|
||||
if (stream.match(/^-\w+-/)) {
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === ".") {
|
||||
stream.next();
|
||||
if (stream.match(/^[\w-]+/)) {
|
||||
indent(state);
|
||||
return "qualifier";
|
||||
} else if (stream.peek() === "#") {
|
||||
indent(state);
|
||||
return "tag";
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === "#") {
|
||||
stream.next();
|
||||
// ID selectors
|
||||
if (stream.match(/^[\w-]+/)) {
|
||||
indent(state);
|
||||
return "builtin";
|
||||
}
|
||||
if (stream.peek() === "#") {
|
||||
indent(state);
|
||||
return "tag";
|
||||
}
|
||||
}
|
||||
|
||||
// Variables
|
||||
if (ch === "$") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
return "variable-2";
|
||||
}
|
||||
|
||||
// Numbers
|
||||
if (stream.match(/^-?[0-9\.]+/))
|
||||
return "number";
|
||||
|
||||
// Units
|
||||
if (stream.match(/^(px|em|in)\b/))
|
||||
return "unit";
|
||||
|
||||
if (stream.match(keywordsRegexp))
|
||||
return "keyword";
|
||||
|
||||
if (stream.match(/^url/) && stream.peek() === "(") {
|
||||
state.tokenizer = urlTokens;
|
||||
return "atom";
|
||||
}
|
||||
|
||||
if (ch === "=") {
|
||||
// Match shortcut mixin definition
|
||||
if (stream.match(/^=[\w-]+/)) {
|
||||
indent(state);
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === "+") {
|
||||
// Match shortcut mixin definition
|
||||
if (stream.match(/^\+[\w-]+/)){
|
||||
return "variable-3";
|
||||
}
|
||||
}
|
||||
|
||||
if(ch === "@"){
|
||||
if(stream.match('@extend')){
|
||||
if(!stream.match(/\s*[\w]/))
|
||||
dedent(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Indent Directives
|
||||
if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
|
||||
indent(state);
|
||||
return "def";
|
||||
}
|
||||
|
||||
// Other Directives
|
||||
if (ch === "@") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
return "def";
|
||||
}
|
||||
|
||||
if (stream.eatWhile(/[\w-]/)){
|
||||
if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){
|
||||
word = stream.current().toLowerCase();
|
||||
var prop = state.prevProp + "-" + word;
|
||||
if (propertyKeywords.hasOwnProperty(prop)) {
|
||||
return "property";
|
||||
} else if (propertyKeywords.hasOwnProperty(word)) {
|
||||
state.prevProp = word;
|
||||
return "property";
|
||||
} else if (fontProperties.hasOwnProperty(word)) {
|
||||
return "property";
|
||||
}
|
||||
return "tag";
|
||||
}
|
||||
else if(stream.match(/ *:/,false)){
|
||||
indent(state);
|
||||
state.cursorHalf = 1;
|
||||
state.prevProp = stream.current().toLowerCase();
|
||||
return "property";
|
||||
}
|
||||
else if(stream.match(/ *,/,false)){
|
||||
return "tag";
|
||||
}
|
||||
else{
|
||||
indent(state);
|
||||
return "tag";
|
||||
}
|
||||
}
|
||||
|
||||
if(ch === ":"){
|
||||
if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element
|
||||
return "variable-3";
|
||||
}
|
||||
stream.next();
|
||||
state.cursorHalf=1;
|
||||
return "operator";
|
||||
}
|
||||
|
||||
} // cursorHalf===0 ends here
|
||||
else{
|
||||
|
||||
if (ch === "#") {
|
||||
stream.next();
|
||||
// Hex numbers
|
||||
if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
|
||||
// Numbers
|
||||
if (stream.match(/^-?[0-9\.]+/)){
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "number";
|
||||
}
|
||||
|
||||
// Units
|
||||
if (stream.match(/^(px|em|in)\b/)){
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "unit";
|
||||
}
|
||||
|
||||
if (stream.match(keywordsRegexp)){
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
if (stream.match(/^url/) && stream.peek() === "(") {
|
||||
state.tokenizer = urlTokens;
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "atom";
|
||||
}
|
||||
|
||||
// Variables
|
||||
if (ch === "$") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "variable-2";
|
||||
}
|
||||
|
||||
// bang character for !important, !default, etc.
|
||||
if (ch === "!") {
|
||||
stream.next();
|
||||
state.cursorHalf = 0;
|
||||
return stream.match(/^[\w]+/) ? "keyword": "operator";
|
||||
}
|
||||
|
||||
if (stream.match(opRegexp)){
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "operator";
|
||||
}
|
||||
|
||||
// attributes
|
||||
if (stream.eatWhile(/[\w-]/)) {
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
word = stream.current().toLowerCase();
|
||||
if (valueKeywords.hasOwnProperty(word)) {
|
||||
return "atom";
|
||||
} else if (colorKeywords.hasOwnProperty(word)) {
|
||||
return "keyword";
|
||||
} else if (propertyKeywords.hasOwnProperty(word)) {
|
||||
state.prevProp = stream.current().toLowerCase();
|
||||
return "property";
|
||||
} else {
|
||||
return "tag";
|
||||
}
|
||||
}
|
||||
|
||||
//stream.eatSpace();
|
||||
if (isEndLine(stream)) {
|
||||
state.cursorHalf = 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
} // else ends here
|
||||
|
||||
if (stream.match(opRegexp))
|
||||
return "operator";
|
||||
|
||||
// If we haven't returned by now, we move 1 character
|
||||
// and return an error
|
||||
stream.next();
|
||||
return null;
|
||||
}
|
||||
|
||||
function tokenLexer(stream, state) {
|
||||
if (stream.sol()) state.indentCount = 0;
|
||||
var style = state.tokenizer(stream, state);
|
||||
var current = stream.current();
|
||||
|
||||
if (current === "@return" || current === "}"){
|
||||
dedent(state);
|
||||
}
|
||||
|
||||
if (style !== null) {
|
||||
var startOfToken = stream.pos - current.length;
|
||||
|
||||
var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);
|
||||
|
||||
var newScopes = [];
|
||||
|
||||
for (var i = 0; i < state.scopes.length; i++) {
|
||||
var scope = state.scopes[i];
|
||||
|
||||
if (scope.offset <= withCurrentIndent)
|
||||
newScopes.push(scope);
|
||||
}
|
||||
|
||||
state.scopes = newScopes;
|
||||
}
|
||||
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function() {
|
||||
return {
|
||||
tokenizer: tokenBase,
|
||||
scopes: [{offset: 0, type: "sass"}],
|
||||
indentCount: 0,
|
||||
cursorHalf: 0, // cursor half tells us if cursor lies after (1)
|
||||
// or before (0) colon (well... more or less)
|
||||
definedVars: [],
|
||||
definedMixins: []
|
||||
};
|
||||
},
|
||||
token: function(stream, state) {
|
||||
var style = tokenLexer(stream, state);
|
||||
|
||||
state.lastToken = { style: style, content: stream.current() };
|
||||
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state) {
|
||||
return state.scopes[0].offset;
|
||||
},
|
||||
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
lineComment: "//",
|
||||
fold: "indent"
|
||||
};
|
||||
}, "css");
|
||||
|
||||
CodeMirror.defineMIME("text/x-sass", "sass");
|
||||
|
||||
});
|
||||
1
wwws/apx/src/static/lib/dayjs/dayjs.min.js
vendored
Normal file
4
wwws/apx/src/static/lib/dayjs/plugin/advancedFormat.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/advancedFormat.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}}));
|
||||
10
wwws/apx/src/static/lib/dayjs/plugin/arraySupport.d.ts
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface ConfigTypeMap {
|
||||
arraySupport: [number?, number?, number?, number?, number?, number?, number?]
|
||||
}
|
||||
}
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/arraySupport.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_arraySupport=t()}(this,(function(){"use strict";return function(e,t,n){var o=t.prototype,i=function(e){var t=e.date,o=e.utc;return Array.isArray(t)?o?t.length?new Date(Date.UTC.apply(null,t)):new Date:1===t.length?n(String(t[0])).toDate():new(Function.prototype.bind.apply(Date,[null].concat(t))):t},a=o.parse;o.parse=function(e){e.date=i.bind(this)(e),a.bind(this)(e)}}}));
|
||||
4
wwws/apx/src/static/lib/dayjs/plugin/badMutable.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/badMutable.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_badMutable=i()}(this,(function(){"use strict";return function(t,i){var n=i.prototype;n.$g=function(t,i,n){return this.$utils().u(t)?this[i]:this.$set(n,t)},n.set=function(t,i){return this.$set(t,i)};var e=n.startOf;n.startOf=function(t,i){return this.$d=e.bind(this)(t,i).toDate(),this.init(),this};var s=n.add;n.add=function(t,i){return this.$d=s.bind(this)(t,i).toDate(),this.init(),this};var o=n.locale;n.locale=function(t,i){return t?(this.$L=o.bind(this)(t,i).$L,this):this.$L};var r=n.daysInMonth;n.daysInMonth=function(){return r.bind(this.clone())()};var u=n.isSame;n.isSame=function(t,i){return u.bind(this.clone())(t,i)};var f=n.isBefore;n.isBefore=function(t,i){return f.bind(this.clone())(t,i)};var d=n.isAfter;n.isAfter=function(t,i){return d.bind(this.clone())(t,i)}}}));
|
||||
11
wwws/apx/src/static/lib/dayjs/plugin/bigIntSupport.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface ConfigTypeMap {
|
||||
bigIntSupport: BigInt
|
||||
}
|
||||
export function unix(t: BigInt): Dayjs
|
||||
}
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/bigIntSupport.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_bigIntSupport=e()}(this,(function(){"use strict";var n=function(n){return"bigint"==typeof n};return function(e,t,i){var o=t.prototype,u=function(e){var t=e.date;return n(t)?Number(t):t},r=o.parse;o.parse=function(n){n.date=u.bind(this)(n),r.bind(this)(n)};var f=i.unix;i.unix=function(e){var t=n(e)?Number(e):e;return f(t)}}}));
|
||||
4
wwws/apx/src/static/lib/dayjs/plugin/buddhistEra.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/buddhistEra.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_buddhistEra=e()}(this,(function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g,(function(t,n){var i,o=String(e.$y+543),f="BB"===t?[o.slice(-2),2]:[o,4];return n||(i=e.$utils()).s.apply(i,f.concat(["0"]))}));return i.bind(this)(n)}}}));
|
||||
10
wwws/apx/src/static/lib/dayjs/plugin/calendar.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PluginFunc, ConfigType } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface Dayjs {
|
||||
calendar(referenceTime?: ConfigType, formats?: object): string
|
||||
}
|
||||
}
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/calendar.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_calendar=t()}(this,(function(){"use strict";return function(e,t,a){var n="h:mm A",d={lastDay:"[Yesterday at] "+n,sameDay:"[Today at] "+n,nextDay:"[Tomorrow at] "+n,nextWeek:"dddd [at] "+n,lastWeek:"[Last] dddd [at] "+n,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var n=t||this.$locale().calendar||d,o=a(e||void 0).startOf("d"),s=this.diff(o,"d",!0),i="sameElse",f=s<-6?i:s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":i,l=n[f]||d[f];return"function"==typeof l?l.call(this,a()):this.format(l)}}}));
|
||||
8
wwws/apx/src/static/lib/dayjs/plugin/customParseFormat.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare interface PluginOptions {
|
||||
parseTwoDigitYear?: (yearString: string) => number
|
||||
}
|
||||
|
||||
declare const plugin: PluginFunc<PluginOptions>
|
||||
export = plugin
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}}));
|
||||
11
wwws/apx/src/static/lib/dayjs/plugin/dayOfYear.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface Dayjs {
|
||||
dayOfYear(): number
|
||||
dayOfYear(value: number): Dayjs
|
||||
}
|
||||
}
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/dayOfYear.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_dayOfYear=t()}(this,(function(){"use strict";return function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf("day")-n(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"day")}}}));
|
||||
4
wwws/apx/src/static/lib/dayjs/plugin/devHelper.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/devHelper.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_devHelper=t()}(this,(function(){"use strict";return function(e,t,o){if(!process||"production"!==process.env.NODE_ENV){var s=t.prototype,n=s.parse;s.parse=function(e){var t=e.date;return"string"==typeof t&&13===t.length&&console.warn("To parse a Unix timestamp like "+t+", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"),"number"==typeof t&&4===String(t).length&&console.warn("Guessing you may want to parse the Year "+t+", you should pass it as a String "+t+", not a Number. Otherwise, "+t+" will be treated as a Unix timestamp"),e.args.length>=2&&!o.p.customParseFormat&&console.warn("To parse a date-time string like "+t+" using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"),n.bind(this)(e)};var a=o.locale;o.locale=function(e,t,s){return void 0===t&&"string"==typeof e&&(o.Ls[e]||console.warn("Guessing you may want to use locale "+e+", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs")),a(e,t,s)}}}}));
|
||||
88
wwws/apx/src/static/lib/dayjs/plugin/duration.d.ts
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
import { OpUnitType, UnitTypeLongPlural } from 'dayjs';
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export as namespace plugin;
|
||||
export = plugin
|
||||
|
||||
declare namespace plugin {
|
||||
/**
|
||||
* @deprecated Please use more strict types
|
||||
*/
|
||||
type DurationInputType = string | number | object
|
||||
/**
|
||||
* @deprecated Please use more strict types
|
||||
*/
|
||||
type DurationAddType = number | object | Duration
|
||||
|
||||
type DurationUnitsObjectType = Partial<{
|
||||
[unit in Exclude<UnitTypeLongPlural, "dates"> | "weeks"]: number
|
||||
}>;
|
||||
type DurationUnitType = Exclude<OpUnitType, "date" | "dates">
|
||||
type CreateDurationType =
|
||||
((units: DurationUnitsObjectType) => Duration)
|
||||
& ((time: number, unit?: DurationUnitType) => Duration)
|
||||
& ((ISO_8601: string) => Duration)
|
||||
type AddDurationType = CreateDurationType & ((duration: Duration) => Duration)
|
||||
|
||||
interface Duration {
|
||||
new (input: string | number | object, unit?: string, locale?: string): Duration
|
||||
|
||||
clone(): Duration
|
||||
|
||||
humanize(withSuffix?: boolean): string
|
||||
|
||||
milliseconds(): number
|
||||
asMilliseconds(): number
|
||||
|
||||
seconds(): number
|
||||
asSeconds(): number
|
||||
|
||||
minutes(): number
|
||||
asMinutes(): number
|
||||
|
||||
hours(): number
|
||||
asHours(): number
|
||||
|
||||
days(): number
|
||||
asDays(): number
|
||||
|
||||
weeks(): number
|
||||
asWeeks(): number
|
||||
|
||||
months(): number
|
||||
asMonths(): number
|
||||
|
||||
years(): number
|
||||
asYears(): number
|
||||
|
||||
as(unit: DurationUnitType): number
|
||||
|
||||
get(unit: DurationUnitType): number
|
||||
|
||||
add: AddDurationType
|
||||
|
||||
subtract: AddDurationType
|
||||
|
||||
toJSON(): string
|
||||
|
||||
toISOString(): string
|
||||
|
||||
format(formatStr?: string): string
|
||||
|
||||
locale(locale: string): Duration
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface Dayjs {
|
||||
add(duration: plugin.Duration): Dayjs
|
||||
subtract(duration: plugin.Duration): Dayjs
|
||||
}
|
||||
|
||||
/**
|
||||
* @param time If unit is not present, time treated as number of milliseconds
|
||||
*/
|
||||
export const duration: plugin.CreateDurationType;
|
||||
export function isDuration(d: any): d is plugin.Duration
|
||||
}
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/duration.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2592e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,"Y"),s=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),e=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=v(o,"S"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",h=(d?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===h||"-P"===h?"P0D":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/h[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}(),p=function(t,s,n){return t.add(s.years()*n,"y").add(s.months()*n,"M").add(s.days()*n,"d").add(s.hours()*n,"h").add(s.minutes()*n,"m").add(s.seconds()*n,"s").add(s.milliseconds()*n,"ms")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));
|
||||
10
wwws/apx/src/static/lib/dayjs/plugin/isBetween.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PluginFunc, ConfigType, OpUnitType } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface Dayjs {
|
||||
isBetween(a: ConfigType, b: ConfigType, c?: OpUnitType | null, d?: '()' | '[]' | '[)' | '(]'): boolean
|
||||
}
|
||||
}
|
||||
1
wwws/apx/src/static/lib/dayjs/plugin/isBetween.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){"use strict";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r="("===(f=f||"()")[0],u=")"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));
|
||||
10
wwws/apx/src/static/lib/dayjs/plugin/isLeapYear.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PluginFunc } from 'dayjs'
|
||||
|
||||
declare const plugin: PluginFunc
|
||||
export = plugin
|
||||
|
||||
declare module 'dayjs' {
|
||||
interface Dayjs {
|
||||
isLeapYear(): boolean
|
||||
}
|
||||
}
|
||||