@startinblox/core 0.18.1 → 0.19.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css → assets/MarkerCluster-614dea0a.css} +0 -0
- package/dist/{_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css → assets/MarkerCluster.Default-61258232.css} +0 -0
- package/dist/assets/en-e53105c5.js +14 -0
- package/dist/assets/en-e53105c5.js.map +1 -0
- package/dist/assets/fr-a7fcdb64.js +14 -0
- package/dist/assets/fr-a7fcdb64.js.map +1 -0
- package/dist/{_snowpack/pkg/fusejs.js → assets/helpers-bf15809c.js} +398 -454
- package/dist/assets/helpers-bf15809c.js.map +1 -0
- package/dist/{_snowpack/pkg/leaflet/dist/leaflet.css → assets/leaflet-3c081932.css} +3 -3
- package/dist/helpers.js +18 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.js +54600 -48
- package/dist/index.js.map +1 -0
- package/package.json +8 -22
- package/dist/_snowpack/pkg/autolinker.js +0 -4429
- package/dist/_snowpack/pkg/autolinker.js.map +0 -1
- package/dist/_snowpack/pkg/common/_baseUnary-c1edb653.js +0 -353
- package/dist/_snowpack/pkg/common/_baseUnary-c1edb653.js.map +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-37fa8da4.js +0 -26
- package/dist/_snowpack/pkg/common/_commonjsHelpers-37fa8da4.js.map +0 -1
- package/dist/_snowpack/pkg/common/decode-26fbf385.js +0 -185
- package/dist/_snowpack/pkg/common/decode-26fbf385.js.map +0 -1
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js +0 -1104
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js.map +0 -1
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js +0 -26198
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +0 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js +0 -827
- package/dist/_snowpack/pkg/dialog-polyfill.js.map +0 -1
- package/dist/_snowpack/pkg/fusejs.js.map +0 -1
- package/dist/_snowpack/pkg/import-map.json +0 -24
- package/dist/_snowpack/pkg/jsonld-context-parser.js +0 -836
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map +0 -1
- package/dist/_snowpack/pkg/leaflet/dist/leaflet.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +0 -39
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +0 -48
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js +0 -87
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html.js +0 -94
- package/dist/_snowpack/pkg/lit-html.js.map +0 -1
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js +0 -68
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js.map +0 -1
- package/dist/_snowpack/pkg/markdown-it.js +0 -11307
- package/dist/_snowpack/pkg/markdown-it.js.map +0 -1
- package/dist/_snowpack/pkg/quill/dist/quill.snow.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js +0 -971
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +0 -1
- package/dist/_snowpack/pkg/quill.js +0 -14442
- package/dist/_snowpack/pkg/quill.js.map +0 -1
- package/dist/_snowpack/pkg/slim-select.js +0 -714
- package/dist/_snowpack/pkg/slim-select.js.map +0 -1
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +0 -1149
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/tui-calendar.js +0 -46507
- package/dist/_snowpack/pkg/tui-calendar.js.map +0 -1
- package/dist/components/solid-ac-checker.js +0 -45
- package/dist/components/solid-calendar.js +0 -66
- package/dist/components/solid-delete.js +0 -96
- package/dist/components/solid-display.js +0 -150
- package/dist/components/solid-form-search.js +0 -174
- package/dist/components/solid-form.js +0 -259
- package/dist/components/solid-lang.js +0 -35
- package/dist/components/solid-map.js +0 -204
- package/dist/components/solid-table.js +0 -181
- package/dist/components/solid-widget.js +0 -72
- package/dist/import.css +0 -4
- package/dist/libs/Component.js +0 -13
- package/dist/libs/ComponentFactory.js +0 -168
- package/dist/libs/Compositor.js +0 -96
- package/dist/libs/Sib.js +0 -44
- package/dist/libs/filter.js +0 -184
- package/dist/libs/helpers.js +0 -191
- package/dist/libs/interfaces.js +0 -6
- package/dist/libs/lit-helpers.js +0 -142
- package/dist/libs/polyfills.js +0 -37
- package/dist/libs/store/server-pagination.js +0 -22
- package/dist/libs/store/server-search.js +0 -35
- package/dist/libs/store/store.js +0 -814
- package/dist/locales/en.json +0 -10
- package/dist/locales/en.json.proxy.js +0 -2
- package/dist/locales/fr.json +0 -10
- package/dist/locales/fr.json.proxy.js +0 -2
- package/dist/mixins/attributeBinderMixin.js +0 -116
- package/dist/mixins/contextMixin.js +0 -26
- package/dist/mixins/counterMixin.js +0 -54
- package/dist/mixins/federationMixin.js +0 -51
- package/dist/mixins/filterMixin.js +0 -155
- package/dist/mixins/grouperMixin.js +0 -73
- package/dist/mixins/highlighterMixin.js +0 -36
- package/dist/mixins/interfaces.js +0 -6
- package/dist/mixins/listMixin.js +0 -105
- package/dist/mixins/nextMixin.js +0 -23
- package/dist/mixins/paginateMixin.js +0 -97
- package/dist/mixins/requiredMixin.js +0 -26
- package/dist/mixins/serverPaginationMixin.js +0 -122
- package/dist/mixins/sorterMixin.js +0 -131
- package/dist/mixins/storeMixin.js +0 -109
- package/dist/mixins/translationMixin.js +0 -58
- package/dist/mixins/validationMixin.js +0 -95
- package/dist/mixins/widgetMixin.js +0 -351
- package/dist/new-widgets/attributeMixins/actionMixin.js +0 -13
- package/dist/new-widgets/attributeMixins/blankMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/booleanMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/index.js +0 -19
- package/dist/new-widgets/attributeMixins/mailtoMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/multipleMixin.js +0 -27
- package/dist/new-widgets/attributeMixins/numberMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/placeholderMixin.js +0 -16
- package/dist/new-widgets/attributeMixins/telMixin.js +0 -7
- package/dist/new-widgets/baseWidgetMixin.js +0 -109
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js +0 -96
- package/dist/new-widgets/callbackMixins/index.js +0 -7
- package/dist/new-widgets/callbackMixins/richtextMixin.js +0 -37
- package/dist/new-widgets/callbackMixins/slimselect.css.proxy.js +0 -10
- package/dist/new-widgets/interfaces.js +0 -1
- package/dist/new-widgets/new-widget-factory.js +0 -91
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js +0 -26
- package/dist/new-widgets/templateAdditionMixins/index.js +0 -13
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +0 -16
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js +0 -18
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js +0 -29
- package/dist/new-widgets/templates/displayTemplatesDirectory.js +0 -54
- package/dist/new-widgets/templates/formTemplatesDirectory.js +0 -432
- package/dist/new-widgets/templates/groupTemplatesDirectory.js +0 -11
- package/dist/new-widgets/templates/index.js +0 -6
- package/dist/new-widgets/templates/setTemplatesDirectory.js +0 -16
- package/dist/new-widgets/templatesDependencies/altMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/editableMixin.js +0 -60
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +0 -34
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +0 -10
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +0 -41
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +0 -56
- package/dist/new-widgets/templatesDependencies/formFileMixin.js +0 -82
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/formMixin.js +0 -56
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js +0 -10
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/formStepMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/linkTextMixin.js +0 -13
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +0 -112
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +0 -65
- package/dist/new-widgets/templatesDependencies/patternMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/rangeMixin.js +0 -100
- package/dist/new-widgets/templatesDependencies/setMixin.js +0 -9
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +0 -9
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +0 -14
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js +0 -29
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +0 -12
- package/dist/new-widgets/valueTransformationMixins/index.js +0 -15
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +0 -30
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +0 -13
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +0 -21
- package/dist/solid-template-element.js +0 -144
- package/dist/style/default-theme.css.proxy.js +0 -10
- package/dist/widgets/baseWidget.js +0 -268
- package/dist/widgets/widget-factory.js +0 -22
- /package/dist/{style/default-theme.css → assets/default-theme-d0f20a8a.css} +0 -0
- /package/dist/{_snowpack/pkg/quill/dist/quill.snow.css → assets/quill.snow-8f222e44.css} +0 -0
- /package/dist/{new-widgets/callbackMixins/slimselect.css → assets/slimselect-43e3ebc8.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsonld-context-parser.js","sources":["../../../whatwg-fetch","../../../node_modules/isomorphic-fetch/fetch-npm-browserify.js","../../../node_modules/relative-to-absolute-iri/lib/Resolve.ts","../../../node_modules/relative-to-absolute-iri/index.ts","../../../node_modules/jsonld-context-parser/lib/FetchDocumentLoader.js","../../../node_modules/jsonld-context-parser/lib/ContextParser.js","../../../node_modules/jsonld-context-parser/index.js"],"sourcesContent":["\n// native patch for: node-fetch, whatwg-fetch\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function () {\n if (typeof self !== 'undefined') { return self; }\n if (typeof window !== 'undefined') { return window; }\n if (typeof global !== 'undefined') { return global; }\n throw new Error('unable to locate global object');\n}\nvar global = getGlobal();\nexport default global.fetch.bind(global);\nexport const Headers = global.Headers;\nexport const Request = global.Request;\nexport const Response = global.Response;\n","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n","/**\n * Convert the given relative IRI to an absolute IRI\n * by taking into account the given optional baseIRI.\n *\n * @param {string} relativeIRI The relative IRI to convert to an absolute IRI.\n * @param {string} baseIRI The optional base IRI.\n * @return {string} an absolute IRI.\n */\nexport function resolve(relativeIRI: string, baseIRI?: string): string {\n baseIRI = baseIRI || '';\n const baseFragmentPos: number = baseIRI.indexOf('#');\n\n // Ignore any fragments in the base IRI\n if (baseFragmentPos > 0) {\n baseIRI = baseIRI.substr(0, baseFragmentPos);\n }\n\n // Convert empty value directly to base IRI\n if (!relativeIRI.length) {\n // At this point, the baseIRI MUST be absolute, otherwise we error\n if (baseIRI.indexOf(':') < 0) {\n throw new Error(`Found invalid baseIRI '${baseIRI}' for value '${relativeIRI}'`);\n }\n return baseIRI;\n }\n\n // If the value starts with a query character, concat directly (but strip the existing query)\n if (relativeIRI.startsWith('?')) {\n const baseQueryPos: number = baseIRI.indexOf('?');\n if (baseQueryPos > 0) {\n baseIRI = baseIRI.substr(0, baseQueryPos);\n }\n return baseIRI + relativeIRI;\n }\n\n // If the value starts with a fragment character, concat directly\n if (relativeIRI.startsWith('#')) {\n return baseIRI + relativeIRI;\n }\n\n // Ignore baseIRI if it is empty\n if (!baseIRI.length) {\n const relativeColonPos = relativeIRI.indexOf(':');\n if (relativeColonPos < 0) {\n throw new Error(`Found invalid relative IRI '${relativeIRI}' for a missing baseIRI`);\n }\n return removeDotSegmentsOfPath(relativeIRI, relativeColonPos);\n }\n\n // Ignore baseIRI if the value is absolute\n const valueColonPos: number = relativeIRI.indexOf(':');\n if (valueColonPos >= 0) {\n return removeDotSegmentsOfPath(relativeIRI, valueColonPos);\n }\n\n // At this point, the baseIRI MUST be absolute, otherwise we error\n const baseColonPos: number = baseIRI.indexOf(':');\n if (baseColonPos < 0) {\n throw new Error(`Found invalid baseIRI '${baseIRI}' for value '${relativeIRI}'`);\n }\n\n const baseIRIScheme = baseIRI.substr(0, baseColonPos + 1);\n // Inherit the baseIRI scheme if the value starts with '//'\n if (relativeIRI.indexOf('//') === 0) {\n return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);\n }\n\n // Check cases where '://' occurs in the baseIRI, and where there is no '/' after a ':' anymore.\n let baseSlashAfterColonPos;\n if (baseIRI.indexOf('//', baseColonPos) === baseColonPos + 1) {\n // If there is no additional '/' after the '//'.\n baseSlashAfterColonPos = baseIRI.indexOf('/', baseColonPos + 3);\n if (baseSlashAfterColonPos < 0) {\n // If something other than a '/' follows the '://', append the value after a '/',\n // otherwise, prefix the value with only the baseIRI scheme.\n if (baseIRI.length > baseColonPos + 3) {\n return baseIRI + '/' + removeDotSegmentsOfPath(relativeIRI, valueColonPos);\n } else {\n return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);\n }\n }\n } else {\n // If there is not even a single '/' after the ':'\n baseSlashAfterColonPos = baseIRI.indexOf('/', baseColonPos + 1);\n if (baseSlashAfterColonPos < 0) {\n // If we don't have a '/' after the ':',\n // prefix the value with only the baseIRI scheme.\n return baseIRIScheme + removeDotSegmentsOfPath(relativeIRI, valueColonPos);\n }\n }\n\n // If the value starts with a '/', then prefix it with everything before the first effective slash of the base IRI.\n if (relativeIRI.indexOf('/') === 0) {\n return baseIRI.substr(0, baseSlashAfterColonPos) + removeDotSegments(relativeIRI);\n }\n\n let baseIRIPath = baseIRI.substr(baseSlashAfterColonPos);\n const baseIRILastSlashPos = baseIRIPath.lastIndexOf('/');\n\n // Ignore everything after the last '/' in the baseIRI path\n if (baseIRILastSlashPos >= 0 && baseIRILastSlashPos < baseIRIPath.length - 1) {\n baseIRIPath = baseIRIPath.substr(0, baseIRILastSlashPos + 1);\n // Also remove the first character of the relative path if it starts with '.' (and not '..' or './')\n // This change is only allowed if there is something else following the path\n if (relativeIRI[0] === '.' && relativeIRI[1] !== '.' && relativeIRI[1] !== '/' && relativeIRI[2]) {\n relativeIRI = relativeIRI.substr(1);\n }\n }\n\n // Prefix the value with the baseIRI path where\n relativeIRI = baseIRIPath + relativeIRI;\n\n // Remove dot segment from the IRI\n relativeIRI = removeDotSegments(relativeIRI);\n\n // Prefix our transformed value with the part of the baseIRI until the first '/' after the first ':'.\n return baseIRI.substr(0, baseSlashAfterColonPos) + relativeIRI;\n}\n\n/**\n * Remove dot segments from the given path,\n * as described in https://www.ietf.org/rfc/rfc3986.txt (page 32).\n * @param {string} path An IRI path.\n * @return {string} A path, will always start with a '/'.\n */\nexport function removeDotSegments(path: string): string {\n // Prepare a buffer with segments between each '/.\n // Each segment represents an array of characters.\n const segmentBuffers: string[][] = [];\n\n let i = 0;\n while (i < path.length) {\n // Remove '/.' or '/..'\n switch (path[i]) {\n case '/':\n if (path[i + 1] === '.') {\n if (path[i + 2] === '.') {\n // Start a new segment if we find an invalid character after the '.'\n if (!isCharacterAllowedAfterRelativePathSegment(path[i + 3])) {\n segmentBuffers.push([]);\n i++;\n break;\n }\n\n // Go to parent directory,\n // so we remove a parent segment\n segmentBuffers.pop();\n\n // Ensure that we end with a slash if there is a trailing '/..'\n if (!path[i + 3]) {\n segmentBuffers.push([]);\n }\n\n i += 3;\n } else {\n // Start a new segment if we find an invalid character after the '.'\n if (!isCharacterAllowedAfterRelativePathSegment(path[i + 2])) {\n segmentBuffers.push([]);\n i++;\n break;\n }\n\n // Ensure that we end with a slash if there is a trailing '/.'\n if (!path[i + 2]) {\n segmentBuffers.push([]);\n }\n\n // Go to the current directory,\n // so we do nothing\n i += 2;\n }\n } else {\n // Start a new segment\n segmentBuffers.push([]);\n i++;\n }\n break;\n case '#':\n case '?':\n // Query and fragment string should be appended unchanged\n if (!segmentBuffers.length) {\n segmentBuffers.push([]);\n }\n segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));\n // Break the while loop\n i = path.length;\n break;\n default:\n // Not a special character, just append it to our buffer\n if (!segmentBuffers.length) {\n segmentBuffers.push([]);\n }\n segmentBuffers[segmentBuffers.length - 1].push(path[i]);\n i++;\n break;\n }\n }\n\n return '/' + segmentBuffers.map((buffer) => buffer.join('')).join('/');\n}\n\n/**\n * Removes dot segments of the given IRI.\n * @param {string} iri An IRI (or part of IRI).\n * @param {number} colonPosition The position of the first ':' in the IRI.\n * @return {string} The IRI where dot segments were removed.\n */\nexport function removeDotSegmentsOfPath(iri: string, colonPosition: number): string {\n // Determine where we should start looking for the first '/' that indicates the start of the path\n let searchOffset = colonPosition + 1;\n if (colonPosition >= 0) {\n if (iri[colonPosition + 1] === '/' && iri[colonPosition + 2] === '/') {\n searchOffset = colonPosition + 3;\n }\n } else {\n if (iri[0] === '/' && iri[1] === '/') {\n searchOffset = 2;\n }\n }\n\n // Determine the path\n const pathSeparator = iri.indexOf('/', searchOffset);\n if (pathSeparator < 0) {\n return iri;\n }\n const base = iri.substr(0, pathSeparator);\n const path = iri.substr(pathSeparator);\n\n // Remove dot segments from the path\n return base + removeDotSegments(path);\n}\n\nfunction isCharacterAllowedAfterRelativePathSegment(character: string) {\n return !character || character === '#' || character === '?' || character === '/';\n}\n","export * from \"./lib/Resolve\";\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nrequire(\"isomorphic-fetch\");\n/**\n * Loads documents via the fetch API.\n */\nclass FetchDocumentLoader {\n load(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield fetch(url, { headers: { accept: 'application/ld+json' } });\n if (response.ok) {\n return (yield response.json());\n }\n else {\n throw new Error(`No valid context was found at ${url}: ${response.statusText}`);\n }\n });\n }\n}\nexports.FetchDocumentLoader = FetchDocumentLoader;\n//# sourceMappingURL=FetchDocumentLoader.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nrequire(\"isomorphic-fetch\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\nconst FetchDocumentLoader_1 = require(\"./FetchDocumentLoader\");\n/**\n * Parses JSON-LD contexts.\n */\nclass ContextParser {\n constructor(options) {\n options = options || {};\n this.documentLoader = options.documentLoader || new FetchDocumentLoader_1.FetchDocumentLoader();\n this.documentCache = {};\n this.validate = !options.skipValidation;\n this.expandContentTypeToBase = options.expandContentTypeToBase;\n }\n /**\n * Check if the given term is a valid compact IRI.\n * Otherwise, it may be an IRI.\n * @param {string} term A term.\n * @return {boolean} If it is a compact IRI.\n */\n static isCompactIri(term) {\n return term.indexOf(':') >= 0 && !(term && term[0] === '#');\n }\n /**\n * Get the prefix from the given term.\n * @see https://json-ld.org/spec/latest/json-ld/#compact-iris\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {IJsonLdContextNormalized} context A context.\n * @return {string} The prefix or null.\n */\n static getPrefix(term, context) {\n // Do not consider relative IRIs starting with a hash as compact IRIs\n if (term && term[0] === '#') {\n return null;\n }\n const separatorPos = term.indexOf(':');\n if (separatorPos >= 0) {\n // Suffix can not begin with two slashes\n if (term.length > separatorPos + 1\n && term.charAt(separatorPos + 1) === '/'\n && term.charAt(separatorPos + 2) === '/') {\n return null;\n }\n const prefix = term.substr(0, separatorPos);\n // Prefix can not be an underscore (this is a blank node)\n if (prefix === '_') {\n return null;\n }\n // Prefix must match a term in the active context\n if (context[prefix]) {\n return prefix;\n }\n }\n return null;\n }\n /**\n * From a given context entry value, get the string value, or the @id field.\n * @param contextValue A value for a term in a context.\n * @return {string} The id value, or null.\n */\n static getContextValueId(contextValue) {\n if (contextValue === null || typeof contextValue === 'string') {\n return contextValue;\n }\n const id = contextValue['@id'];\n return id ? id : null;\n }\n /**\n * Expand the term or prefix of the given term if it has one,\n * otherwise return the term as-is.\n *\n * This will try to expand the IRI as much as possible.\n *\n * Iff in vocab-mode, then other references to other terms in the context can be used,\n * such as to `myTerm`:\n * ```\n * {\n * \"myTerm\": \"http://example.org/myLongTerm\"\n * }\n * ```\n *\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {IJsonLdContextNormalized} context A context.\n * @param {boolean} vocab If the term is a predicate or type and should be expanded based on @vocab,\n * otherwise it is considered a regular term that is expanded based on @base.\n * @return {string} The expanded term, the term as-is, or null if it was explicitly disabled in the context.\n */\n static expandTerm(term, context, vocab) {\n ContextParser.assertNormalized(context);\n const contextValue = context[term];\n // Immediately return if the term was disabled in the context\n if (contextValue === null || (contextValue && contextValue['@id'] === null)) {\n return null;\n }\n // Check the @id\n if (contextValue && vocab) {\n const value = this.getContextValueId(contextValue);\n if (value && value !== term) {\n return value;\n }\n }\n // Check if the term is prefixed\n const prefix = ContextParser.getPrefix(term, context);\n if (prefix) {\n const value = this.getContextValueId(context[prefix]);\n if (value) {\n return value + term.substr(prefix.length + 1);\n }\n }\n else if (vocab && context['@vocab'] && term.charAt(0) !== '@' && !ContextParser.isCompactIri(term)) {\n return context['@vocab'] + term;\n }\n else if (!vocab && context['@base'] && term.charAt(0) !== '@' && !ContextParser.isCompactIri(term)) {\n return relative_to_absolute_iri_1.resolve(term, context['@base']);\n }\n return term;\n }\n /**\n * Compact the given term using @base, @vocab, an aliased term, or a prefixed term.\n *\n * This will try to compact the IRI as much as possible.\n *\n * @param {string} iri An IRI to compact.\n * @param {IJsonLdContextNormalized} context The context to compact with.\n * @param {boolean} vocab If the term is a predicate or type and should be compacted based on @vocab,\n * otherwise it is considered a regular term that is compacted based on @base.\n * @return {string} The compacted term or the IRI as-is.\n */\n static compactIri(iri, context, vocab) {\n ContextParser.assertNormalized(context);\n // Try @vocab compacting\n if (vocab && context['@vocab'] && iri.startsWith(context['@vocab'])) {\n return iri.substr(context['@vocab'].length);\n }\n // Try @base compacting\n if (!vocab && context['@base'] && iri.startsWith(context['@base'])) {\n return iri.substr(context['@base'].length);\n }\n // Loop over all terms in the context\n // This will try to prefix as short as possible.\n // Once a fully compacted alias is found, return immediately, as we can not go any shorter.\n const shortestPrefixing = { prefix: '', suffix: iri };\n for (const key in context) {\n const value = context[key];\n if (value && !key.startsWith('@')) {\n const contextIri = this.getContextValueId(value);\n if (iri.startsWith(contextIri)) {\n const suffix = iri.substr(contextIri.length);\n if (!suffix) {\n if (vocab) {\n // Immediately return on compacted alias\n return key;\n }\n }\n else if (suffix.length < shortestPrefixing.suffix.length) {\n // Overwrite the shortest prefix\n shortestPrefixing.prefix = key;\n shortestPrefixing.suffix = suffix;\n }\n }\n }\n }\n // Return the shortest prefix\n if (shortestPrefixing.prefix) {\n return shortestPrefixing.prefix + ':' + shortestPrefixing.suffix;\n }\n return iri;\n }\n /**\n * An an assert to check if the given context has been normalized.\n * An error will be thrown otherwise.\n * @param {JsonLdContext} context A context.\n */\n static assertNormalized(context) {\n if (typeof context === 'string' || Array.isArray(context) || context['@context']) {\n throw new Error('The given context is not normalized. Make sure to call ContextParser.parse() first.');\n }\n }\n /**\n * Check if the given context value can be a prefix value.\n * @param value A context value.\n * @return {boolean} If it can be a prefix value.\n */\n static isPrefixValue(value) {\n return value && (typeof value === 'string' || value['@id'] || value['@type']);\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return ContextParser.IRI_REGEX.test(iri);\n }\n /**\n * Add an @id term for all @reverse terms.\n * @param {IJsonLdContextNormalized} context A context.\n * @return {IJsonLdContextNormalized} The mutated input context.\n */\n static idifyReverseTerms(context) {\n for (const key of Object.keys(context)) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (value['@reverse'] && !value['@id']) {\n if (typeof value['@reverse'] !== 'string') {\n throw new Error(`Invalid @reverse value: '${value['@reverse']}'`);\n }\n value['@id'] = value['@reverse'];\n value['@reverse'] = true;\n }\n }\n }\n return context;\n }\n /**\n * Expand all prefixed terms in the given context.\n * @param {IJsonLdContextNormalized} context A context.\n * @param {boolean} expandContentTypeToBase If @type inside the context may be expanded\n * via @base if @vocab is set to null.\n * @return {IJsonLdContextNormalized} The mutated input context.\n */\n static expandPrefixedTerms(context, expandContentTypeToBase) {\n for (const key of Object.keys(context)) {\n // Only expand allowed keys\n if (ContextParser.EXPAND_KEYS_BLACKLIST.indexOf(key) < 0) {\n // Error if we try to alias a keyword to something else.\n if (key[0] === '@' && ContextParser.ALIAS_KEYS_BLACKLIST.indexOf(key) >= 0) {\n throw new Error(`Keywords can not be aliased to something else.\nTried mapping ${key} to ${context[key]}`);\n }\n // Loop because prefixes might be nested\n while (ContextParser.isPrefixValue(context[key])) {\n const value = context[key];\n let changed = false;\n if (typeof value === 'string') {\n context[key] = ContextParser.expandTerm(value, context, true);\n changed = changed || value !== context[key];\n }\n else {\n const id = value['@id'];\n const type = value['@type'];\n if (id) {\n context[key]['@id'] = ContextParser.expandTerm(id, context, true);\n changed = changed || id !== context[key]['@id'];\n }\n if (type && type !== '@vocab') {\n // First check @vocab, then fallback to @base\n context[key]['@type'] = ContextParser.expandTerm(type, context, true);\n if (expandContentTypeToBase && type === context[key]['@type']) {\n context[key]['@type'] = ContextParser.expandTerm(type, context, false);\n }\n changed = changed || type !== context[key]['@type'];\n }\n }\n if (!changed) {\n break;\n }\n }\n }\n }\n return context;\n }\n /**\n * Normalize the @language entries in the given context to lowercase.\n * @param {IJsonLdContextNormalized} context A context.\n * @return {IJsonLdContextNormalized} The mutated input context.\n */\n static normalize(context) {\n for (const key of Object.keys(context)) {\n if (key === '@language' && typeof context[key] === 'string') {\n context[key] = context[key].toLowerCase();\n }\n else {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (typeof value['@language'] === 'string') {\n value['@language'] = value['@language'].toLowerCase();\n }\n }\n }\n }\n return context;\n }\n /**\n * Validate the entries of the given context.\n * @param {IJsonLdContextNormalized} context A context.\n */\n static validate(context) {\n for (const key of Object.keys(context)) {\n const value = context[key];\n const valueType = typeof value;\n // First check if the key is a keyword\n if (key[0] === '@') {\n switch (key.substr(1)) {\n case 'vocab':\n if (value !== null && valueType !== 'string') {\n throw new Error(`Found an invalid @vocab IRI: ${value}`);\n }\n break;\n case 'base':\n if (value !== null && valueType !== 'string') {\n throw new Error(`Found an invalid @base IRI: ${context[key]}`);\n }\n break;\n case 'language':\n if (value !== null && valueType !== 'string') {\n throw new Error(`Found an invalid @language string: ${value}`);\n }\n break;\n }\n }\n // Otherwise, consider the key a term\n if (value !== null) {\n switch (valueType) {\n case 'string':\n // Always valid\n break;\n case 'object':\n if (!ContextParser.isCompactIri(key) && !('@id' in value)\n && (value['@type'] === '@id' ? !context['@base'] : !context['@vocab'])) {\n throw new Error(`Missing @id in context entry: '${key}': '${JSON.stringify(value)}'`);\n }\n for (const objectKey of Object.keys(value)) {\n const objectValue = value[objectKey];\n if (!objectValue) {\n continue;\n }\n switch (objectKey) {\n case '@id':\n if (objectValue[0] === '@' && objectValue !== '@type' && objectValue !== '@id') {\n throw new Error(`Illegal keyword alias in term value, found: '${key}': '${JSON.stringify(value)}'`);\n }\n break;\n case '@type':\n if (objectValue !== '@id' && objectValue !== '@vocab'\n && (objectValue[0] === '_' || !ContextParser.isValidIri(objectValue))) {\n throw new Error(`A context @type must be an absolute IRI, found: '${key}': '${objectValue}'`);\n }\n break;\n case '@reverse':\n if (typeof objectValue === 'string' && value['@id'] && value['@id'] !== objectValue) {\n throw new Error(`Found non-matching @id and @reverse term values in '${key}':\\\n'${objectValue}' and '${value['@id']}'`);\n }\n break;\n case '@container':\n if (objectValue === '@list' && value['@reverse']) {\n throw new Error(`Term value can not be @container: @list and @reverse at the same time on '${key}'`);\n }\n if (ContextParser.CONTAINERS.indexOf(objectValue) < 0) {\n throw new Error(`Invalid term @container for '${key}' ('${objectValue}'), \\\nmust be one of ${ContextParser.CONTAINERS.join(', ')}`);\n }\n break;\n case '@language':\n if (objectValue !== null && typeof objectValue !== 'string') {\n throw new Error(`Found an invalid term @language string in: '${key}': '${JSON.stringify(value)}'`);\n }\n break;\n }\n }\n break;\n default:\n throw new Error(`Found an invalid term value: '${key}': '${value}'`);\n }\n }\n }\n }\n /**\n * Resolve relative context IRIs, or return full IRIs as-is.\n * @param {string} contextIri A context IRI.\n * @param {string} baseIri A base IRI.\n * @return {string} The normalized context IRI.\n */\n static normalizeContextIri(contextIri, baseIri) {\n if (!ContextParser.isValidIri(contextIri)) {\n contextIri = relative_to_absolute_iri_1.resolve(contextIri, baseIri);\n if (!ContextParser.isValidIri(contextIri)) {\n throw new Error(`Invalid context IRI: ${contextIri}`);\n }\n }\n return contextIri;\n }\n /**\n * Parse a JSON-LD context in any form.\n * @param {JsonLdContext} context A context, URL to a context, or an array of contexts/URLs.\n * @param {IParseOptions} options Optional parsing options.\n * @return {Promise<IJsonLdContextNormalized>} A promise resolving to the context.\n */\n parse(context, { baseIri, parentContext, external } = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (context === null || context === undefined) {\n // Context that are explicitly set to null are empty.\n return baseIri ? { '@base': baseIri } : {};\n }\n else if (typeof context === 'string') {\n return this.parse(yield this.load(ContextParser.normalizeContextIri(context, baseIri)), { baseIri, parentContext, external: true });\n }\n else if (Array.isArray(context)) {\n // As a performance consideration, first load all external contexts in parallel.\n const contexts = yield Promise.all(context.map((subContext) => {\n if (typeof subContext === 'string') {\n return this.load(ContextParser.normalizeContextIri(subContext, baseIri));\n }\n else {\n return subContext;\n }\n }));\n return contexts.reduce((accContextPromise, contextEntry) => accContextPromise\n .then((accContext) => this.parse(contextEntry, {\n baseIri: accContext && accContext['@base'] || baseIri,\n external,\n parentContext: accContext,\n })), Promise.resolve(parentContext));\n }\n else if (typeof context === 'object') {\n if (context['@context']) {\n return yield this.parse(context['@context'], { baseIri, parentContext, external });\n }\n // Make a deep clone of the given context, to avoid modifying it.\n context = JSON.parse(JSON.stringify(context)); // No better way in JS at the moment...\n // We have an actual context object.\n let newContext = {};\n // According to the JSON-LD spec, @base must be ignored from external contexts.\n if (external) {\n delete context['@base'];\n }\n // Override the base IRI if provided.\n if (baseIri) {\n if (!('@base' in context)) {\n // The context base is the document base\n context['@base'] = baseIri;\n }\n else if (context['@base'] !== null && !ContextParser.isValidIri(context['@base'])) {\n // The context base is relative to the document base\n context['@base'] = relative_to_absolute_iri_1.resolve(context['@base'], baseIri);\n }\n }\n newContext = Object.assign({}, newContext, parentContext, context);\n ContextParser.idifyReverseTerms(newContext);\n ContextParser.expandPrefixedTerms(newContext, this.expandContentTypeToBase);\n ContextParser.normalize(newContext);\n if (this.validate) {\n ContextParser.validate(newContext);\n }\n return newContext;\n }\n else {\n throw new Error(`Tried parsing a context that is not a string, array or object, but got ${context}`);\n }\n });\n }\n load(url) {\n return __awaiter(this, void 0, void 0, function* () {\n const cached = this.documentCache[url];\n if (cached) {\n return Array.isArray(cached) ? cached.slice() : Object.assign({}, cached);\n }\n return this.documentCache[url] = (yield this.documentLoader.load(url))['@context'];\n });\n }\n}\n// Regex for valid IRIs\nContextParser.IRI_REGEX = /^([A-Za-z][A-Za-z0-9+-.]*|_):[^ \"<>{}|\\\\\\[\\]`]*$/;\n// Keys in the contexts that will not be expanded based on the base IRI\nContextParser.EXPAND_KEYS_BLACKLIST = [\n '@base',\n '@vocab',\n '@language',\n];\n// Keys in the contexts that may not be aliased\nContextParser.ALIAS_KEYS_BLACKLIST = [\n '@container',\n '@graph',\n '@id',\n '@index',\n '@list',\n '@nest',\n '@none',\n '@prefix',\n '@reverse',\n '@set',\n '@type',\n '@value',\n];\n// All valid @container values\nContextParser.CONTAINERS = [\n '@list',\n '@set',\n '@index',\n '@language',\n];\nexports.ContextParser = ContextParser;\n//# sourceMappingURL=ContextParser.js.map","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./lib/ContextParser\"));\n__export(require(\"./lib/FetchDocumentLoader\"));\n//# sourceMappingURL=index.js.map"],"names":["module","self","fetch","bind","resolve","relativeIRI","baseIRI","baseFragmentPos","indexOf","substr","length","Error","startsWith","baseQueryPos","relativeColonPos","removeDotSegmentsOfPath","valueColonPos","baseColonPos","baseIRIScheme","baseSlashAfterColonPos","removeDotSegments","baseIRIPath","baseIRILastSlashPos","lastIndexOf","exports","path","segmentBuffers","i","isCharacterAllowedAfterRelativePathSegment","push","pop","map","buffer","join","iri","colonPosition","searchOffset","pathSeparator","base","character","__exportStar","require","__awaiter","this","thisArg","_arguments","P","generator","Promise","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","Object","defineProperty","FetchDocumentLoader","load","url","response","headers","accept","ok","json","statusText","ContextParser","constructor","options","documentLoader","FetchDocumentLoader_1","documentCache","validate","skipValidation","expandContentTypeToBase","isCompactIri","term","getPrefix","context","separatorPos","charAt","prefix","getContextValueId","contextValue","id","expandTerm","vocab","assertNormalized","relative_to_absolute_iri_1","compactIri","shortestPrefixing","suffix","key","contextIri","Array","isArray","isPrefixValue","isValidIri","IRI_REGEX","test","idifyReverseTerms","keys","expandPrefixedTerms","EXPAND_KEYS_BLACKLIST","ALIAS_KEYS_BLACKLIST","changed","type","normalize","toLowerCase","valueType","JSON","stringify","objectKey","objectValue","CONTAINERS","normalizeContextIri","baseIri","parse","parentContext","external","undefined","contexts","all","subContext","reduce","accContextPromise","contextEntry","accContext","newContext","assign","cached","slice","__export","m","p","hasOwnProperty"],"mappings":";;AACA;AACA;AACA,IAAI,SAAS,GAAG,YAAY;AAC5B,EAAE,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,EAAE,OAAO,IAAI,CAAC,EAAE;AACnD,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,EAAE,OAAO,MAAM,CAAC,EAAE;AACvD,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,EAAE,OAAO,MAAM,CAAC,EAAE;AACvD,EAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;AACpD,EAAC;AACD,IAAI,MAAM,GAAG,SAAS,EAAE,CAAC;AACV,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAClC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ;;ACbvC;AACA;AACA;AACA;;AAEAA,sBAAc,GAAGC,IAAI,CAACC,KAAK,CAACC,IAAI,CAACF,IAAI,CAAC;;;;;;;;ACLtC;;;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ACd;AACD/F,qBAAqB,GAAG+C,aAAa;;;;;ACrfrC,SAASkE,QAAQA,CAACC,CAAC,EAAE;EACjB,KAAK,IAAIC,CAAC,IAAID,CAAC,EAAE,IAAI,CAAClH,OAAO,CAACoH,cAAc,CAACD,CAAC,CAAC,EAAEnH,OAAO,CAACmH,CAAC,CAAC,GAAGD,CAAC,CAACC,CAAC,CAAC;AACtE;AACA/E,MAAM,CAACC,cAAc,CAACrC,OAAO,EAAE,YAAY,EAAE;EAAE2B,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DsF,QAAQ,CAAChG,eAA8B,CAAC;AACxCgG,QAAQ,CAAChG,qBAAoC,CAAC;;;;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// [snowpack] add styles to the page (skip if no document exists)
|
|
2
|
-
if (typeof document !== 'undefined') {
|
|
3
|
-
const code = "/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url(images/layers.png);\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url(images/layers-2x.png);\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url(images/marker-icon.png);\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: \"\";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n";
|
|
4
|
-
|
|
5
|
-
const styleEl = document.createElement("style");
|
|
6
|
-
const codeEl = document.createTextNode(code);
|
|
7
|
-
styleEl.type = 'text/css';
|
|
8
|
-
styleEl.appendChild(codeEl);
|
|
9
|
-
document.head.appendChild(styleEl);
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// [snowpack] add styles to the page (skip if no document exists)
|
|
2
|
-
if (typeof document !== 'undefined') {
|
|
3
|
-
const code = ".marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px \"Helvetica Neue\", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}";
|
|
4
|
-
|
|
5
|
-
const styleEl = document.createElement("style");
|
|
6
|
-
const codeEl = document.createTextNode(code);
|
|
7
|
-
styleEl.type = 'text/css';
|
|
8
|
-
styleEl.appendChild(codeEl);
|
|
9
|
-
document.head.appendChild(styleEl);
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// [snowpack] add styles to the page (skip if no document exists)
|
|
2
|
-
if (typeof document !== 'undefined') {
|
|
3
|
-
const code = ".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n";
|
|
4
|
-
|
|
5
|
-
const styleEl = document.createElement("style");
|
|
6
|
-
const codeEl = document.createTextNode(code);
|
|
7
|
-
styleEl.type = 'text/css';
|
|
8
|
-
styleEl.appendChild(codeEl);
|
|
9
|
-
document.head.appendChild(styleEl);
|
|
10
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { d as directive, A as AttributePart } from '../../common/lit-html-3647afce.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
6
|
-
* This code may only be used under the BSD style license found at
|
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8
|
-
* The complete set of authors may be found at
|
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
10
|
-
* The complete set of contributors may be found at
|
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
|
13
|
-
* subject to an additional IP rights grant found at
|
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
|
15
|
-
*/
|
|
16
|
-
const previousValues = new WeakMap();
|
|
17
|
-
/**
|
|
18
|
-
* For AttributeParts, sets the attribute if the value is defined and removes
|
|
19
|
-
* the attribute if the value is undefined.
|
|
20
|
-
*
|
|
21
|
-
* For other part types, this directive is a no-op.
|
|
22
|
-
*/
|
|
23
|
-
const ifDefined = directive(value => part => {
|
|
24
|
-
const previousValue = previousValues.get(part);
|
|
25
|
-
if (value === undefined && part instanceof AttributePart) {
|
|
26
|
-
// If the value is undefined, remove the attribute, but only if the value
|
|
27
|
-
// was previously defined.
|
|
28
|
-
if (previousValue !== undefined || !previousValues.has(part)) {
|
|
29
|
-
const name = part.committer.name;
|
|
30
|
-
part.committer.element.removeAttribute(name);
|
|
31
|
-
}
|
|
32
|
-
} else if (value !== previousValue) {
|
|
33
|
-
part.setValue(value);
|
|
34
|
-
}
|
|
35
|
-
previousValues.set(part, value);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export { ifDefined };
|
|
39
|
-
//# sourceMappingURL=if-defined.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if-defined.js","sources":["../../../../../node_modules/lit-html/src/directives/if-defined.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {AttributePart, directive, Part} from '../lit-html.js';\n\nconst previousValues = new WeakMap<Part, unknown>();\n\n/**\n * For AttributeParts, sets the attribute if the value is defined and removes\n * the attribute if the value is undefined.\n *\n * For other part types, this directive is a no-op.\n */\nexport const ifDefined = directive((value: unknown) => (part: Part) => {\n const previousValue = previousValues.get(part);\n\n if (value === undefined && part instanceof AttributePart) {\n // If the value is undefined, remove the attribute, but only if the value\n // was previously defined.\n if (previousValue !== undefined || !previousValues.has(part)) {\n const name = part.committer.name;\n part.committer.element.removeAttribute(name);\n }\n } else if (value !== previousValue) {\n part.setValue(value);\n }\n\n previousValues.set(part, value);\n});\n"],"names":["previousValues","WeakMap","ifDefined","directive","value","part","previousValue","get","undefined","AttributePart","has","name","committer","element","removeAttribute","setValue","set"],"mappings":";;AAAA;;;;;;;;;;;;;AAgBA,MAAMA,cAAc,GAAG,IAAIC,OAAO,EAAiB;AAEnD;;;;;;MAMaC,SAAS,GAAGC,SAAS,CAAEC,KAAc,IAAMC,IAAU,IAAI;EACpE,MAAMC,aAAa,GAAGN,cAAc,CAACO,GAAG,CAACF,IAAI,CAAC;EAE9C,IAAID,KAAK,KAAKI,SAAS,IAAIH,IAAI,YAAYI,aAAa,EAAE;;;IAGxD,IAAIH,aAAa,KAAKE,SAAS,IAAI,CAACR,cAAc,CAACU,GAAG,CAACL,IAAI,CAAC,EAAE;MAC5D,MAAMM,IAAI,GAAGN,IAAI,CAACO,SAAS,CAACD,IAAI;MAChCN,IAAI,CAACO,SAAS,CAACC,OAAO,CAACC,eAAe,CAACH,IAAI,CAAC;;GAE/C,MAAM,IAAIP,KAAK,KAAKE,aAAa,EAAE;IAClCD,IAAI,CAACU,QAAQ,CAACX,KAAK,CAAC;;EAGtBJ,cAAc,CAACgB,GAAG,CAACX,IAAI,EAAED,KAAK,CAAC;AACjC,CAAC;;;;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { d as directive, N as NodePart, i as isPrimitive } from '../../common/lit-html-3647afce.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6
|
-
* This code may only be used under the BSD style license found at
|
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8
|
-
* The complete set of authors may be found at
|
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
10
|
-
* The complete set of contributors may be found at
|
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
|
13
|
-
* subject to an additional IP rights grant found at
|
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
|
15
|
-
*/
|
|
16
|
-
// For each part, remember the value that was last rendered to the part by the
|
|
17
|
-
// unsafeHTML directive, and the DocumentFragment that was last set as a value.
|
|
18
|
-
// The DocumentFragment is used as a unique key to check if the last value
|
|
19
|
-
// rendered to the part was with unsafeHTML. If not, we'll always re-render the
|
|
20
|
-
// value passed to unsafeHTML.
|
|
21
|
-
const previousValues = new WeakMap();
|
|
22
|
-
/**
|
|
23
|
-
* Renders the result as HTML, rather than text.
|
|
24
|
-
*
|
|
25
|
-
* Note, this is unsafe to use with any user-provided input that hasn't been
|
|
26
|
-
* sanitized or escaped, as it may lead to cross-site-scripting
|
|
27
|
-
* vulnerabilities.
|
|
28
|
-
*/
|
|
29
|
-
const unsafeHTML = directive(value => part => {
|
|
30
|
-
if (!(part instanceof NodePart)) {
|
|
31
|
-
throw new Error('unsafeHTML can only be used in text bindings');
|
|
32
|
-
}
|
|
33
|
-
const previousValue = previousValues.get(part);
|
|
34
|
-
if (previousValue !== undefined && isPrimitive(value) && value === previousValue.value && part.value === previousValue.fragment) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const template = document.createElement('template');
|
|
38
|
-
template.innerHTML = value; // innerHTML casts to string internally
|
|
39
|
-
const fragment = document.importNode(template.content, true);
|
|
40
|
-
part.setValue(fragment);
|
|
41
|
-
previousValues.set(part, {
|
|
42
|
-
value,
|
|
43
|
-
fragment
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export { unsafeHTML };
|
|
48
|
-
//# sourceMappingURL=unsafe-html.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unsafe-html.js","sources":["../../../../../node_modules/lit-html/src/directives/unsafe-html.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {isPrimitive} from '../lib/parts.js';\nimport {directive, NodePart, Part} from '../lit-html.js';\n\ninterface PreviousValue {\n readonly value: unknown;\n readonly fragment: DocumentFragment;\n}\n\n// For each part, remember the value that was last rendered to the part by the\n// unsafeHTML directive, and the DocumentFragment that was last set as a value.\n// The DocumentFragment is used as a unique key to check if the last value\n// rendered to the part was with unsafeHTML. If not, we'll always re-render the\n// value passed to unsafeHTML.\nconst previousValues = new WeakMap<NodePart, PreviousValue>();\n\n/**\n * Renders the result as HTML, rather than text.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive((value: unknown) => (part: Part): void => {\n if (!(part instanceof NodePart)) {\n throw new Error('unsafeHTML can only be used in text bindings');\n }\n\n const previousValue = previousValues.get(part);\n\n if (previousValue !== undefined && isPrimitive(value) &&\n value === previousValue.value && part.value === previousValue.fragment) {\n return;\n }\n\n const template = document.createElement('template');\n template.innerHTML = value as string; // innerHTML casts to string internally\n const fragment = document.importNode(template.content, true);\n part.setValue(fragment);\n previousValues.set(part, {value, fragment});\n});\n"],"names":["previousValues","WeakMap","unsafeHTML","directive","value","part","NodePart","Error","previousValue","get","undefined","isPrimitive","fragment","template","document","createElement","innerHTML","importNode","content","setValue","set"],"mappings":";;AAAA;;;;;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,IAAIC,OAAO,EAA2B;AAE7D;;;;;;;MAOaC,UAAU,GAAGC,SAAS,CAAEC,KAAc,IAAMC,IAAU,IAAU;EAC3E,IAAI,EAAEA,IAAI,YAAYC,QAAQ,CAAC,EAAE;IAC/B,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC;;EAGjE,MAAMC,aAAa,GAAGR,cAAc,CAACS,GAAG,CAACJ,IAAI,CAAC;EAE9C,IAAIG,aAAa,KAAKE,SAAS,IAAIC,WAAW,CAACP,KAAK,CAAC,IACjDA,KAAK,KAAKI,aAAa,CAACJ,KAAK,IAAIC,IAAI,CAACD,KAAK,KAAKI,aAAa,CAACI,QAAQ,EAAE;IAC1E;;EAGF,MAAMC,QAAQ,GAAGC,QAAQ,CAACC,aAAa,CAAC,UAAU,CAAC;EACnDF,QAAQ,CAACG,SAAS,GAAGZ,KAAe,CAAC;EACrC,MAAMQ,QAAQ,GAAGE,QAAQ,CAACG,UAAU,CAACJ,QAAQ,CAACK,OAAO,EAAE,IAAI,CAAC;EAC5Db,IAAI,CAACc,QAAQ,CAACP,QAAQ,CAAC;EACvBZ,cAAc,CAACoB,GAAG,CAACf,IAAI,EAAE;IAACD,KAAK;IAAEQ;GAAS,CAAC;AAC7C,CAAC;;;;"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { d as directive, i as isPrimitive } from '../../common/lit-html-3647afce.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6
|
-
* This code may only be used under the BSD style license found at
|
|
7
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8
|
-
* The complete set of authors may be found at
|
|
9
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
10
|
-
* The complete set of contributors may be found at
|
|
11
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
12
|
-
* Code distributed by Google as part of the polymer project is also
|
|
13
|
-
* subject to an additional IP rights grant found at
|
|
14
|
-
* http://polymer.github.io/PATENTS.txt
|
|
15
|
-
*/
|
|
16
|
-
const _state = new WeakMap();
|
|
17
|
-
// Effectively infinity, but a SMI.
|
|
18
|
-
const _infinity = 0x7fffffff;
|
|
19
|
-
/**
|
|
20
|
-
* Renders one of a series of values, including Promises, to a Part.
|
|
21
|
-
*
|
|
22
|
-
* Values are rendered in priority order, with the first argument having the
|
|
23
|
-
* highest priority and the last argument having the lowest priority. If a
|
|
24
|
-
* value is a Promise, low-priority values will be rendered until it resolves.
|
|
25
|
-
*
|
|
26
|
-
* The priority of values can be used to create placeholder content for async
|
|
27
|
-
* data. For example, a Promise with pending content can be the first,
|
|
28
|
-
* highest-priority, argument, and a non_promise loading indicator template can
|
|
29
|
-
* be used as the second, lower-priority, argument. The loading indicator will
|
|
30
|
-
* render immediately, and the primary content will render when the Promise
|
|
31
|
-
* resolves.
|
|
32
|
-
*
|
|
33
|
-
* Example:
|
|
34
|
-
*
|
|
35
|
-
* const content = fetch('./content.txt').then(r => r.text());
|
|
36
|
-
* html`${until(content, html`<span>Loading...</span>`)}`
|
|
37
|
-
*/
|
|
38
|
-
const until = directive((...args) => part => {
|
|
39
|
-
let state = _state.get(part);
|
|
40
|
-
if (state === undefined) {
|
|
41
|
-
state = {
|
|
42
|
-
lastRenderedIndex: _infinity,
|
|
43
|
-
values: []
|
|
44
|
-
};
|
|
45
|
-
_state.set(part, state);
|
|
46
|
-
}
|
|
47
|
-
const previousValues = state.values;
|
|
48
|
-
let previousLength = previousValues.length;
|
|
49
|
-
state.values = args;
|
|
50
|
-
for (let i = 0; i < args.length; i++) {
|
|
51
|
-
// If we've rendered a higher-priority value already, stop.
|
|
52
|
-
if (i > state.lastRenderedIndex) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
const value = args[i];
|
|
56
|
-
// Render non-Promise values immediately
|
|
57
|
-
if (isPrimitive(value) || typeof value.then !== 'function') {
|
|
58
|
-
part.setValue(value);
|
|
59
|
-
state.lastRenderedIndex = i;
|
|
60
|
-
// Since a lower-priority value will never overwrite a higher-priority
|
|
61
|
-
// synchronous value, we can stop processing now.
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
// If this is a Promise we've already handled, skip it.
|
|
65
|
-
if (i < previousLength && value === previousValues[i]) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
// We have a Promise that we haven't seen before, so priorities may have
|
|
69
|
-
// changed. Forget what we rendered before.
|
|
70
|
-
state.lastRenderedIndex = _infinity;
|
|
71
|
-
previousLength = 0;
|
|
72
|
-
Promise.resolve(value).then(resolvedValue => {
|
|
73
|
-
const index = state.values.indexOf(value);
|
|
74
|
-
// If state.values doesn't contain the value, we've re-rendered without
|
|
75
|
-
// the value, so don't render it. Then, only render if the value is
|
|
76
|
-
// higher-priority than what's already been rendered.
|
|
77
|
-
if (index > -1 && index < state.lastRenderedIndex) {
|
|
78
|
-
state.lastRenderedIndex = index;
|
|
79
|
-
part.setValue(resolvedValue);
|
|
80
|
-
part.commit();
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
export { until };
|
|
87
|
-
//# sourceMappingURL=until.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"until.js","sources":["../../../../../node_modules/lit-html/src/directives/until.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {isPrimitive} from '../lib/parts.js';\nimport {directive, Part} from '../lit-html.js';\n\ninterface AsyncState {\n /**\n * The last rendered index of a call to until(). A value only renders if its\n * index is less than the `lastRenderedIndex`.\n */\n lastRenderedIndex: number;\n\n values: unknown[];\n}\n\nconst _state = new WeakMap<Part, AsyncState>();\n// Effectively infinity, but a SMI.\nconst _infinity = 0x7fffffff;\n\n/**\n * Renders one of a series of values, including Promises, to a Part.\n *\n * Values are rendered in priority order, with the first argument having the\n * highest priority and the last argument having the lowest priority. If a\n * value is a Promise, low-priority values will be rendered until it resolves.\n *\n * The priority of values can be used to create placeholder content for async\n * data. For example, a Promise with pending content can be the first,\n * highest-priority, argument, and a non_promise loading indicator template can\n * be used as the second, lower-priority, argument. The loading indicator will\n * render immediately, and the primary content will render when the Promise\n * resolves.\n *\n * Example:\n *\n * const content = fetch('./content.txt').then(r => r.text());\n * html`${until(content, html`<span>Loading...</span>`)}`\n */\nexport const until = directive((...args: unknown[]) => (part: Part) => {\n let state = _state.get(part)!;\n if (state === undefined) {\n state = {\n lastRenderedIndex: _infinity,\n values: [],\n };\n _state.set(part, state);\n }\n const previousValues = state.values;\n let previousLength = previousValues.length;\n state.values = args;\n\n for (let i = 0; i < args.length; i++) {\n // If we've rendered a higher-priority value already, stop.\n if (i > state.lastRenderedIndex) {\n break;\n }\n\n const value = args[i];\n\n // Render non-Promise values immediately\n if (isPrimitive(value) ||\n typeof (value as {then?: unknown}).then !== 'function') {\n part.setValue(value);\n state.lastRenderedIndex = i;\n // Since a lower-priority value will never overwrite a higher-priority\n // synchronous value, we can stop processing now.\n break;\n }\n\n // If this is a Promise we've already handled, skip it.\n if (i < previousLength && value === previousValues[i]) {\n continue;\n }\n\n // We have a Promise that we haven't seen before, so priorities may have\n // changed. Forget what we rendered before.\n state.lastRenderedIndex = _infinity;\n previousLength = 0;\n\n Promise.resolve(value).then((resolvedValue: unknown) => {\n const index = state.values.indexOf(value);\n // If state.values doesn't contain the value, we've re-rendered without\n // the value, so don't render it. Then, only render if the value is\n // higher-priority than what's already been rendered.\n if (index > -1 && index < state.lastRenderedIndex) {\n state.lastRenderedIndex = index;\n part.setValue(resolvedValue);\n part.commit();\n }\n });\n }\n});\n"],"names":["_state","WeakMap","_infinity","until","directive","args","part","state","get","undefined","lastRenderedIndex","values","set","previousValues","previousLength","length","i","value","isPrimitive","then","setValue","Promise","resolve","resolvedValue","index","indexOf","commit"],"mappings":";;AAAA;;;;;;;;;;;;;AA2BA,MAAMA,MAAM,GAAG,IAAIC,OAAO,EAAoB;AAC9C;AACA,MAAMC,SAAS,GAAG,UAAU;AAE5B;;;;;;;;;;;;;;;;;;;MAmBaC,KAAK,GAAGC,SAAS,CAAC,CAAC,GAAGC,IAAe,KAAMC,IAAU,IAAI;EACpE,IAAIC,KAAK,GAAGP,MAAM,CAACQ,GAAG,CAACF,IAAI,CAAE;EAC7B,IAAIC,KAAK,KAAKE,SAAS,EAAE;IACvBF,KAAK,GAAG;MACNG,iBAAiB,EAAER,SAAS;MAC5BS,MAAM,EAAE;KACT;IACDX,MAAM,CAACY,GAAG,CAACN,IAAI,EAAEC,KAAK,CAAC;;EAEzB,MAAMM,cAAc,GAAGN,KAAK,CAACI,MAAM;EACnC,IAAIG,cAAc,GAAGD,cAAc,CAACE,MAAM;EAC1CR,KAAK,CAACI,MAAM,GAAGN,IAAI;EAEnB,KAAK,IAAIW,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGX,IAAI,CAACU,MAAM,EAAEC,CAAC,EAAE,EAAE;;IAEpC,IAAIA,CAAC,GAAGT,KAAK,CAACG,iBAAiB,EAAE;MAC/B;;IAGF,MAAMO,KAAK,GAAGZ,IAAI,CAACW,CAAC,CAAC;;IAGrB,IAAIE,WAAW,CAACD,KAAK,CAAC,IAClB,OAAQA,KAA0B,CAACE,IAAI,KAAK,UAAU,EAAE;MAC1Db,IAAI,CAACc,QAAQ,CAACH,KAAK,CAAC;MACpBV,KAAK,CAACG,iBAAiB,GAAGM,CAAC;;;MAG3B;;;IAIF,IAAIA,CAAC,GAAGF,cAAc,IAAIG,KAAK,KAAKJ,cAAc,CAACG,CAAC,CAAC,EAAE;MACrD;;;;IAKFT,KAAK,CAACG,iBAAiB,GAAGR,SAAS;IACnCY,cAAc,GAAG,CAAC;IAElBO,OAAO,CAACC,OAAO,CAACL,KAAK,CAAC,CAACE,IAAI,CAAEI,aAAsB,IAAI;MACrD,MAAMC,KAAK,GAAGjB,KAAK,CAACI,MAAM,CAACc,OAAO,CAACR,KAAK,CAAC;;;;MAIzC,IAAIO,KAAK,GAAG,CAAC,CAAC,IAAIA,KAAK,GAAGjB,KAAK,CAACG,iBAAiB,EAAE;QACjDH,KAAK,CAACG,iBAAiB,GAAGc,KAAK;QAC/BlB,IAAI,CAACc,QAAQ,CAACG,aAAa,CAAC;QAC5BjB,IAAI,CAACoB,MAAM,EAAE;;KAEhB,CAAC;;AAEN,CAAC;;;;"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { m as marker, T as Template, r as removeNodes, N as NodePart } from './common/lit-html-3647afce.js';
|
|
2
|
-
export { d as directive, h as html, n as noChange } from './common/lit-html-3647afce.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7
|
-
* This code may only be used under the BSD style license found at
|
|
8
|
-
* http://polymer.github.io/LICENSE.txt
|
|
9
|
-
* The complete set of authors may be found at
|
|
10
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
11
|
-
* The complete set of contributors may be found at
|
|
12
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
13
|
-
* Code distributed by Google as part of the polymer project is also
|
|
14
|
-
* subject to an additional IP rights grant found at
|
|
15
|
-
* http://polymer.github.io/PATENTS.txt
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* The default TemplateFactory which caches Templates keyed on
|
|
19
|
-
* result.type and result.strings.
|
|
20
|
-
*/
|
|
21
|
-
function templateFactory(result) {
|
|
22
|
-
let templateCache = templateCaches.get(result.type);
|
|
23
|
-
if (templateCache === undefined) {
|
|
24
|
-
templateCache = {
|
|
25
|
-
stringsArray: new WeakMap(),
|
|
26
|
-
keyString: new Map()
|
|
27
|
-
};
|
|
28
|
-
templateCaches.set(result.type, templateCache);
|
|
29
|
-
}
|
|
30
|
-
let template = templateCache.stringsArray.get(result.strings);
|
|
31
|
-
if (template !== undefined) {
|
|
32
|
-
return template;
|
|
33
|
-
}
|
|
34
|
-
// If the TemplateStringsArray is new, generate a key from the strings
|
|
35
|
-
// This key is shared between all templates with identical content
|
|
36
|
-
const key = result.strings.join(marker);
|
|
37
|
-
// Check if we already have a Template for this key
|
|
38
|
-
template = templateCache.keyString.get(key);
|
|
39
|
-
if (template === undefined) {
|
|
40
|
-
// If we have not seen this key before, create a new Template
|
|
41
|
-
template = new Template(result, result.getTemplateElement());
|
|
42
|
-
// Cache the Template for this key
|
|
43
|
-
templateCache.keyString.set(key, template);
|
|
44
|
-
}
|
|
45
|
-
// Cache all future queries for this TemplateStringsArray
|
|
46
|
-
templateCache.stringsArray.set(result.strings, template);
|
|
47
|
-
return template;
|
|
48
|
-
}
|
|
49
|
-
const templateCaches = new Map();
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @license
|
|
53
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
54
|
-
* This code may only be used under the BSD style license found at
|
|
55
|
-
* http://polymer.github.io/LICENSE.txt
|
|
56
|
-
* The complete set of authors may be found at
|
|
57
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
58
|
-
* The complete set of contributors may be found at
|
|
59
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
60
|
-
* Code distributed by Google as part of the polymer project is also
|
|
61
|
-
* subject to an additional IP rights grant found at
|
|
62
|
-
* http://polymer.github.io/PATENTS.txt
|
|
63
|
-
*/
|
|
64
|
-
const parts = new WeakMap();
|
|
65
|
-
/**
|
|
66
|
-
* Renders a template result or other value to a container.
|
|
67
|
-
*
|
|
68
|
-
* To update a container with new values, reevaluate the template literal and
|
|
69
|
-
* call `render` with the new result.
|
|
70
|
-
*
|
|
71
|
-
* @param result Any value renderable by NodePart - typically a TemplateResult
|
|
72
|
-
* created by evaluating a template tag like `html` or `svg`.
|
|
73
|
-
* @param container A DOM parent to render to. The entire contents are either
|
|
74
|
-
* replaced, or efficiently updated if the same result type was previous
|
|
75
|
-
* rendered there.
|
|
76
|
-
* @param options RenderOptions for the entire render tree rendered to this
|
|
77
|
-
* container. Render options must *not* change between renders to the same
|
|
78
|
-
* container, as those changes will not effect previously rendered DOM.
|
|
79
|
-
*/
|
|
80
|
-
const render = (result, container, options) => {
|
|
81
|
-
let part = parts.get(container);
|
|
82
|
-
if (part === undefined) {
|
|
83
|
-
removeNodes(container, container.firstChild);
|
|
84
|
-
parts.set(container, part = new NodePart(Object.assign({
|
|
85
|
-
templateFactory
|
|
86
|
-
}, options)));
|
|
87
|
-
part.appendInto(container);
|
|
88
|
-
}
|
|
89
|
-
part.setValue(result);
|
|
90
|
-
part.commit();
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export { render };
|
|
94
|
-
//# sourceMappingURL=lit-html.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lit-html.js","sources":["../../../node_modules/lit-html/src/lib/template-factory.ts","../../../node_modules/lit-html/src/lib/render.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {TemplateResult} from './template-result.js';\nimport {marker, Template} from './template.js';\n\n/**\n * A function type that creates a Template from a TemplateResult.\n *\n * This is a hook into the template-creation process for rendering that\n * requires some modification of templates before they're used, like ShadyCSS,\n * which must add classes to elements and remove styles.\n *\n * Templates should be cached as aggressively as possible, so that many\n * TemplateResults produced from the same expression only do the work of\n * creating the Template the first time.\n *\n * Templates are usually cached by TemplateResult.strings and\n * TemplateResult.type, but may be cached by other keys if this function\n * modifies the template.\n *\n * Note that currently TemplateFactories must not add, remove, or reorder\n * expressions, because there is no way to describe such a modification\n * to render() so that values are interpolated to the correct place in the\n * template instances.\n */\nexport type TemplateFactory = (result: TemplateResult) => Template;\n\n/**\n * The default TemplateFactory which caches Templates keyed on\n * result.type and result.strings.\n */\nexport function templateFactory(result: TemplateResult) {\n let templateCache = templateCaches.get(result.type);\n if (templateCache === undefined) {\n templateCache = {\n stringsArray: new WeakMap<TemplateStringsArray, Template>(),\n keyString: new Map<string, Template>()\n };\n templateCaches.set(result.type, templateCache);\n }\n\n let template = templateCache.stringsArray.get(result.strings);\n if (template !== undefined) {\n return template;\n }\n\n // If the TemplateStringsArray is new, generate a key from the strings\n // This key is shared between all templates with identical content\n const key = result.strings.join(marker);\n\n // Check if we already have a Template for this key\n template = templateCache.keyString.get(key);\n if (template === undefined) {\n // If we have not seen this key before, create a new Template\n template = new Template(result, result.getTemplateElement());\n // Cache the Template for this key\n templateCache.keyString.set(key, template);\n }\n\n // Cache all future queries for this TemplateStringsArray\n templateCache.stringsArray.set(result.strings, template);\n return template;\n}\n\n/**\n * The first argument to JS template tags retain identity across multiple\n * calls to a tag for the same literal, so we can cache work done per literal\n * in a Map.\n *\n * Safari currently has a bug which occasionally breaks this behavior, so we\n * need to cache the Template at two levels. We first cache the\n * TemplateStringsArray, and if that fails, we cache a key constructed by\n * joining the strings array.\n */\nexport interface TemplateCache {\n readonly stringsArray: WeakMap<TemplateStringsArray, Template>;\n readonly keyString: Map<string, Template>;\n}\n\nexport const templateCaches = new Map<string, TemplateCache>();\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {removeNodes} from './dom.js';\nimport {NodePart} from './parts.js';\nimport {RenderOptions} from './render-options.js';\nimport {templateFactory} from './template-factory.js';\n\nexport const parts = new WeakMap<Node, NodePart>();\n\n/**\n * Renders a template result or other value to a container.\n *\n * To update a container with new values, reevaluate the template literal and\n * call `render` with the new result.\n *\n * @param result Any value renderable by NodePart - typically a TemplateResult\n * created by evaluating a template tag like `html` or `svg`.\n * @param container A DOM parent to render to. The entire contents are either\n * replaced, or efficiently updated if the same result type was previous\n * rendered there.\n * @param options RenderOptions for the entire render tree rendered to this\n * container. Render options must *not* change between renders to the same\n * container, as those changes will not effect previously rendered DOM.\n */\nexport const render =\n (result: unknown,\n container: Element|DocumentFragment,\n options?: Partial<RenderOptions>) => {\n let part = parts.get(container);\n if (part === undefined) {\n removeNodes(container, container.firstChild);\n parts.set(container, part = new NodePart({\n templateFactory,\n ...options,\n }));\n part.appendInto(container);\n }\n part.setValue(result);\n part.commit();\n };\n"],"names":["templateFactory","result","templateCache","templateCaches","get","type","undefined","stringsArray","WeakMap","keyString","Map","set","template","strings","key","join","marker","Template","getTemplateElement","parts","render","container","options","part","removeNodes","firstChild","NodePart","Object","assign","appendInto","setValue","commit"],"mappings":";;;AAAA;;;;;;;;;;;;;AAuCA;;;;AAIM,SAAUA,eAAeA,CAACC,MAAsB;EACpD,IAAIC,aAAa,GAAGC,cAAc,CAACC,GAAG,CAACH,MAAM,CAACI,IAAI,CAAC;EACnD,IAAIH,aAAa,KAAKI,SAAS,EAAE;IAC/BJ,aAAa,GAAG;MACdK,YAAY,EAAE,IAAIC,OAAO,EAAkC;MAC3DC,SAAS,EAAE,IAAIC,GAAG;KACnB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AC;;EAE5BE,IAAI,CAACO,QAAQ,CAAC7B,MAAM,CAAC;EACrBsB,IAAI,CAACQ,MAAM,EAAE;AACf;;;;"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Adapted from https://github.com/markdown-it/markdown-it/blob/fbc6b0fed563ba7c00557ab638fd19752f8e759d/docs/architecture.md
|
|
2
|
-
function findFirstMatchingConfig(link, configs) {
|
|
3
|
-
var i, config;
|
|
4
|
-
var href = link.attrs[link.attrIndex("href")][1];
|
|
5
|
-
for (i = 0; i < configs.length; ++i) {
|
|
6
|
-
config = configs[i];
|
|
7
|
-
|
|
8
|
-
// If there is a matcher function defined then call it
|
|
9
|
-
// Matcher Function should return a boolean indicating
|
|
10
|
-
// whether or not it matched. If it matched, use that
|
|
11
|
-
// configuration, otherwise, try the next one.
|
|
12
|
-
if (typeof config.matcher === "function") {
|
|
13
|
-
if (config.matcher(href, config)) {
|
|
14
|
-
return config;
|
|
15
|
-
} else {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return config;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function applyAttributes(idx, tokens, attributes) {
|
|
23
|
-
Object.keys(attributes).forEach(function (attr) {
|
|
24
|
-
var attrIndex;
|
|
25
|
-
var value = attributes[attr];
|
|
26
|
-
if (attr === "className") {
|
|
27
|
-
// when dealing with applying classes
|
|
28
|
-
// programatically, some programmers
|
|
29
|
-
// may prefer to use the className syntax
|
|
30
|
-
attr = "class";
|
|
31
|
-
}
|
|
32
|
-
attrIndex = tokens[idx].attrIndex(attr);
|
|
33
|
-
if (attrIndex < 0) {
|
|
34
|
-
// attr doesn't exist, add new attribute
|
|
35
|
-
tokens[idx].attrPush([attr, value]);
|
|
36
|
-
} else {
|
|
37
|
-
// attr already exists, overwrite it
|
|
38
|
-
tokens[idx].attrs[attrIndex][1] = value; // replace value of existing attr
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function markdownitLinkAttributes(md, configs) {
|
|
44
|
-
if (!configs) {
|
|
45
|
-
configs = [];
|
|
46
|
-
} else {
|
|
47
|
-
configs = Array.isArray(configs) ? configs : [configs];
|
|
48
|
-
}
|
|
49
|
-
Object.freeze(configs);
|
|
50
|
-
var defaultRender = md.renderer.rules.link_open || this.defaultRender;
|
|
51
|
-
md.renderer.rules.link_open = function (tokens, idx, options, env, self) {
|
|
52
|
-
var config = findFirstMatchingConfig(tokens[idx], configs);
|
|
53
|
-
var attributes = config && config.attrs;
|
|
54
|
-
if (attributes) {
|
|
55
|
-
applyAttributes(idx, tokens, attributes);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// pass token to default renderer.
|
|
59
|
-
return defaultRender(tokens, idx, options, env, self);
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
markdownitLinkAttributes.defaultRender = function (tokens, idx, options, env, self) {
|
|
63
|
-
return self.renderToken(tokens, idx, options);
|
|
64
|
-
};
|
|
65
|
-
var markdownItLinkAttributes = markdownitLinkAttributes;
|
|
66
|
-
|
|
67
|
-
export default markdownItLinkAttributes;
|
|
68
|
-
//# sourceMappingURL=markdown-it-link-attributes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-it-link-attributes.js","sources":["../../../node_modules/markdown-it-link-attributes/index.js"],"sourcesContent":["\"use strict\";\n\n// Adapted from https://github.com/markdown-it/markdown-it/blob/fbc6b0fed563ba7c00557ab638fd19752f8e759d/docs/architecture.md\n\nfunction findFirstMatchingConfig(link, configs) {\n var i, config;\n var href = link.attrs[link.attrIndex(\"href\")][1];\n\n for (i = 0; i < configs.length; ++i) {\n config = configs[i];\n\n // If there is a matcher function defined then call it\n // Matcher Function should return a boolean indicating\n // whether or not it matched. If it matched, use that\n // configuration, otherwise, try the next one.\n if (typeof config.matcher === \"function\") {\n if (config.matcher(href, config)) {\n return config;\n } else {\n continue;\n }\n }\n\n return config;\n }\n}\n\nfunction applyAttributes(idx, tokens, attributes) {\n Object.keys(attributes).forEach(function (attr) {\n var attrIndex;\n var value = attributes[attr];\n\n if (attr === \"className\") {\n // when dealing with applying classes\n // programatically, some programmers\n // may prefer to use the className syntax\n attr = \"class\";\n }\n\n attrIndex = tokens[idx].attrIndex(attr);\n\n if (attrIndex < 0) {\n // attr doesn't exist, add new attribute\n tokens[idx].attrPush([attr, value]);\n } else {\n // attr already exists, overwrite it\n tokens[idx].attrs[attrIndex][1] = value; // replace value of existing attr\n }\n });\n}\n\nfunction markdownitLinkAttributes(md, configs) {\n if (!configs) {\n configs = [];\n } else {\n configs = Array.isArray(configs) ? configs : [configs];\n }\n\n Object.freeze(configs);\n\n var defaultRender = md.renderer.rules.link_open || this.defaultRender;\n\n md.renderer.rules.link_open = function (tokens, idx, options, env, self) {\n var config = findFirstMatchingConfig(tokens[idx], configs);\n var attributes = config && config.attrs;\n\n if (attributes) {\n applyAttributes(idx, tokens, attributes);\n }\n\n // pass token to default renderer.\n return defaultRender(tokens, idx, options, env, self);\n };\n}\n\nmarkdownitLinkAttributes.defaultRender = function (\n tokens,\n idx,\n options,\n env,\n self\n) {\n return self.renderToken(tokens, idx, options);\n};\n\nmodule.exports = markdownitLinkAttributes;\n"],"names":["findFirstMatchingConfig","link","configs","i","config","href","attrs","attrIndex","length","matcher","applyAttributes","idx","tokens","attributes","Object","keys","forEach","attr","value","attrPush","markdownitLinkAttributes","md","Array","isArray","freeze","defaultRender","renderer","rules","link_open","options","env","self","renderToken"],"mappings":"AAEA;AAEA,SAASA,uBAAuBA,CAACC,IAAI,EAAEC,OAAO,EAAE;EAC9C,IAAIC,CAAC,EAAEC,MAAM;EACb,IAAIC,IAAI,GAAGJ,IAAI,CAACK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;EAEhD,KAAKJ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,OAAO,CAACM,MAAM,EAAE,EAAEL,CAA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