@m3e/theme 1.0.1 → 1.0.2
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/custom-elements.json +0 -51
- package/dist/html-custom-data.json +0 -5
- package/dist/index.js +3274 -5021
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +315 -38
- package/dist/index.min.js.map +1 -1
- package/dist/src/ThemeElement.d.ts +0 -7
- package/dist/src/ThemeElement.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src/ThemeVariant.d.ts +0 -3
- package/dist/src/ThemeVariant.d.ts.map +0 -1
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../node_modules/@lit/reactive-element/decorators/custom-element.js","../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@materialx/material-color-utilities/dist/dist-B-NhFz70.js","../../src/ThemeElement.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","//#region ../../../node_modules/@material/material-color-utilities/dist/index.js\n/**\n* @license\n* Copyright 2021 Google LLC\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n* Utility methods for mathematical operations.\n*/\n/**\n* The signum function.\n*\n* @return 1 if num > 0, -1 if num < 0, and 0 if num = 0\n*/\nfunction signum(num) {\n\tif (num < 0) return -1;\n\telse if (num === 0) return 0;\n\telse return 1;\n}\n/**\n* The linear interpolation function.\n*\n* @return start if amount = 0 and stop if amount = 1\n*/\nfunction lerp(start, stop, amount) {\n\treturn (1 - amount) * start + amount * stop;\n}\n/**\n* Clamps an integer between two integers.\n*\n* @return input when min <= input <= max, and either min or max\n* otherwise.\n*/\nfunction clampInt(min, max, input) {\n\tif (input < min) return min;\n\telse if (input > max) return max;\n\treturn input;\n}\n/**\n* Clamps an integer between two floating-point numbers.\n*\n* @return input when min <= input <= max, and either min or max\n* otherwise.\n*/\nfunction clampDouble(min, max, input) {\n\tif (input < min) return min;\n\telse if (input > max) return max;\n\treturn input;\n}\n/**\n* Sanitizes a degree measure as an integer.\n*\n* @return a degree measure between 0 (inclusive) and 360\n* (exclusive).\n*/\nfunction sanitizeDegreesInt(degrees) {\n\tdegrees = degrees % 360;\n\tif (degrees < 0) degrees = degrees + 360;\n\treturn degrees;\n}\n/**\n* Sanitizes a degree measure as a floating-point number.\n*\n* @return a degree measure between 0.0 (inclusive) and 360.0\n* (exclusive).\n*/\nfunction sanitizeDegreesDouble(degrees) {\n\tdegrees = degrees % 360;\n\tif (degrees < 0) degrees = degrees + 360;\n\treturn degrees;\n}\n/**\n* Sign of direction change needed to travel from one angle to\n* another.\n*\n* For angles that are 180 degrees apart from each other, both\n* directions have the same travel distance, so either direction is\n* shortest. The value 1.0 is returned in this case.\n*\n* @param from The angle travel starts from, in degrees.\n* @param to The angle travel ends at, in degrees.\n* @return -1 if decreasing from leads to the shortest travel\n* distance, 1 if increasing from leads to the shortest travel\n* distance.\n*/\nfunction rotationDirection(from, to) {\n\tconst increasingDifference = sanitizeDegreesDouble(to - from);\n\treturn increasingDifference <= 180 ? 1 : -1;\n}\n/**\n* Distance of two points on a circle, represented using degrees.\n*/\nfunction differenceDegrees(a, b) {\n\treturn 180 - Math.abs(Math.abs(a - b) - 180);\n}\n/**\n* Multiplies a 1x3 row vector with a 3x3 matrix.\n*/\nfunction matrixMultiply(row, matrix) {\n\tconst a = row[0] * matrix[0][0] + row[1] * matrix[0][1] + row[2] * matrix[0][2];\n\tconst b = row[0] * matrix[1][0] + row[1] * matrix[1][1] + row[2] * matrix[1][2];\n\tconst c = row[0] * matrix[2][0] + row[1] * matrix[2][1] + row[2] * matrix[2][2];\n\treturn [\n\t\ta,\n\t\tb,\n\t\tc\n\t];\n}\n/**\n* Color science utilities.\n*\n* Utility methods for color science constants and color space\n* conversions that aren't HCT or CAM16.\n*/\nconst SRGB_TO_XYZ = [\n\t[\n\t\t.41233895,\n\t\t.35762064,\n\t\t.18051042\n\t],\n\t[\n\t\t.2126,\n\t\t.7152,\n\t\t.0722\n\t],\n\t[\n\t\t.01932141,\n\t\t.11916382,\n\t\t.95034478\n\t]\n];\nconst XYZ_TO_SRGB = [\n\t[\n\t\t3.2413774792388685,\n\t\t-1.5376652402851851,\n\t\t-.49885366846268053\n\t],\n\t[\n\t\t-.9691452513005321,\n\t\t1.8758853451067872,\n\t\t.04156585616912061\n\t],\n\t[\n\t\t.05562093689691305,\n\t\t-.20395524564742123,\n\t\t1.0571799111220335\n\t]\n];\nconst WHITE_POINT_D65 = [\n\t95.047,\n\t100,\n\t108.883\n];\n/**\n* Converts a color from RGB components to ARGB format.\n*/\nfunction argbFromRgb(red, green, blue) {\n\treturn (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>> 0;\n}\n/**\n* Converts a color from linear RGB components to ARGB format.\n*/\nfunction argbFromLinrgb(linrgb) {\n\tconst r = delinearized(linrgb[0]);\n\tconst g = delinearized(linrgb[1]);\n\tconst b = delinearized(linrgb[2]);\n\treturn argbFromRgb(r, g, b);\n}\n/**\n* Returns the alpha component of a color in ARGB format.\n*/\nfunction alphaFromArgb(argb) {\n\treturn argb >> 24 & 255;\n}\n/**\n* Returns the red component of a color in ARGB format.\n*/\nfunction redFromArgb(argb) {\n\treturn argb >> 16 & 255;\n}\n/**\n* Returns the green component of a color in ARGB format.\n*/\nfunction greenFromArgb(argb) {\n\treturn argb >> 8 & 255;\n}\n/**\n* Returns the blue component of a color in ARGB format.\n*/\nfunction blueFromArgb(argb) {\n\treturn argb & 255;\n}\n/**\n* Returns whether a color in ARGB format is opaque.\n*/\nfunction isOpaque(argb) {\n\treturn alphaFromArgb(argb) >= 255;\n}\n/**\n* Converts a color from ARGB to XYZ.\n*/\nfunction argbFromXyz(x, y, z) {\n\tconst matrix = XYZ_TO_SRGB;\n\tconst linearR = matrix[0][0] * x + matrix[0][1] * y + matrix[0][2] * z;\n\tconst linearG = matrix[1][0] * x + matrix[1][1] * y + matrix[1][2] * z;\n\tconst linearB = matrix[2][0] * x + matrix[2][1] * y + matrix[2][2] * z;\n\tconst r = delinearized(linearR);\n\tconst g = delinearized(linearG);\n\tconst b = delinearized(linearB);\n\treturn argbFromRgb(r, g, b);\n}\n/**\n* Converts a color from XYZ to ARGB.\n*/\nfunction xyzFromArgb(argb) {\n\tconst r = linearized(redFromArgb(argb));\n\tconst g = linearized(greenFromArgb(argb));\n\tconst b = linearized(blueFromArgb(argb));\n\treturn matrixMultiply([\n\t\tr,\n\t\tg,\n\t\tb\n\t], SRGB_TO_XYZ);\n}\n/**\n* Converts a color represented in Lab color space into an ARGB\n* integer.\n*/\nfunction argbFromLab(l, a, b) {\n\tconst whitePoint = WHITE_POINT_D65;\n\tconst fy = (l + 16) / 116;\n\tconst fx = a / 500 + fy;\n\tconst fz = fy - b / 200;\n\tconst xNormalized = labInvf(fx);\n\tconst yNormalized = labInvf(fy);\n\tconst zNormalized = labInvf(fz);\n\tconst x = xNormalized * whitePoint[0];\n\tconst y = yNormalized * whitePoint[1];\n\tconst z = zNormalized * whitePoint[2];\n\treturn argbFromXyz(x, y, z);\n}\n/**\n* Converts a color from ARGB representation to L*a*b*\n* representation.\n*\n* @param argb the ARGB representation of a color\n* @return a Lab object representing the color\n*/\nfunction labFromArgb(argb) {\n\tconst linearR = linearized(redFromArgb(argb));\n\tconst linearG = linearized(greenFromArgb(argb));\n\tconst linearB = linearized(blueFromArgb(argb));\n\tconst matrix = SRGB_TO_XYZ;\n\tconst x = matrix[0][0] * linearR + matrix[0][1] * linearG + matrix[0][2] * linearB;\n\tconst y = matrix[1][0] * linearR + matrix[1][1] * linearG + matrix[1][2] * linearB;\n\tconst z = matrix[2][0] * linearR + matrix[2][1] * linearG + matrix[2][2] * linearB;\n\tconst whitePoint = WHITE_POINT_D65;\n\tconst xNormalized = x / whitePoint[0];\n\tconst yNormalized = y / whitePoint[1];\n\tconst zNormalized = z / whitePoint[2];\n\tconst fx = labF(xNormalized);\n\tconst fy = labF(yNormalized);\n\tconst fz = labF(zNormalized);\n\tconst l = 116 * fy - 16;\n\tconst a = 500 * (fx - fy);\n\tconst b = 200 * (fy - fz);\n\treturn [\n\t\tl,\n\t\ta,\n\t\tb\n\t];\n}\n/**\n* Converts an L* value to an ARGB representation.\n*\n* @param lstar L* in L*a*b*\n* @return ARGB representation of grayscale color with lightness\n* matching L*\n*/\nfunction argbFromLstar(lstar) {\n\tconst y = yFromLstar(lstar);\n\tconst component = delinearized(y);\n\treturn argbFromRgb(component, component, component);\n}\n/**\n* Computes the L* value of a color in ARGB representation.\n*\n* @param argb ARGB representation of a color\n* @return L*, from L*a*b*, coordinate of the color\n*/\nfunction lstarFromArgb(argb) {\n\tconst y = xyzFromArgb(argb)[1];\n\treturn 116 * labF(y / 100) - 16;\n}\n/**\n* Converts an L* value to a Y value.\n*\n* L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n*\n* L* measures perceptual luminance, a linear scale. Y in XYZ\n* measures relative luminance, a logarithmic scale.\n*\n* @param lstar L* in L*a*b*\n* @return Y in XYZ\n*/\nfunction yFromLstar(lstar) {\n\treturn 100 * labInvf((lstar + 16) / 116);\n}\n/**\n* Converts a Y value to an L* value.\n*\n* L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n*\n* L* measures perceptual luminance, a linear scale. Y in XYZ\n* measures relative luminance, a logarithmic scale.\n*\n* @param y Y in XYZ\n* @return L* in L*a*b*\n*/\nfunction lstarFromY(y) {\n\treturn labF(y / 100) * 116 - 16;\n}\n/**\n* Linearizes an RGB component.\n*\n* @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B\n* channel\n* @return 0.0 <= output <= 100.0, color channel converted to\n* linear RGB space\n*/\nfunction linearized(rgbComponent) {\n\tconst normalized = rgbComponent / 255;\n\tif (normalized <= .040449936) return normalized / 12.92 * 100;\n\telse return Math.pow((normalized + .055) / 1.055, 2.4) * 100;\n}\n/**\n* Delinearizes an RGB component.\n*\n* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n* linear R/G/B channel\n* @return 0 <= output <= 255, color channel converted to regular\n* RGB space\n*/\nfunction delinearized(rgbComponent) {\n\tconst normalized = rgbComponent / 100;\n\tlet delinearized$1 = 0;\n\tif (normalized <= .0031308) delinearized$1 = normalized * 12.92;\n\telse delinearized$1 = 1.055 * Math.pow(normalized, 1 / 2.4) - .055;\n\treturn clampInt(0, 255, Math.round(delinearized$1 * 255));\n}\n/**\n* Returns the standard white point; white on a sunny day.\n*\n* @return The white point\n*/\nfunction whitePointD65() {\n\treturn WHITE_POINT_D65;\n}\nfunction labF(t) {\n\tconst e = 216 / 24389;\n\tconst kappa = 24389 / 27;\n\tif (t > e) return Math.pow(t, 1 / 3);\n\telse return (kappa * t + 16) / 116;\n}\nfunction labInvf(ft) {\n\tconst e = 216 / 24389;\n\tconst kappa = 24389 / 27;\n\tconst ft3 = ft * ft * ft;\n\tif (ft3 > e) return ft3;\n\telse return (116 * ft - 16) / kappa;\n}\n/**\n* In traditional color spaces, a color can be identified solely by the\n* observer's measurement of the color. Color appearance models such as CAM16\n* also use information about the environment where the color was\n* observed, known as the viewing conditions.\n*\n* For example, white under the traditional assumption of a midday sun white\n* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n* hue 203, chroma 3, lightness 100)\n*\n* This class caches intermediate values of the CAM16 conversion process that\n* depend only on viewing conditions, enabling speed ups.\n*/\nvar ViewingConditions = class ViewingConditions$1 {\n\t/** sRGB-like viewing conditions. */\n\tstatic DEFAULT = ViewingConditions$1.make();\n\t/**\n\t* Create ViewingConditions from a simple, physically relevant, set of\n\t* parameters.\n\t*\n\t* @param whitePoint White point, measured in the XYZ color space.\n\t* default = D65, or sunny day afternoon\n\t* @param adaptingLuminance The luminance of the adapting field. Informally,\n\t* how bright it is in the room where the color is viewed. Can be\n\t* calculated from lux by multiplying lux by 0.0586. default = 11.72,\n\t* or 200 lux.\n\t* @param backgroundLstar The lightness of the area surrounding the color.\n\t* measured by L* in L*a*b*. default = 50.0\n\t* @param surround A general description of the lighting surrounding the\n\t* color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n\t* dimly light room, like watching TV at home at night. 2.0 means there\n\t* is no difference between the lighting on the color and around it.\n\t* default = 2.0\n\t* @param discountingIlluminant Whether the eye accounts for the tint of the\n\t* ambient lighting, such as knowing an apple is still red in green light.\n\t* default = false, the eye does not perform this process on\n\t* self-luminous objects like displays.\n\t*/\n\tstatic make(whitePoint = whitePointD65(), adaptingLuminance = 200 / Math.PI * yFromLstar(50) / 100, backgroundLstar = 50, surround = 2, discountingIlluminant = false) {\n\t\tconst xyz = whitePoint;\n\t\tconst rW = xyz[0] * .401288 + xyz[1] * .650173 + xyz[2] * -.051461;\n\t\tconst gW = xyz[0] * -.250268 + xyz[1] * 1.204414 + xyz[2] * .045854;\n\t\tconst bW = xyz[0] * -.002079 + xyz[1] * .048952 + xyz[2] * .953127;\n\t\tconst f = .8 + surround / 10;\n\t\tconst c = f >= .9 ? lerp(.59, .69, (f - .9) * 10) : lerp(.525, .59, (f - .8) * 10);\n\t\tlet d = discountingIlluminant ? 1 : f * (1 - 1 / 3.6 * Math.exp((-adaptingLuminance - 42) / 92));\n\t\td = d > 1 ? 1 : d < 0 ? 0 : d;\n\t\tconst nc = f;\n\t\tconst rgbD = [\n\t\t\td * (100 / rW) + 1 - d,\n\t\t\td * (100 / gW) + 1 - d,\n\t\t\td * (100 / bW) + 1 - d\n\t\t];\n\t\tconst k = 1 / (5 * adaptingLuminance + 1);\n\t\tconst k4 = k * k * k * k;\n\t\tconst k4F = 1 - k4;\n\t\tconst fl = k4 * adaptingLuminance + .1 * k4F * k4F * Math.cbrt(5 * adaptingLuminance);\n\t\tconst n = yFromLstar(backgroundLstar) / whitePoint[1];\n\t\tconst z = 1.48 + Math.sqrt(n);\n\t\tconst nbb = .725 / Math.pow(n, .2);\n\t\tconst ncb = nbb;\n\t\tconst rgbAFactors = [\n\t\t\tMath.pow(fl * rgbD[0] * rW / 100, .42),\n\t\t\tMath.pow(fl * rgbD[1] * gW / 100, .42),\n\t\t\tMath.pow(fl * rgbD[2] * bW / 100, .42)\n\t\t];\n\t\tconst rgbA = [\n\t\t\t400 * rgbAFactors[0] / (rgbAFactors[0] + 27.13),\n\t\t\t400 * rgbAFactors[1] / (rgbAFactors[1] + 27.13),\n\t\t\t400 * rgbAFactors[2] / (rgbAFactors[2] + 27.13)\n\t\t];\n\t\tconst aw = (2 * rgbA[0] + rgbA[1] + .05 * rgbA[2]) * nbb;\n\t\treturn new ViewingConditions$1(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, .25), z);\n\t}\n\t/**\n\t* Parameters are intermediate values of the CAM16 conversion process. Their\n\t* names are shorthand for technical color science terminology, this class\n\t* would not benefit from documenting them individually. A brief overview\n\t* is available in the CAM16 specification, and a complete overview requires\n\t* a color science textbook, such as Fairchild's Color Appearance Models.\n\t*/\n\tconstructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {\n\t\tthis.n = n;\n\t\tthis.aw = aw;\n\t\tthis.nbb = nbb;\n\t\tthis.ncb = ncb;\n\t\tthis.c = c;\n\t\tthis.nc = nc;\n\t\tthis.rgbD = rgbD;\n\t\tthis.fl = fl;\n\t\tthis.fLRoot = fLRoot;\n\t\tthis.z = z;\n\t}\n};\n/**\n* CAM16, a color appearance model. Colors are not just defined by their hex\n* code, but rather, a hex code and viewing conditions.\n*\n* CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,\n* b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n* specification, and should be used when measuring distances between colors.\n*\n* In traditional color spaces, a color can be identified solely by the\n* observer's measurement of the color. Color appearance models such as CAM16\n* also use information about the environment where the color was\n* observed, known as the viewing conditions.\n*\n* For example, white under the traditional assumption of a midday sun white\n* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n* hue 203, chroma 3, lightness 100)\n*/\nvar Cam16 = class Cam16$1 {\n\t/**\n\t* All of the CAM16 dimensions can be calculated from 3 of the dimensions, in\n\t* the following combinations:\n\t* - {j or q} and {c, m, or s} and hue\n\t* - jstar, astar, bstar\n\t* Prefer using a static method that constructs from 3 of those dimensions.\n\t* This constructor is intended for those methods to use to return all\n\t* possible dimensions.\n\t*\n\t* @param hue\n\t* @param chroma informally, colorfulness / color intensity. like saturation\n\t* in HSL, except perceptually accurate.\n\t* @param j lightness\n\t* @param q brightness; ratio of lightness to white point's lightness\n\t* @param m colorfulness\n\t* @param s saturation; ratio of chroma to white point's chroma\n\t* @param jstar CAM16-UCS J coordinate\n\t* @param astar CAM16-UCS a coordinate\n\t* @param bstar CAM16-UCS b coordinate\n\t*/\n\tconstructor(hue, chroma, j, q, m, s, jstar, astar, bstar) {\n\t\tthis.hue = hue;\n\t\tthis.chroma = chroma;\n\t\tthis.j = j;\n\t\tthis.q = q;\n\t\tthis.m = m;\n\t\tthis.s = s;\n\t\tthis.jstar = jstar;\n\t\tthis.astar = astar;\n\t\tthis.bstar = bstar;\n\t}\n\t/**\n\t* CAM16 instances also have coordinates in the CAM16-UCS space, called J*,\n\t* a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n\t* specification, and is used to measure distances between colors.\n\t*/\n\tdistance(other) {\n\t\tconst dJ = this.jstar - other.jstar;\n\t\tconst dA = this.astar - other.astar;\n\t\tconst dB = this.bstar - other.bstar;\n\t\tconst dEPrime = Math.sqrt(dJ * dJ + dA * dA + dB * dB);\n\t\tconst dE = 1.41 * Math.pow(dEPrime, .63);\n\t\treturn dE;\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return CAM16 color, assuming the color was viewed in default viewing\n\t* conditions.\n\t*/\n\tstatic fromInt(argb) {\n\t\treturn Cam16$1.fromIntInViewingConditions(argb, ViewingConditions.DEFAULT);\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @param viewingConditions Information about the environment where the color\n\t* was observed.\n\t* @return CAM16 color.\n\t*/\n\tstatic fromIntInViewingConditions(argb, viewingConditions) {\n\t\tconst red = (argb & 16711680) >> 16;\n\t\tconst green = (argb & 65280) >> 8;\n\t\tconst blue = argb & 255;\n\t\tconst redL = linearized(red);\n\t\tconst greenL = linearized(green);\n\t\tconst blueL = linearized(blue);\n\t\tconst x = .41233895 * redL + .35762064 * greenL + .18051042 * blueL;\n\t\tconst y = .2126 * redL + .7152 * greenL + .0722 * blueL;\n\t\tconst z = .01932141 * redL + .11916382 * greenL + .95034478 * blueL;\n\t\tconst rC = .401288 * x + .650173 * y - .051461 * z;\n\t\tconst gC = -.250268 * x + 1.204414 * y + .045854 * z;\n\t\tconst bC = -.002079 * x + .048952 * y + .953127 * z;\n\t\tconst rD = viewingConditions.rgbD[0] * rC;\n\t\tconst gD = viewingConditions.rgbD[1] * gC;\n\t\tconst bD = viewingConditions.rgbD[2] * bC;\n\t\tconst rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100, .42);\n\t\tconst gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100, .42);\n\t\tconst bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100, .42);\n\t\tconst rA = signum(rD) * 400 * rAF / (rAF + 27.13);\n\t\tconst gA = signum(gD) * 400 * gAF / (gAF + 27.13);\n\t\tconst bA = signum(bD) * 400 * bAF / (bAF + 27.13);\n\t\tconst a = (11 * rA + -12 * gA + bA) / 11;\n\t\tconst b = (rA + gA - 2 * bA) / 9;\n\t\tconst u = (20 * rA + 20 * gA + 21 * bA) / 20;\n\t\tconst p2 = (40 * rA + 20 * gA + bA) / 20;\n\t\tconst atan2 = Math.atan2(b, a);\n\t\tconst atanDegrees = atan2 * 180 / Math.PI;\n\t\tconst hue = atanDegrees < 0 ? atanDegrees + 360 : atanDegrees >= 360 ? atanDegrees - 360 : atanDegrees;\n\t\tconst hueRadians = hue * Math.PI / 180;\n\t\tconst ac = p2 * viewingConditions.nbb;\n\t\tconst j = 100 * Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n\t\tconst q = 4 / viewingConditions.c * Math.sqrt(j / 100) * (viewingConditions.aw + 4) * viewingConditions.fLRoot;\n\t\tconst huePrime = hue < 20.14 ? hue + 360 : hue;\n\t\tconst eHue = .25 * (Math.cos(huePrime * Math.PI / 180 + 2) + 3.8);\n\t\tconst p1 = 5e4 / 13 * eHue * viewingConditions.nc * viewingConditions.ncb;\n\t\tconst t = p1 * Math.sqrt(a * a + b * b) / (u + .305);\n\t\tconst alpha = Math.pow(t, .9) * Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73);\n\t\tconst c = alpha * Math.sqrt(j / 100);\n\t\tconst m = c * viewingConditions.fLRoot;\n\t\tconst s = 50 * Math.sqrt(alpha * viewingConditions.c / (viewingConditions.aw + 4));\n\t\tconst jstar = 1.7000000000000002 * j / (1 + .007 * j);\n\t\tconst mstar = 1 / .0228 * Math.log(1 + .0228 * m);\n\t\tconst astar = mstar * Math.cos(hueRadians);\n\t\tconst bstar = mstar * Math.sin(hueRadians);\n\t\treturn new Cam16$1(hue, c, j, q, m, s, jstar, astar, bstar);\n\t}\n\t/**\n\t* @param j CAM16 lightness\n\t* @param c CAM16 chroma\n\t* @param h CAM16 hue\n\t*/\n\tstatic fromJch(j, c, h) {\n\t\treturn Cam16$1.fromJchInViewingConditions(j, c, h, ViewingConditions.DEFAULT);\n\t}\n\t/**\n\t* @param j CAM16 lightness\n\t* @param c CAM16 chroma\n\t* @param h CAM16 hue\n\t* @param viewingConditions Information about the environment where the color\n\t* was observed.\n\t*/\n\tstatic fromJchInViewingConditions(j, c, h, viewingConditions) {\n\t\tconst q = 4 / viewingConditions.c * Math.sqrt(j / 100) * (viewingConditions.aw + 4) * viewingConditions.fLRoot;\n\t\tconst m = c * viewingConditions.fLRoot;\n\t\tconst alpha = c / Math.sqrt(j / 100);\n\t\tconst s = 50 * Math.sqrt(alpha * viewingConditions.c / (viewingConditions.aw + 4));\n\t\tconst hueRadians = h * Math.PI / 180;\n\t\tconst jstar = 1.7000000000000002 * j / (1 + .007 * j);\n\t\tconst mstar = 1 / .0228 * Math.log(1 + .0228 * m);\n\t\tconst astar = mstar * Math.cos(hueRadians);\n\t\tconst bstar = mstar * Math.sin(hueRadians);\n\t\treturn new Cam16$1(h, c, j, q, m, s, jstar, astar, bstar);\n\t}\n\t/**\n\t* @param jstar CAM16-UCS lightness.\n\t* @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n\t* coordinate on the Y axis.\n\t* @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n\t* coordinate on the X axis.\n\t*/\n\tstatic fromUcs(jstar, astar, bstar) {\n\t\treturn Cam16$1.fromUcsInViewingConditions(jstar, astar, bstar, ViewingConditions.DEFAULT);\n\t}\n\t/**\n\t* @param jstar CAM16-UCS lightness.\n\t* @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n\t* coordinate on the Y axis.\n\t* @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n\t* coordinate on the X axis.\n\t* @param viewingConditions Information about the environment where the color\n\t* was observed.\n\t*/\n\tstatic fromUcsInViewingConditions(jstar, astar, bstar, viewingConditions) {\n\t\tconst a = astar;\n\t\tconst b = bstar;\n\t\tconst m = Math.sqrt(a * a + b * b);\n\t\tconst M = (Math.exp(m * .0228) - 1) / .0228;\n\t\tconst c = M / viewingConditions.fLRoot;\n\t\tlet h = Math.atan2(b, a) * (180 / Math.PI);\n\t\tif (h < 0) h += 360;\n\t\tconst j = jstar / (1 - (jstar - 100) * .007);\n\t\treturn Cam16$1.fromJchInViewingConditions(j, c, h, viewingConditions);\n\t}\n\t/**\n\t* @return ARGB representation of color, assuming the color was viewed in\n\t* default viewing conditions, which are near-identical to the default\n\t* viewing conditions for sRGB.\n\t*/\n\ttoInt() {\n\t\treturn this.viewed(ViewingConditions.DEFAULT);\n\t}\n\t/**\n\t* @param viewingConditions Information about the environment where the color\n\t* will be viewed.\n\t* @return ARGB representation of color\n\t*/\n\tviewed(viewingConditions) {\n\t\tconst alpha = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100);\n\t\tconst t = Math.pow(alpha / Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73), 1 / .9);\n\t\tconst hRad = this.hue * Math.PI / 180;\n\t\tconst eHue = .25 * (Math.cos(hRad + 2) + 3.8);\n\t\tconst ac = viewingConditions.aw * Math.pow(this.j / 100, 1 / viewingConditions.c / viewingConditions.z);\n\t\tconst p1 = eHue * (5e4 / 13) * viewingConditions.nc * viewingConditions.ncb;\n\t\tconst p2 = ac / viewingConditions.nbb;\n\t\tconst hSin = Math.sin(hRad);\n\t\tconst hCos = Math.cos(hRad);\n\t\tconst gamma = 23 * (p2 + .305) * t / (23 * p1 + 11 * t * hCos + 108 * t * hSin);\n\t\tconst a = gamma * hCos;\n\t\tconst b = gamma * hSin;\n\t\tconst rA = (460 * p2 + 451 * a + 288 * b) / 1403;\n\t\tconst gA = (460 * p2 - 891 * a - 261 * b) / 1403;\n\t\tconst bA = (460 * p2 - 220 * a - 6300 * b) / 1403;\n\t\tconst rCBase = Math.max(0, 27.13 * Math.abs(rA) / (400 - Math.abs(rA)));\n\t\tconst rC = signum(rA) * (100 / viewingConditions.fl) * Math.pow(rCBase, 1 / .42);\n\t\tconst gCBase = Math.max(0, 27.13 * Math.abs(gA) / (400 - Math.abs(gA)));\n\t\tconst gC = signum(gA) * (100 / viewingConditions.fl) * Math.pow(gCBase, 1 / .42);\n\t\tconst bCBase = Math.max(0, 27.13 * Math.abs(bA) / (400 - Math.abs(bA)));\n\t\tconst bC = signum(bA) * (100 / viewingConditions.fl) * Math.pow(bCBase, 1 / .42);\n\t\tconst rF = rC / viewingConditions.rgbD[0];\n\t\tconst gF = gC / viewingConditions.rgbD[1];\n\t\tconst bF = bC / viewingConditions.rgbD[2];\n\t\tconst x = 1.86206786 * rF - 1.01125463 * gF + .14918677 * bF;\n\t\tconst y = .38752654 * rF + .62144744 * gF - .00897398 * bF;\n\t\tconst z = -.0158415 * rF - .03412294 * gF + 1.04996444 * bF;\n\t\tconst argb = argbFromXyz(x, y, z);\n\t\treturn argb;\n\t}\n\tstatic fromXyzInViewingConditions(x, y, z, viewingConditions) {\n\t\tconst rC = .401288 * x + .650173 * y - .051461 * z;\n\t\tconst gC = -.250268 * x + 1.204414 * y + .045854 * z;\n\t\tconst bC = -.002079 * x + .048952 * y + .953127 * z;\n\t\tconst rD = viewingConditions.rgbD[0] * rC;\n\t\tconst gD = viewingConditions.rgbD[1] * gC;\n\t\tconst bD = viewingConditions.rgbD[2] * bC;\n\t\tconst rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100, .42);\n\t\tconst gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100, .42);\n\t\tconst bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100, .42);\n\t\tconst rA = signum(rD) * 400 * rAF / (rAF + 27.13);\n\t\tconst gA = signum(gD) * 400 * gAF / (gAF + 27.13);\n\t\tconst bA = signum(bD) * 400 * bAF / (bAF + 27.13);\n\t\tconst a = (11 * rA + -12 * gA + bA) / 11;\n\t\tconst b = (rA + gA - 2 * bA) / 9;\n\t\tconst u = (20 * rA + 20 * gA + 21 * bA) / 20;\n\t\tconst p2 = (40 * rA + 20 * gA + bA) / 20;\n\t\tconst atan2 = Math.atan2(b, a);\n\t\tconst atanDegrees = atan2 * 180 / Math.PI;\n\t\tconst hue = atanDegrees < 0 ? atanDegrees + 360 : atanDegrees >= 360 ? atanDegrees - 360 : atanDegrees;\n\t\tconst hueRadians = hue * Math.PI / 180;\n\t\tconst ac = p2 * viewingConditions.nbb;\n\t\tconst J = 100 * Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n\t\tconst Q = 4 / viewingConditions.c * Math.sqrt(J / 100) * (viewingConditions.aw + 4) * viewingConditions.fLRoot;\n\t\tconst huePrime = hue < 20.14 ? hue + 360 : hue;\n\t\tconst eHue = 1 / 4 * (Math.cos(huePrime * Math.PI / 180 + 2) + 3.8);\n\t\tconst p1 = 5e4 / 13 * eHue * viewingConditions.nc * viewingConditions.ncb;\n\t\tconst t = p1 * Math.sqrt(a * a + b * b) / (u + .305);\n\t\tconst alpha = Math.pow(t, .9) * Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73);\n\t\tconst C = alpha * Math.sqrt(J / 100);\n\t\tconst M = C * viewingConditions.fLRoot;\n\t\tconst s = 50 * Math.sqrt(alpha * viewingConditions.c / (viewingConditions.aw + 4));\n\t\tconst jstar = 1.7000000000000002 * J / (1 + .007 * J);\n\t\tconst mstar = Math.log(1 + .0228 * M) / .0228;\n\t\tconst astar = mstar * Math.cos(hueRadians);\n\t\tconst bstar = mstar * Math.sin(hueRadians);\n\t\treturn new Cam16$1(hue, C, J, Q, M, s, jstar, astar, bstar);\n\t}\n\txyzInViewingConditions(viewingConditions) {\n\t\tconst alpha = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100);\n\t\tconst t = Math.pow(alpha / Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73), 1 / .9);\n\t\tconst hRad = this.hue * Math.PI / 180;\n\t\tconst eHue = .25 * (Math.cos(hRad + 2) + 3.8);\n\t\tconst ac = viewingConditions.aw * Math.pow(this.j / 100, 1 / viewingConditions.c / viewingConditions.z);\n\t\tconst p1 = eHue * (5e4 / 13) * viewingConditions.nc * viewingConditions.ncb;\n\t\tconst p2 = ac / viewingConditions.nbb;\n\t\tconst hSin = Math.sin(hRad);\n\t\tconst hCos = Math.cos(hRad);\n\t\tconst gamma = 23 * (p2 + .305) * t / (23 * p1 + 11 * t * hCos + 108 * t * hSin);\n\t\tconst a = gamma * hCos;\n\t\tconst b = gamma * hSin;\n\t\tconst rA = (460 * p2 + 451 * a + 288 * b) / 1403;\n\t\tconst gA = (460 * p2 - 891 * a - 261 * b) / 1403;\n\t\tconst bA = (460 * p2 - 220 * a - 6300 * b) / 1403;\n\t\tconst rCBase = Math.max(0, 27.13 * Math.abs(rA) / (400 - Math.abs(rA)));\n\t\tconst rC = signum(rA) * (100 / viewingConditions.fl) * Math.pow(rCBase, 1 / .42);\n\t\tconst gCBase = Math.max(0, 27.13 * Math.abs(gA) / (400 - Math.abs(gA)));\n\t\tconst gC = signum(gA) * (100 / viewingConditions.fl) * Math.pow(gCBase, 1 / .42);\n\t\tconst bCBase = Math.max(0, 27.13 * Math.abs(bA) / (400 - Math.abs(bA)));\n\t\tconst bC = signum(bA) * (100 / viewingConditions.fl) * Math.pow(bCBase, 1 / .42);\n\t\tconst rF = rC / viewingConditions.rgbD[0];\n\t\tconst gF = gC / viewingConditions.rgbD[1];\n\t\tconst bF = bC / viewingConditions.rgbD[2];\n\t\tconst x = 1.86206786 * rF - 1.01125463 * gF + .14918677 * bF;\n\t\tconst y = .38752654 * rF + .62144744 * gF - .00897398 * bF;\n\t\tconst z = -.0158415 * rF - .03412294 * gF + 1.04996444 * bF;\n\t\treturn [\n\t\t\tx,\n\t\t\ty,\n\t\t\tz\n\t\t];\n\t}\n};\n/**\n* A class that solves the HCT equation.\n*/\nvar HctSolver = class HctSolver$1 {\n\tstatic SCALED_DISCOUNT_FROM_LINRGB = [\n\t\t[\n\t\t\t.001200833568784504,\n\t\t\t.002389694492170889,\n\t\t\t.0002795742885861124\n\t\t],\n\t\t[\n\t\t\t.0005891086651375999,\n\t\t\t.0029785502573438758,\n\t\t\t.0003270666104008398\n\t\t],\n\t\t[\n\t\t\t.00010146692491640572,\n\t\t\t.0005364214359186694,\n\t\t\t.0032979401770712076\n\t\t]\n\t];\n\tstatic LINRGB_FROM_SCALED_DISCOUNT = [\n\t\t[\n\t\t\t1373.2198709594231,\n\t\t\t-1100.4251190754821,\n\t\t\t-7.278681089101213\n\t\t],\n\t\t[\n\t\t\t-271.815969077903,\n\t\t\t559.6580465940733,\n\t\t\t-32.46047482791194\n\t\t],\n\t\t[\n\t\t\t1.9622899599665666,\n\t\t\t-57.173814538844006,\n\t\t\t308.7233197812385\n\t\t]\n\t];\n\tstatic Y_FROM_LINRGB = [\n\t\t.2126,\n\t\t.7152,\n\t\t.0722\n\t];\n\tstatic CRITICAL_PLANES = [\n\t\t.015176349177441876,\n\t\t.045529047532325624,\n\t\t.07588174588720938,\n\t\t.10623444424209313,\n\t\t.13658714259697685,\n\t\t.16693984095186062,\n\t\t.19729253930674434,\n\t\t.2276452376616281,\n\t\t.2579979360165119,\n\t\t.28835063437139563,\n\t\t.3188300904430532,\n\t\t.350925934958123,\n\t\t.3848314933096426,\n\t\t.42057480301049466,\n\t\t.458183274052838,\n\t\t.4976837250274023,\n\t\t.5391024159806381,\n\t\t.5824650784040898,\n\t\t.6277969426914107,\n\t\t.6751227633498623,\n\t\t.7244668422128921,\n\t\t.775853049866786,\n\t\t.829304845476233,\n\t\t.8848452951698498,\n\t\t.942497089126609,\n\t\t1.0022825574869039,\n\t\t1.0642236851973577,\n\t\t1.1283421258858297,\n\t\t1.1946592148522128,\n\t\t1.2631959812511864,\n\t\t1.3339731595349034,\n\t\t1.407011200216447,\n\t\t1.4823302800086415,\n\t\t1.5599503113873272,\n\t\t1.6398909516233677,\n\t\t1.7221716113234105,\n\t\t1.8068114625156377,\n\t\t1.8938294463134073,\n\t\t1.9832442801866852,\n\t\t2.075074464868551,\n\t\t2.1693382909216234,\n\t\t2.2660538449872063,\n\t\t2.36523901573795,\n\t\t2.4669114995532007,\n\t\t2.5710888059345764,\n\t\t2.6777882626779785,\n\t\t2.7870270208169257,\n\t\t2.898822059350997,\n\t\t3.0131901897720907,\n\t\t3.1301480604002863,\n\t\t3.2497121605402226,\n\t\t3.3718988244681087,\n\t\t3.4967242352587946,\n\t\t3.624204428461639,\n\t\t3.754355295633311,\n\t\t3.887192587735158,\n\t\t4.022731918402185,\n\t\t4.160988767090289,\n\t\t4.301978482107941,\n\t\t4.445716283538092,\n\t\t4.592217266055746,\n\t\t4.741496401646282,\n\t\t4.893568542229298,\n\t\t5.048448422192488,\n\t\t5.20615066083972,\n\t\t5.3666897647573375,\n\t\t5.5300801301023865,\n\t\t5.696336044816294,\n\t\t5.865471690767354,\n\t\t6.037501145825082,\n\t\t6.212438385869475,\n\t\t6.390297286737924,\n\t\t6.571091626112461,\n\t\t6.7548350853498045,\n\t\t6.941541251256611,\n\t\t7.131223617812143,\n\t\t7.323895587840543,\n\t\t7.5195704746346665,\n\t\t7.7182615035334345,\n\t\t7.919981813454504,\n\t\t8.124744458384042,\n\t\t8.332562408825165,\n\t\t8.543448553206703,\n\t\t8.757415699253682,\n\t\t8.974476575321063,\n\t\t9.194643831691977,\n\t\t9.417930041841839,\n\t\t9.644347703669503,\n\t\t9.873909240696694,\n\t\t10.106627003236781,\n\t\t10.342513269534024,\n\t\t10.58158024687427,\n\t\t10.8238400726681,\n\t\t11.069304815507364,\n\t\t11.317986476196008,\n\t\t11.569896988756009,\n\t\t11.825048221409341,\n\t\t12.083451977536606,\n\t\t12.345119996613247,\n\t\t12.610063955123938,\n\t\t12.878295467455942,\n\t\t13.149826086772048,\n\t\t13.42466730586372,\n\t\t13.702830557985108,\n\t\t13.984327217668513,\n\t\t14.269168601521828,\n\t\t14.55736596900856,\n\t\t14.848930523210871,\n\t\t15.143873411576273,\n\t\t15.44220572664832,\n\t\t15.743938506781891,\n\t\t16.04908273684337,\n\t\t16.35764934889634,\n\t\t16.66964922287304,\n\t\t16.985093187232053,\n\t\t17.30399201960269,\n\t\t17.62635644741625,\n\t\t17.95219714852476,\n\t\t18.281524751807332,\n\t\t18.614349837764564,\n\t\t18.95068293910138,\n\t\t19.290534541298456,\n\t\t19.633915083172692,\n\t\t19.98083495742689,\n\t\t20.331304511189067,\n\t\t20.685334046541502,\n\t\t21.042933821039977,\n\t\t21.404114048223256,\n\t\t21.76888489811322,\n\t\t22.137256497705877,\n\t\t22.50923893145328,\n\t\t22.884842241736916,\n\t\t23.264076429332462,\n\t\t23.6469514538663,\n\t\t24.033477234264016,\n\t\t24.42366364919083,\n\t\t24.817520537484558,\n\t\t25.21505769858089,\n\t\t25.61628489293138,\n\t\t26.021211842414342,\n\t\t26.429848230738664,\n\t\t26.842203703840827,\n\t\t27.258287870275353,\n\t\t27.678110301598522,\n\t\t28.10168053274597,\n\t\t28.529008062403893,\n\t\t28.96010235337422,\n\t\t29.39497283293396,\n\t\t29.83362889318845,\n\t\t30.276079891419332,\n\t\t30.722335150426627,\n\t\t31.172403958865512,\n\t\t31.62629557157785,\n\t\t32.08401920991837,\n\t\t32.54558406207592,\n\t\t33.010999283389665,\n\t\t33.4802739966603,\n\t\t33.953417292456834,\n\t\t34.430438229418264,\n\t\t34.911345834551085,\n\t\t35.39614910352207,\n\t\t35.88485700094671,\n\t\t36.37747846067349,\n\t\t36.87402238606382,\n\t\t37.37449765026789,\n\t\t37.87891309649659,\n\t\t38.38727753828926,\n\t\t38.89959975977785,\n\t\t39.41588851594697,\n\t\t39.93615253289054,\n\t\t40.460400508064545,\n\t\t40.98864111053629,\n\t\t41.520882981230194,\n\t\t42.05713473317016,\n\t\t42.597404951718396,\n\t\t43.141702194811224,\n\t\t43.6900349931913,\n\t\t44.24241185063697,\n\t\t44.798841244188324,\n\t\t45.35933162437017,\n\t\t45.92389141541209,\n\t\t46.49252901546552,\n\t\t47.065252796817916,\n\t\t47.64207110610409,\n\t\t48.22299226451468,\n\t\t48.808024568002054,\n\t\t49.3971762874833,\n\t\t49.9904556690408,\n\t\t50.587870934119984,\n\t\t51.189430279724725,\n\t\t51.79514187861014,\n\t\t52.40501387947288,\n\t\t53.0190544071392,\n\t\t53.637271562750364,\n\t\t54.259673423945976,\n\t\t54.88626804504493,\n\t\t55.517063457223934,\n\t\t56.15206766869424,\n\t\t56.79128866487574,\n\t\t57.43473440856916,\n\t\t58.08241284012621,\n\t\t58.734331877617365,\n\t\t59.39049941699807,\n\t\t60.05092333227251,\n\t\t60.715611475655585,\n\t\t61.38457167773311,\n\t\t62.057811747619894,\n\t\t62.7353394731159,\n\t\t63.417162620860914,\n\t\t64.10328893648692,\n\t\t64.79372614476921,\n\t\t65.48848194977529,\n\t\t66.18756403501224,\n\t\t66.89098006357258,\n\t\t67.59873767827808,\n\t\t68.31084450182222,\n\t\t69.02730813691093,\n\t\t69.74813616640164,\n\t\t70.47333615344107,\n\t\t71.20291564160104,\n\t\t71.93688215501312,\n\t\t72.67524319850172,\n\t\t73.41800625771542,\n\t\t74.16517879925733,\n\t\t74.9167682708136,\n\t\t75.67278210128072,\n\t\t76.43322770089146,\n\t\t77.1981124613393,\n\t\t77.96744375590167,\n\t\t78.74122893956174,\n\t\t79.51947534912904,\n\t\t80.30219030335869,\n\t\t81.08938110306934,\n\t\t81.88105503125999,\n\t\t82.67721935322541,\n\t\t83.4778813166706,\n\t\t84.28304815182372,\n\t\t85.09272707154808,\n\t\t85.90692527145302,\n\t\t86.72564993000343,\n\t\t87.54890820862819,\n\t\t88.3767072518277,\n\t\t89.2090541872801,\n\t\t90.04595612594655,\n\t\t90.88742016217518,\n\t\t91.73345337380438,\n\t\t92.58406282226491,\n\t\t93.43925555268066,\n\t\t94.29903859396902,\n\t\t95.16341895893969,\n\t\t96.03240364439274,\n\t\t96.9059996312159,\n\t\t97.78421388448044,\n\t\t98.6670533535366,\n\t\t99.55452497210776\n\t];\n\t/**\n\t* Sanitizes a small enough angle in radians.\n\t*\n\t* @param angle An angle in radians; must not deviate too much\n\t* from 0.\n\t* @return A coterminal angle between 0 and 2pi.\n\t*/\n\tstatic sanitizeRadians(angle) {\n\t\treturn (angle + Math.PI * 8) % (Math.PI * 2);\n\t}\n\t/**\n\t* Delinearizes an RGB component, returning a floating-point\n\t* number.\n\t*\n\t* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n\t* linear R/G/B channel\n\t* @return 0.0 <= output <= 255.0, color channel converted to\n\t* regular RGB space\n\t*/\n\tstatic trueDelinearized(rgbComponent) {\n\t\tconst normalized = rgbComponent / 100;\n\t\tlet delinearized$1 = 0;\n\t\tif (normalized <= .0031308) delinearized$1 = normalized * 12.92;\n\t\telse delinearized$1 = 1.055 * Math.pow(normalized, 1 / 2.4) - .055;\n\t\treturn delinearized$1 * 255;\n\t}\n\tstatic chromaticAdaptation(component) {\n\t\tconst af = Math.pow(Math.abs(component), .42);\n\t\treturn signum(component) * 400 * af / (af + 27.13);\n\t}\n\t/**\n\t* Returns the hue of a linear RGB color in CAM16.\n\t*\n\t* @param linrgb The linear RGB coordinates of a color.\n\t* @return The hue of the color in CAM16, in radians.\n\t*/\n\tstatic hueOf(linrgb) {\n\t\tconst scaledDiscount = matrixMultiply(linrgb, HctSolver$1.SCALED_DISCOUNT_FROM_LINRGB);\n\t\tconst rA = HctSolver$1.chromaticAdaptation(scaledDiscount[0]);\n\t\tconst gA = HctSolver$1.chromaticAdaptation(scaledDiscount[1]);\n\t\tconst bA = HctSolver$1.chromaticAdaptation(scaledDiscount[2]);\n\t\tconst a = (11 * rA + -12 * gA + bA) / 11;\n\t\tconst b = (rA + gA - 2 * bA) / 9;\n\t\treturn Math.atan2(b, a);\n\t}\n\tstatic areInCyclicOrder(a, b, c) {\n\t\tconst deltaAB = HctSolver$1.sanitizeRadians(b - a);\n\t\tconst deltaAC = HctSolver$1.sanitizeRadians(c - a);\n\t\treturn deltaAB < deltaAC;\n\t}\n\t/**\n\t* Solves the lerp equation.\n\t*\n\t* @param source The starting number.\n\t* @param mid The number in the middle.\n\t* @param target The ending number.\n\t* @return A number t such that lerp(source, target, t) = mid.\n\t*/\n\tstatic intercept(source, mid, target) {\n\t\treturn (mid - source) / (target - source);\n\t}\n\tstatic lerpPoint(source, t, target) {\n\t\treturn [\n\t\t\tsource[0] + (target[0] - source[0]) * t,\n\t\t\tsource[1] + (target[1] - source[1]) * t,\n\t\t\tsource[2] + (target[2] - source[2]) * t\n\t\t];\n\t}\n\t/**\n\t* Intersects a segment with a plane.\n\t*\n\t* @param source The coordinates of point A.\n\t* @param coordinate The R-, G-, or B-coordinate of the plane.\n\t* @param target The coordinates of point B.\n\t* @param axis The axis the plane is perpendicular with. (0: R, 1:\n\t* G, 2: B)\n\t* @return The intersection point of the segment AB with the plane\n\t* R=coordinate, G=coordinate, or B=coordinate\n\t*/\n\tstatic setCoordinate(source, coordinate, target, axis) {\n\t\tconst t = HctSolver$1.intercept(source[axis], coordinate, target[axis]);\n\t\treturn HctSolver$1.lerpPoint(source, t, target);\n\t}\n\tstatic isBounded(x) {\n\t\treturn 0 <= x && x <= 100;\n\t}\n\t/**\n\t* Returns the nth possible vertex of the polygonal intersection.\n\t*\n\t* @param y The Y value of the plane.\n\t* @param n The zero-based index of the point. 0 <= n <= 11.\n\t* @return The nth possible vertex of the polygonal intersection\n\t* of the y plane and the RGB cube, in linear RGB coordinates, if\n\t* it exists. If this possible vertex lies outside of the cube,\n\t* [-1.0, -1.0, -1.0] is returned.\n\t*/\n\tstatic nthVertex(y, n) {\n\t\tconst kR = HctSolver$1.Y_FROM_LINRGB[0];\n\t\tconst kG = HctSolver$1.Y_FROM_LINRGB[1];\n\t\tconst kB = HctSolver$1.Y_FROM_LINRGB[2];\n\t\tconst coordA = n % 4 <= 1 ? 0 : 100;\n\t\tconst coordB = n % 2 === 0 ? 0 : 100;\n\t\tif (n < 4) {\n\t\t\tconst g = coordA;\n\t\t\tconst b = coordB;\n\t\t\tconst r = (y - g * kG - b * kB) / kR;\n\t\t\tif (HctSolver$1.isBounded(r)) return [\n\t\t\t\tr,\n\t\t\t\tg,\n\t\t\t\tb\n\t\t\t];\n\t\t\telse return [\n\t\t\t\t-1,\n\t\t\t\t-1,\n\t\t\t\t-1\n\t\t\t];\n\t\t} else if (n < 8) {\n\t\t\tconst b = coordA;\n\t\t\tconst r = coordB;\n\t\t\tconst g = (y - r * kR - b * kB) / kG;\n\t\t\tif (HctSolver$1.isBounded(g)) return [\n\t\t\t\tr,\n\t\t\t\tg,\n\t\t\t\tb\n\t\t\t];\n\t\t\telse return [\n\t\t\t\t-1,\n\t\t\t\t-1,\n\t\t\t\t-1\n\t\t\t];\n\t\t} else {\n\t\t\tconst r = coordA;\n\t\t\tconst g = coordB;\n\t\t\tconst b = (y - r * kR - g * kG) / kB;\n\t\t\tif (HctSolver$1.isBounded(b)) return [\n\t\t\t\tr,\n\t\t\t\tg,\n\t\t\t\tb\n\t\t\t];\n\t\t\telse return [\n\t\t\t\t-1,\n\t\t\t\t-1,\n\t\t\t\t-1\n\t\t\t];\n\t\t}\n\t}\n\t/**\n\t* Finds the segment containing the desired color.\n\t*\n\t* @param y The Y value of the color.\n\t* @param targetHue The hue of the color.\n\t* @return A list of two sets of linear RGB coordinates, each\n\t* corresponding to an endpoint of the segment containing the\n\t* desired color.\n\t*/\n\tstatic bisectToSegment(y, targetHue) {\n\t\tlet left = [\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t-1\n\t\t];\n\t\tlet right = left;\n\t\tlet leftHue = 0;\n\t\tlet rightHue = 0;\n\t\tlet initialized = false;\n\t\tlet uncut = true;\n\t\tfor (let n = 0; n < 12; n++) {\n\t\t\tconst mid = HctSolver$1.nthVertex(y, n);\n\t\t\tif (mid[0] < 0) continue;\n\t\t\tconst midHue = HctSolver$1.hueOf(mid);\n\t\t\tif (!initialized) {\n\t\t\t\tleft = mid;\n\t\t\t\tright = mid;\n\t\t\t\tleftHue = midHue;\n\t\t\t\trightHue = midHue;\n\t\t\t\tinitialized = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (uncut || HctSolver$1.areInCyclicOrder(leftHue, midHue, rightHue)) {\n\t\t\t\tuncut = false;\n\t\t\t\tif (HctSolver$1.areInCyclicOrder(leftHue, targetHue, midHue)) {\n\t\t\t\t\tright = mid;\n\t\t\t\t\trightHue = midHue;\n\t\t\t\t} else {\n\t\t\t\t\tleft = mid;\n\t\t\t\t\tleftHue = midHue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [left, right];\n\t}\n\tstatic midpoint(a, b) {\n\t\treturn [\n\t\t\t(a[0] + b[0]) / 2,\n\t\t\t(a[1] + b[1]) / 2,\n\t\t\t(a[2] + b[2]) / 2\n\t\t];\n\t}\n\tstatic criticalPlaneBelow(x) {\n\t\treturn Math.floor(x - .5);\n\t}\n\tstatic criticalPlaneAbove(x) {\n\t\treturn Math.ceil(x - .5);\n\t}\n\t/**\n\t* Finds a color with the given Y and hue on the boundary of the\n\t* cube.\n\t*\n\t* @param y The Y value of the color.\n\t* @param targetHue The hue of the color.\n\t* @return The desired color, in linear RGB coordinates.\n\t*/\n\tstatic bisectToLimit(y, targetHue) {\n\t\tconst segment = HctSolver$1.bisectToSegment(y, targetHue);\n\t\tlet left = segment[0];\n\t\tlet leftHue = HctSolver$1.hueOf(left);\n\t\tlet right = segment[1];\n\t\tfor (let axis = 0; axis < 3; axis++) if (left[axis] !== right[axis]) {\n\t\t\tlet lPlane = -1;\n\t\t\tlet rPlane = 255;\n\t\t\tif (left[axis] < right[axis]) {\n\t\t\t\tlPlane = HctSolver$1.criticalPlaneBelow(HctSolver$1.trueDelinearized(left[axis]));\n\t\t\t\trPlane = HctSolver$1.criticalPlaneAbove(HctSolver$1.trueDelinearized(right[axis]));\n\t\t\t} else {\n\t\t\t\tlPlane = HctSolver$1.criticalPlaneAbove(HctSolver$1.trueDelinearized(left[axis]));\n\t\t\t\trPlane = HctSolver$1.criticalPlaneBelow(HctSolver$1.trueDelinearized(right[axis]));\n\t\t\t}\n\t\t\tfor (let i = 0; i < 8; i++) if (Math.abs(rPlane - lPlane) <= 1) break;\n\t\t\telse {\n\t\t\t\tconst mPlane = Math.floor((lPlane + rPlane) / 2);\n\t\t\t\tconst midPlaneCoordinate = HctSolver$1.CRITICAL_PLANES[mPlane];\n\t\t\t\tconst mid = HctSolver$1.setCoordinate(left, midPlaneCoordinate, right, axis);\n\t\t\t\tconst midHue = HctSolver$1.hueOf(mid);\n\t\t\t\tif (HctSolver$1.areInCyclicOrder(leftHue, targetHue, midHue)) {\n\t\t\t\t\tright = mid;\n\t\t\t\t\trPlane = mPlane;\n\t\t\t\t} else {\n\t\t\t\t\tleft = mid;\n\t\t\t\t\tleftHue = midHue;\n\t\t\t\t\tlPlane = mPlane;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn HctSolver$1.midpoint(left, right);\n\t}\n\tstatic inverseChromaticAdaptation(adapted) {\n\t\tconst adaptedAbs = Math.abs(adapted);\n\t\tconst base = Math.max(0, 27.13 * adaptedAbs / (400 - adaptedAbs));\n\t\treturn signum(adapted) * Math.pow(base, 1 / .42);\n\t}\n\t/**\n\t* Finds a color with the given hue, chroma, and Y.\n\t*\n\t* @param hueRadians The desired hue in radians.\n\t* @param chroma The desired chroma.\n\t* @param y The desired Y.\n\t* @return The desired color as a hexadecimal integer, if found; 0\n\t* otherwise.\n\t*/\n\tstatic findResultByJ(hueRadians, chroma, y) {\n\t\tlet j = Math.sqrt(y) * 11;\n\t\tconst viewingConditions = ViewingConditions.DEFAULT;\n\t\tconst tInnerCoeff = 1 / Math.pow(1.64 - Math.pow(.29, viewingConditions.n), .73);\n\t\tconst eHue = .25 * (Math.cos(hueRadians + 2) + 3.8);\n\t\tconst p1 = eHue * (5e4 / 13) * viewingConditions.nc * viewingConditions.ncb;\n\t\tconst hSin = Math.sin(hueRadians);\n\t\tconst hCos = Math.cos(hueRadians);\n\t\tfor (let iterationRound = 0; iterationRound < 5; iterationRound++) {\n\t\t\tconst jNormalized = j / 100;\n\t\t\tconst alpha = chroma === 0 || j === 0 ? 0 : chroma / Math.sqrt(jNormalized);\n\t\t\tconst t = Math.pow(alpha * tInnerCoeff, 1 / .9);\n\t\t\tconst ac = viewingConditions.aw * Math.pow(jNormalized, 1 / viewingConditions.c / viewingConditions.z);\n\t\t\tconst p2 = ac / viewingConditions.nbb;\n\t\t\tconst gamma = 23 * (p2 + .305) * t / (23 * p1 + 11 * t * hCos + 108 * t * hSin);\n\t\t\tconst a = gamma * hCos;\n\t\t\tconst b = gamma * hSin;\n\t\t\tconst rA = (460 * p2 + 451 * a + 288 * b) / 1403;\n\t\t\tconst gA = (460 * p2 - 891 * a - 261 * b) / 1403;\n\t\t\tconst bA = (460 * p2 - 220 * a - 6300 * b) / 1403;\n\t\t\tconst rCScaled = HctSolver$1.inverseChromaticAdaptation(rA);\n\t\t\tconst gCScaled = HctSolver$1.inverseChromaticAdaptation(gA);\n\t\t\tconst bCScaled = HctSolver$1.inverseChromaticAdaptation(bA);\n\t\t\tconst linrgb = matrixMultiply([\n\t\t\t\trCScaled,\n\t\t\t\tgCScaled,\n\t\t\t\tbCScaled\n\t\t\t], HctSolver$1.LINRGB_FROM_SCALED_DISCOUNT);\n\t\t\tif (linrgb[0] < 0 || linrgb[1] < 0 || linrgb[2] < 0) return 0;\n\t\t\tconst kR = HctSolver$1.Y_FROM_LINRGB[0];\n\t\t\tconst kG = HctSolver$1.Y_FROM_LINRGB[1];\n\t\t\tconst kB = HctSolver$1.Y_FROM_LINRGB[2];\n\t\t\tconst fnj = kR * linrgb[0] + kG * linrgb[1] + kB * linrgb[2];\n\t\t\tif (fnj <= 0) return 0;\n\t\t\tif (iterationRound === 4 || Math.abs(fnj - y) < .002) {\n\t\t\t\tif (linrgb[0] > 100.01 || linrgb[1] > 100.01 || linrgb[2] > 100.01) return 0;\n\t\t\t\treturn argbFromLinrgb(linrgb);\n\t\t\t}\n\t\t\tj = j - (fnj - y) * j / (2 * fnj);\n\t\t}\n\t\treturn 0;\n\t}\n\t/**\n\t* Finds an sRGB color with the given hue, chroma, and L*, if\n\t* possible.\n\t*\n\t* @param hueDegrees The desired hue, in degrees.\n\t* @param chroma The desired chroma.\n\t* @param lstar The desired L*.\n\t* @return A hexadecimal representing the sRGB color. The color\n\t* has sufficiently close hue, chroma, and L* to the desired\n\t* values, if possible; otherwise, the hue and L* will be\n\t* sufficiently close, and chroma will be maximized.\n\t*/\n\tstatic solveToInt(hueDegrees, chroma, lstar) {\n\t\tif (chroma < 1e-4 || lstar < 1e-4 || lstar > 99.9999) return argbFromLstar(lstar);\n\t\thueDegrees = sanitizeDegreesDouble(hueDegrees);\n\t\tconst hueRadians = hueDegrees / 180 * Math.PI;\n\t\tconst y = yFromLstar(lstar);\n\t\tconst exactAnswer = HctSolver$1.findResultByJ(hueRadians, chroma, y);\n\t\tif (exactAnswer !== 0) return exactAnswer;\n\t\tconst linrgb = HctSolver$1.bisectToLimit(y, hueRadians);\n\t\treturn argbFromLinrgb(linrgb);\n\t}\n\t/**\n\t* Finds an sRGB color with the given hue, chroma, and L*, if\n\t* possible.\n\t*\n\t* @param hueDegrees The desired hue, in degrees.\n\t* @param chroma The desired chroma.\n\t* @param lstar The desired L*.\n\t* @return An CAM16 object representing the sRGB color. The color\n\t* has sufficiently close hue, chroma, and L* to the desired\n\t* values, if possible; otherwise, the hue and L* will be\n\t* sufficiently close, and chroma will be maximized.\n\t*/\n\tstatic solveToCam(hueDegrees, chroma, lstar) {\n\t\treturn Cam16.fromInt(HctSolver$1.solveToInt(hueDegrees, chroma, lstar));\n\t}\n};\n/**\n* HCT, hue, chroma, and tone. A color system that provides a perceptually\n* accurate color measurement system that can also accurately render what colors\n* will appear as in different lighting environments.\n*/\nvar Hct = class Hct$1 {\n\t/**\n\t* @param hue 0 <= hue < 360; invalid values are corrected.\n\t* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color\n\t* returned may be lower than the requested chroma. Chroma has a different\n\t* maximum for any given hue and tone.\n\t* @param tone 0 <= tone <= 100; invalid values are corrected.\n\t* @return HCT representation of a color in default viewing conditions.\n\t*/\n\tinternalHue;\n\tinternalChroma;\n\tinternalTone;\n\tstatic from(hue, chroma, tone) {\n\t\treturn new Hct$1(HctSolver.solveToInt(hue, chroma, tone));\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return HCT representation of a color in default viewing conditions\n\t*/\n\tstatic fromInt(argb) {\n\t\treturn new Hct$1(argb);\n\t}\n\ttoInt() {\n\t\treturn this.argb;\n\t}\n\t/**\n\t* A number, in degrees, representing ex. red, orange, yellow, etc.\n\t* Ranges from 0 <= hue < 360.\n\t*/\n\tget hue() {\n\t\treturn this.internalHue;\n\t}\n\t/**\n\t* @param newHue 0 <= newHue < 360; invalid values are corrected.\n\t* Chroma may decrease because chroma has a different maximum for any given\n\t* hue and tone.\n\t*/\n\tset hue(newHue) {\n\t\tthis.setInternalState(HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone));\n\t}\n\tget chroma() {\n\t\treturn this.internalChroma;\n\t}\n\t/**\n\t* @param newChroma 0 <= newChroma < ?\n\t* Chroma may decrease because chroma has a different maximum for any given\n\t* hue and tone.\n\t*/\n\tset chroma(newChroma) {\n\t\tthis.setInternalState(HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone));\n\t}\n\t/** Lightness. Ranges from 0 to 100. */\n\tget tone() {\n\t\treturn this.internalTone;\n\t}\n\t/**\n\t* @param newTone 0 <= newTone <= 100; invalid valids are corrected.\n\t* Chroma may decrease because chroma has a different maximum for any given\n\t* hue and tone.\n\t*/\n\tset tone(newTone) {\n\t\tthis.setInternalState(HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone));\n\t}\n\t/** Sets a property of the Hct object. */\n\tsetValue(propertyName, value) {\n\t\tthis[propertyName] = value;\n\t}\n\ttoString() {\n\t\treturn `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`;\n\t}\n\tstatic isBlue(hue) {\n\t\treturn hue >= 250 && hue < 270;\n\t}\n\tstatic isYellow(hue) {\n\t\treturn hue >= 105 && hue < 125;\n\t}\n\tstatic isCyan(hue) {\n\t\treturn hue >= 170 && hue < 207;\n\t}\n\tconstructor(argb) {\n\t\tthis.argb = argb;\n\t\tconst cam = Cam16.fromInt(argb);\n\t\tthis.internalHue = cam.hue;\n\t\tthis.internalChroma = cam.chroma;\n\t\tthis.internalTone = lstarFromArgb(argb);\n\t\tthis.argb = argb;\n\t}\n\tsetInternalState(argb) {\n\t\tconst cam = Cam16.fromInt(argb);\n\t\tthis.internalHue = cam.hue;\n\t\tthis.internalChroma = cam.chroma;\n\t\tthis.internalTone = lstarFromArgb(argb);\n\t\tthis.argb = argb;\n\t}\n\t/**\n\t* Translates a color into different [ViewingConditions].\n\t*\n\t* Colors change appearance. They look different with lights on versus off,\n\t* the same color, as in hex code, on white looks different when on black.\n\t* This is called color relativity, most famously explicated by Josef Albers\n\t* in Interaction of Color.\n\t*\n\t* In color science, color appearance models can account for this and\n\t* calculate the appearance of a color in different settings. HCT is based on\n\t* CAM16, a color appearance model, and uses it to make these calculations.\n\t*\n\t* See [ViewingConditions.make] for parameters affecting color appearance.\n\t*/\n\tinViewingConditions(vc) {\n\t\tconst cam = Cam16.fromInt(this.toInt());\n\t\tconst viewedInVc = cam.xyzInViewingConditions(vc);\n\t\tconst recastInVc = Cam16.fromXyzInViewingConditions(viewedInVc[0], viewedInVc[1], viewedInVc[2], ViewingConditions.make());\n\t\tconst recastHct = Hct$1.from(recastInVc.hue, recastInVc.chroma, lstarFromY(viewedInVc[1]));\n\t\treturn recastHct;\n\t}\n};\n/**\n* Functions for blending in HCT and CAM16.\n*/\nvar Blend = class Blend$1 {\n\t/**\n\t* Blend the design color's HCT hue towards the key color's HCT\n\t* hue, in a way that leaves the original color recognizable and\n\t* recognizably shifted towards the key color.\n\t*\n\t* @param designColor ARGB representation of an arbitrary color.\n\t* @param sourceColor ARGB representation of the main theme color.\n\t* @return The design color with a hue shifted towards the\n\t* system's color, a slightly warmer/cooler variant of the design\n\t* color's hue.\n\t*/\n\tstatic harmonize(designColor, sourceColor) {\n\t\tconst fromHct = Hct.fromInt(designColor);\n\t\tconst toHct = Hct.fromInt(sourceColor);\n\t\tconst differenceDegrees$1 = differenceDegrees(fromHct.hue, toHct.hue);\n\t\tconst rotationDegrees = Math.min(differenceDegrees$1 * .5, 15);\n\t\tconst outputHue = sanitizeDegreesDouble(fromHct.hue + rotationDegrees * rotationDirection(fromHct.hue, toHct.hue));\n\t\treturn Hct.from(outputHue, fromHct.chroma, fromHct.tone).toInt();\n\t}\n\t/**\n\t* Blends hue from one color into another. The chroma and tone of\n\t* the original color are maintained.\n\t*\n\t* @param from ARGB representation of color\n\t* @param to ARGB representation of color\n\t* @param amount how much blending to perform; 0.0 >= and <= 1.0\n\t* @return from, with a hue blended towards to. Chroma and tone\n\t* are constant.\n\t*/\n\tstatic hctHue(from, to, amount) {\n\t\tconst ucs = Blend$1.cam16Ucs(from, to, amount);\n\t\tconst ucsCam = Cam16.fromInt(ucs);\n\t\tconst fromCam = Cam16.fromInt(from);\n\t\tconst blended = Hct.from(ucsCam.hue, fromCam.chroma, lstarFromArgb(from));\n\t\treturn blended.toInt();\n\t}\n\t/**\n\t* Blend in CAM16-UCS space.\n\t*\n\t* @param from ARGB representation of color\n\t* @param to ARGB representation of color\n\t* @param amount how much blending to perform; 0.0 >= and <= 1.0\n\t* @return from, blended towards to. Hue, chroma, and tone will\n\t* change.\n\t*/\n\tstatic cam16Ucs(from, to, amount) {\n\t\tconst fromCam = Cam16.fromInt(from);\n\t\tconst toCam = Cam16.fromInt(to);\n\t\tconst fromJ = fromCam.jstar;\n\t\tconst fromA = fromCam.astar;\n\t\tconst fromB = fromCam.bstar;\n\t\tconst toJ = toCam.jstar;\n\t\tconst toA = toCam.astar;\n\t\tconst toB = toCam.bstar;\n\t\tconst jstar = fromJ + (toJ - fromJ) * amount;\n\t\tconst astar = fromA + (toA - fromA) * amount;\n\t\tconst bstar = fromB + (toB - fromB) * amount;\n\t\treturn Cam16.fromUcs(jstar, astar, bstar).toInt();\n\t}\n};\n/**\n* Utility methods for calculating contrast given two colors, or calculating a\n* color given one color and a contrast ratio.\n*\n* Contrast ratio is calculated using XYZ's Y. When linearized to match human\n* perception, Y becomes HCT's tone and L*a*b*'s' L*. Informally, this is the\n* lightness of a color.\n*\n* Methods refer to tone, T in the the HCT color space.\n* Tone is equivalent to L* in the L*a*b* color space, or L in the LCH color\n* space.\n*/\nvar Contrast = class Contrast$1 {\n\t/**\n\t* Returns a contrast ratio, which ranges from 1 to 21.\n\t*\n\t* @param toneA Tone between 0 and 100. Values outside will be clamped.\n\t* @param toneB Tone between 0 and 100. Values outside will be clamped.\n\t*/\n\tstatic ratioOfTones(toneA, toneB) {\n\t\ttoneA = clampDouble(0, 100, toneA);\n\t\ttoneB = clampDouble(0, 100, toneB);\n\t\treturn Contrast$1.ratioOfYs(yFromLstar(toneA), yFromLstar(toneB));\n\t}\n\tstatic ratioOfYs(y1, y2) {\n\t\tconst lighter = y1 > y2 ? y1 : y2;\n\t\tconst darker = lighter === y2 ? y1 : y2;\n\t\treturn (lighter + 5) / (darker + 5);\n\t}\n\t/**\n\t* Returns a tone >= tone parameter that ensures ratio parameter.\n\t* Return value is between 0 and 100.\n\t* Returns -1 if ratio cannot be achieved with tone parameter.\n\t*\n\t* @param tone Tone return value must contrast with.\n\t* Range is 0 to 100. Invalid values will result in -1 being returned.\n\t* @param ratio Contrast ratio of return value and tone.\n\t* Range is 1 to 21, invalid values have undefined behavior.\n\t*/\n\tstatic lighter(tone, ratio) {\n\t\tif (tone < 0 || tone > 100) return -1;\n\t\tconst darkY = yFromLstar(tone);\n\t\tconst lightY = ratio * (darkY + 5) - 5;\n\t\tconst realContrast = Contrast$1.ratioOfYs(lightY, darkY);\n\t\tconst delta = Math.abs(realContrast - ratio);\n\t\tif (realContrast < ratio && delta > .04) return -1;\n\t\tconst returnValue = lstarFromY(lightY) + .4;\n\t\tif (returnValue < 0 || returnValue > 100) return -1;\n\t\treturn returnValue;\n\t}\n\t/**\n\t* Returns a tone <= tone parameter that ensures ratio parameter.\n\t* Return value is between 0 and 100.\n\t* Returns -1 if ratio cannot be achieved with tone parameter.\n\t*\n\t* @param tone Tone return value must contrast with.\n\t* Range is 0 to 100. Invalid values will result in -1 being returned.\n\t* @param ratio Contrast ratio of return value and tone.\n\t* Range is 1 to 21, invalid values have undefined behavior.\n\t*/\n\tstatic darker(tone, ratio) {\n\t\tif (tone < 0 || tone > 100) return -1;\n\t\tconst lightY = yFromLstar(tone);\n\t\tconst darkY = (lightY + 5) / ratio - 5;\n\t\tconst realContrast = Contrast$1.ratioOfYs(lightY, darkY);\n\t\tconst delta = Math.abs(realContrast - ratio);\n\t\tif (realContrast < ratio && delta > .04) return -1;\n\t\tconst returnValue = lstarFromY(darkY) - .4;\n\t\tif (returnValue < 0 || returnValue > 100) return -1;\n\t\treturn returnValue;\n\t}\n\t/**\n\t* Returns a tone >= tone parameter that ensures ratio parameter.\n\t* Return value is between 0 and 100.\n\t* Returns 100 if ratio cannot be achieved with tone parameter.\n\t*\n\t* This method is unsafe because the returned value is guaranteed to be in\n\t* bounds for tone, i.e. between 0 and 100. However, that value may not reach\n\t* the ratio with tone. For example, there is no color lighter than T100.\n\t*\n\t* @param tone Tone return value must contrast with.\n\t* Range is 0 to 100. Invalid values will result in 100 being returned.\n\t* @param ratio Desired contrast ratio of return value and tone parameter.\n\t* Range is 1 to 21, invalid values have undefined behavior.\n\t*/\n\tstatic lighterUnsafe(tone, ratio) {\n\t\tconst lighterSafe = Contrast$1.lighter(tone, ratio);\n\t\treturn lighterSafe < 0 ? 100 : lighterSafe;\n\t}\n\t/**\n\t* Returns a tone >= tone parameter that ensures ratio parameter.\n\t* Return value is between 0 and 100.\n\t* Returns 100 if ratio cannot be achieved with tone parameter.\n\t*\n\t* This method is unsafe because the returned value is guaranteed to be in\n\t* bounds for tone, i.e. between 0 and 100. However, that value may not reach\n\t* the [ratio with [tone]. For example, there is no color darker than T0.\n\t*\n\t* @param tone Tone return value must contrast with.\n\t* Range is 0 to 100. Invalid values will result in 0 being returned.\n\t* @param ratio Desired contrast ratio of return value and tone parameter.\n\t* Range is 1 to 21, invalid values have undefined behavior.\n\t*/\n\tstatic darkerUnsafe(tone, ratio) {\n\t\tconst darkerSafe = Contrast$1.darker(tone, ratio);\n\t\treturn darkerSafe < 0 ? 0 : darkerSafe;\n\t}\n};\n/**\n* Check and/or fix universally disliked colors.\n* Color science studies of color preference indicate universal distaste for\n* dark yellow-greens, and also show this is correlated to distate for\n* biological waste and rotting food.\n*\n* See Palmer and Schloss, 2010 or Schloss and Palmer's Chapter 21 in Handbook\n* of Color Psychology (2015).\n*/\nvar DislikeAnalyzer = class DislikeAnalyzer$1 {\n\t/**\n\t* Returns true if a color is disliked.\n\t*\n\t* @param hct A color to be judged.\n\t* @return Whether the color is disliked.\n\t*\n\t* Disliked is defined as a dark yellow-green that is not neutral.\n\t*/\n\tstatic isDisliked(hct) {\n\t\tconst huePasses = Math.round(hct.hue) >= 90 && Math.round(hct.hue) <= 111;\n\t\tconst chromaPasses = Math.round(hct.chroma) > 16;\n\t\tconst tonePasses = Math.round(hct.tone) < 65;\n\t\treturn huePasses && chromaPasses && tonePasses;\n\t}\n\t/**\n\t* If a color is disliked, lighten it to make it likable.\n\t*\n\t* @param hct A color to be judged.\n\t* @return A new color if the original color is disliked, or the original\n\t* color if it is acceptable.\n\t*/\n\tstatic fixIfDisliked(hct) {\n\t\tif (DislikeAnalyzer$1.isDisliked(hct)) return Hct.from(hct.hue, hct.chroma, 70);\n\t\treturn hct;\n\t}\n};\n/**\n* A class containing a value that changes with the contrast level.\n*\n* Usually represents the contrast requirements for a dynamic color on its\n* background. The four values correspond to values for contrast levels -1.0,\n* 0.0, 0.5, and 1.0, respectively.\n*/\nvar ContrastCurve = class {\n\t/**\n\t* Creates a `ContrastCurve` object.\n\t*\n\t* @param low Value for contrast level -1.0\n\t* @param normal Value for contrast level 0.0\n\t* @param medium Value for contrast level 0.5\n\t* @param high Value for contrast level 1.0\n\t*/\n\tconstructor(low, normal, medium, high) {\n\t\tthis.low = low;\n\t\tthis.normal = normal;\n\t\tthis.medium = medium;\n\t\tthis.high = high;\n\t}\n\t/**\n\t* Returns the value at a given contrast level.\n\t*\n\t* @param contrastLevel The contrast level. 0.0 is the default (normal); -1.0\n\t* is the lowest; 1.0 is the highest.\n\t* @return The value. For contrast ratios, a number between 1.0 and 21.0.\n\t*/\n\tget(contrastLevel) {\n\t\tif (contrastLevel <= -1) return this.low;\n\t\telse if (contrastLevel < 0) return lerp(this.low, this.normal, (contrastLevel - -1) / 1);\n\t\telse if (contrastLevel < .5) return lerp(this.normal, this.medium, (contrastLevel - 0) / .5);\n\t\telse if (contrastLevel < 1) return lerp(this.medium, this.high, (contrastLevel - .5) / .5);\n\t\telse return this.high;\n\t}\n};\nfunction validateExtendedColor(originalColor, specVersion, extendedColor) {\n\tif (originalColor.name !== extendedColor.name) throw new Error(`Attempting to extend color ${originalColor.name} with color ${extendedColor.name} of different name for spec version ${specVersion}.`);\n\tif (originalColor.isBackground !== extendedColor.isBackground) throw new Error(`Attempting to extend color ${originalColor.name} as a ${originalColor.isBackground ? \"background\" : \"foreground\"} with color ${extendedColor.name} as a ${extendedColor.isBackground ? \"background\" : \"foreground\"} for spec version ${specVersion}.`);\n}\n/**\n* Returns a new DynamicColor that is the same as the original color, but with\n* the extended dynamic color's constraints for the given spec version.\n*\n* @param originalColor The original color.\n* @param specVersion The spec version to extend.\n* @param extendedColor The color with the values to extend.\n*/\nfunction extendSpecVersion(originalColor, specVersion, extendedColor) {\n\tvalidateExtendedColor(originalColor, specVersion, extendedColor);\n\treturn DynamicColor.fromPalette({\n\t\tname: originalColor.name,\n\t\tpalette: (s) => s.specVersion === specVersion ? extendedColor.palette(s) : originalColor.palette(s),\n\t\ttone: (s) => s.specVersion === specVersion ? extendedColor.tone(s) : originalColor.tone(s),\n\t\tisBackground: originalColor.isBackground,\n\t\tchromaMultiplier: (s) => {\n\t\t\tconst chromaMultiplier = s.specVersion === specVersion ? extendedColor.chromaMultiplier : originalColor.chromaMultiplier;\n\t\t\treturn chromaMultiplier !== void 0 ? chromaMultiplier(s) : 1;\n\t\t},\n\t\tbackground: (s) => {\n\t\t\tconst background = s.specVersion === specVersion ? extendedColor.background : originalColor.background;\n\t\t\treturn background !== void 0 ? background(s) : void 0;\n\t\t},\n\t\tsecondBackground: (s) => {\n\t\t\tconst secondBackground = s.specVersion === specVersion ? extendedColor.secondBackground : originalColor.secondBackground;\n\t\t\treturn secondBackground !== void 0 ? secondBackground(s) : void 0;\n\t\t},\n\t\tcontrastCurve: (s) => {\n\t\t\tconst contrastCurve = s.specVersion === specVersion ? extendedColor.contrastCurve : originalColor.contrastCurve;\n\t\t\treturn contrastCurve !== void 0 ? contrastCurve(s) : void 0;\n\t\t},\n\t\ttoneDeltaPair: (s) => {\n\t\t\tconst toneDeltaPair = s.specVersion === specVersion ? extendedColor.toneDeltaPair : originalColor.toneDeltaPair;\n\t\t\treturn toneDeltaPair !== void 0 ? toneDeltaPair(s) : void 0;\n\t\t},\n\t\topacity: (s) => {\n\t\t\tconst opacity = s.specVersion === specVersion ? extendedColor.opacity : originalColor.opacity;\n\t\t\treturn opacity !== void 0 ? opacity(s) : void 0;\n\t\t}\n\t});\n}\n/**\n* A color that adjusts itself based on UI state provided by DynamicScheme.\n*\n* Colors without backgrounds do not change tone when contrast changes. Colors\n* with backgrounds become closer to their background as contrast lowers, and\n* further when contrast increases.\n*\n* Prefer static constructors. They require either a hexcode, a palette and\n* tone, or a hue and chroma. Optionally, they can provide a background\n* DynamicColor.\n*/\nvar DynamicColor = class DynamicColor$1 {\n\thctCache = /* @__PURE__ */ new Map();\n\t/**\n\t* Create a DynamicColor defined by a TonalPalette and HCT tone.\n\t*\n\t* @param args Functions with DynamicScheme as input. Must provide a palette\n\t* and tone. May provide a background DynamicColor and ToneDeltaPair.\n\t*/\n\tstatic fromPalette(args) {\n\t\treturn new DynamicColor$1(args.name ?? \"\", args.palette, args.tone ?? DynamicColor$1.getInitialToneFromBackground(args.background), args.isBackground ?? false, args.chromaMultiplier, args.background, args.secondBackground, args.contrastCurve, args.toneDeltaPair, args.opacity);\n\t}\n\tstatic getInitialToneFromBackground(background) {\n\t\tif (background === void 0) return (s) => 50;\n\t\treturn (s) => background(s) ? background(s).getTone(s) : 50;\n\t}\n\t/**\n\t* The base constructor for DynamicColor.\n\t*\n\t* _Strongly_ prefer using one of the convenience constructors. This class is\n\t* arguably too flexible to ensure it can support any scenario. Functional\n\t* arguments allow overriding without risks that come with subclasses.\n\t*\n\t* For example, the default behavior of adjust tone at max contrast\n\t* to be at a 7.0 ratio with its background is principled and\n\t* matches accessibility guidance. That does not mean it's the desired\n\t* approach for _every_ design system, and every color pairing,\n\t* always, in every case.\n\t*\n\t* @param name The name of the dynamic color. Defaults to empty.\n\t* @param palette Function that provides a TonalPalette given DynamicScheme. A\n\t* TonalPalette is defined by a hue and chroma, so this replaces the need\n\t* to specify hue/chroma. By providing a tonal palette, when contrast\n\t* adjustments are made, intended chroma can be preserved.\n\t* @param tone Function that provides a tone, given a DynamicScheme.\n\t* @param isBackground Whether this dynamic color is a background, with some\n\t* other color as the foreground. Defaults to false.\n\t* @param chromaMultiplier A factor that multiplies the chroma for this color.\n\t* @param background The background of the dynamic color (as a function of a\n\t* `DynamicScheme`), if it exists.\n\t* @param secondBackground A second background of the dynamic color (as a\n\t* function of a `DynamicScheme`), if it exists.\n\t* @param contrastCurve A `ContrastCurve` object specifying how its contrast\n\t* against its background should behave in various contrast levels\n\t* options.\n\t* @param toneDeltaPair A `ToneDeltaPair` object specifying a tone delta\n\t* constraint between two colors. One of them must be the color being\n\t* constructed.\n\t*/\n\tconstructor(name, palette, tone, isBackground, chromaMultiplier, background, secondBackground, contrastCurve, toneDeltaPair, opacity) {\n\t\tthis.name = name;\n\t\tthis.palette = palette;\n\t\tthis.tone = tone;\n\t\tthis.isBackground = isBackground;\n\t\tthis.chromaMultiplier = chromaMultiplier;\n\t\tthis.background = background;\n\t\tthis.secondBackground = secondBackground;\n\t\tthis.contrastCurve = contrastCurve;\n\t\tthis.toneDeltaPair = toneDeltaPair;\n\t\tthis.opacity = opacity;\n\t\tif (!background && secondBackground) throw new Error(`Color ${name} has secondBackgrounddefined, but background is not defined.`);\n\t\tif (!background && contrastCurve) throw new Error(`Color ${name} has contrastCurvedefined, but background is not defined.`);\n\t\tif (background && !contrastCurve) throw new Error(`Color ${name} has backgrounddefined, but contrastCurve is not defined.`);\n\t}\n\t/**\n\t* Returns a deep copy of this DynamicColor.\n\t*/\n\tclone() {\n\t\treturn DynamicColor$1.fromPalette({\n\t\t\tname: this.name,\n\t\t\tpalette: this.palette,\n\t\t\ttone: this.tone,\n\t\t\tisBackground: this.isBackground,\n\t\t\tchromaMultiplier: this.chromaMultiplier,\n\t\t\tbackground: this.background,\n\t\t\tsecondBackground: this.secondBackground,\n\t\t\tcontrastCurve: this.contrastCurve,\n\t\t\ttoneDeltaPair: this.toneDeltaPair,\n\t\t\topacity: this.opacity\n\t\t});\n\t}\n\t/**\n\t* Clears the cache of HCT values for this color. For testing or debugging\n\t* purposes.\n\t*/\n\tclearCache() {\n\t\tthis.hctCache.clear();\n\t}\n\t/**\n\t* Returns a ARGB integer (i.e. a hex code).\n\t*\n\t* @param scheme Defines the conditions of the user interface, for example,\n\t* whether or not it is dark mode or light mode, and what the desired\n\t* contrast level is.\n\t*/\n\tgetArgb(scheme) {\n\t\tconst argb = this.getHct(scheme).toInt();\n\t\tif (this.opacity == null) return argb;\n\t\tconst percentage = this.opacity(scheme);\n\t\tif (percentage == null) return argb;\n\t\tconst alpha = clampInt(0, 255, Math.round(percentage * 255));\n\t\treturn argb & 16777215 | alpha << 24;\n\t}\n\t/**\n\t* Returns a color, expressed in the HCT color space, that this\n\t* DynamicColor is under the conditions in scheme.\n\t*\n\t* @param scheme Defines the conditions of the user interface, for example,\n\t* whether or not it is dark mode or light mode, and what the desired\n\t* contrast level is.\n\t*/\n\tgetHct(scheme) {\n\t\tconst cachedAnswer = this.hctCache.get(scheme);\n\t\tif (cachedAnswer != null) return cachedAnswer;\n\t\tconst answer = getSpec$1(scheme.specVersion).getHct(scheme, this);\n\t\tif (this.hctCache.size > 4) this.hctCache.clear();\n\t\tthis.hctCache.set(scheme, answer);\n\t\treturn answer;\n\t}\n\t/**\n\t* Returns a tone, T in the HCT color space, that this DynamicColor is under\n\t* the conditions in scheme.\n\t*\n\t* @param scheme Defines the conditions of the user interface, for example,\n\t* whether or not it is dark mode or light mode, and what the desired\n\t* contrast level is.\n\t*/\n\tgetTone(scheme) {\n\t\treturn getSpec$1(scheme.specVersion).getTone(scheme, this);\n\t}\n\t/**\n\t* Given a background tone, finds a foreground tone, while ensuring they reach\n\t* a contrast ratio that is as close to [ratio] as possible.\n\t*\n\t* @param bgTone Tone in HCT. Range is 0 to 100, undefined behavior when it\n\t* falls outside that range.\n\t* @param ratio The contrast ratio desired between bgTone and the return\n\t* value.\n\t*/\n\tstatic foregroundTone(bgTone, ratio) {\n\t\tconst lighterTone = Contrast.lighterUnsafe(bgTone, ratio);\n\t\tconst darkerTone = Contrast.darkerUnsafe(bgTone, ratio);\n\t\tconst lighterRatio = Contrast.ratioOfTones(lighterTone, bgTone);\n\t\tconst darkerRatio = Contrast.ratioOfTones(darkerTone, bgTone);\n\t\tconst preferLighter = DynamicColor$1.tonePrefersLightForeground(bgTone);\n\t\tif (preferLighter) {\n\t\t\tconst negligibleDifference = Math.abs(lighterRatio - darkerRatio) < .1 && lighterRatio < ratio && darkerRatio < ratio;\n\t\t\treturn lighterRatio >= ratio || lighterRatio >= darkerRatio || negligibleDifference ? lighterTone : darkerTone;\n\t\t} else return darkerRatio >= ratio || darkerRatio >= lighterRatio ? darkerTone : lighterTone;\n\t}\n\t/**\n\t* Returns whether [tone] prefers a light foreground.\n\t*\n\t* People prefer white foregrounds on ~T60-70. Observed over time, and also\n\t* by Andrew Somers during research for APCA.\n\t*\n\t* T60 used as to create the smallest discontinuity possible when skipping\n\t* down to T49 in order to ensure light foregrounds.\n\t* Since `tertiaryContainer` in dark monochrome scheme requires a tone of\n\t* 60, it should not be adjusted. Therefore, 60 is excluded here.\n\t*/\n\tstatic tonePrefersLightForeground(tone) {\n\t\treturn Math.round(tone) < 60;\n\t}\n\t/**\n\t* Returns whether [tone] can reach a contrast ratio of 4.5 with a lighter\n\t* color.\n\t*/\n\tstatic toneAllowsLightForeground(tone) {\n\t\treturn Math.round(tone) <= 49;\n\t}\n\t/**\n\t* Adjusts a tone such that white has 4.5 contrast, if the tone is\n\t* reasonably close to supporting it.\n\t*/\n\tstatic enableLightForeground(tone) {\n\t\tif (DynamicColor$1.tonePrefersLightForeground(tone) && !DynamicColor$1.toneAllowsLightForeground(tone)) return 49;\n\t\treturn tone;\n\t}\n};\n/**\n* A delegate for the color calculation of a DynamicScheme in the 2021 spec.\n*/\nvar ColorCalculationDelegateImpl2021 = class {\n\tgetHct(scheme, color) {\n\t\tconst tone = color.getTone(scheme);\n\t\tconst palette = color.palette(scheme);\n\t\treturn palette.getHct(tone);\n\t}\n\tgetTone(scheme, color) {\n\t\tconst decreasingContrast = scheme.contrastLevel < 0;\n\t\tconst toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : void 0;\n\t\tif (toneDeltaPair) {\n\t\t\tconst roleA = toneDeltaPair.roleA;\n\t\t\tconst roleB = toneDeltaPair.roleB;\n\t\t\tconst delta = toneDeltaPair.delta;\n\t\t\tconst polarity = toneDeltaPair.polarity;\n\t\t\tconst stayTogether = toneDeltaPair.stayTogether;\n\t\t\tconst aIsNearer = polarity === \"nearer\" || polarity === \"lighter\" && !scheme.isDark || polarity === \"darker\" && scheme.isDark;\n\t\t\tconst nearer = aIsNearer ? roleA : roleB;\n\t\t\tconst farther = aIsNearer ? roleB : roleA;\n\t\t\tconst amNearer = color.name === nearer.name;\n\t\t\tconst expansionDir = scheme.isDark ? 1 : -1;\n\t\t\tlet nTone = nearer.tone(scheme);\n\t\t\tlet fTone = farther.tone(scheme);\n\t\t\tif (color.background && nearer.contrastCurve && farther.contrastCurve) {\n\t\t\t\tconst bg = color.background(scheme);\n\t\t\t\tconst nContrastCurve = nearer.contrastCurve(scheme);\n\t\t\t\tconst fContrastCurve = farther.contrastCurve(scheme);\n\t\t\t\tif (bg && nContrastCurve && fContrastCurve) {\n\t\t\t\t\tconst bgTone = bg.getTone(scheme);\n\t\t\t\t\tconst nContrast = nContrastCurve.get(scheme.contrastLevel);\n\t\t\t\t\tconst fContrast = fContrastCurve.get(scheme.contrastLevel);\n\t\t\t\t\tif (Contrast.ratioOfTones(bgTone, nTone) < nContrast) nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n\t\t\t\t\tif (Contrast.ratioOfTones(bgTone, fTone) < fContrast) fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n\t\t\t\t\tif (decreasingContrast) {\n\t\t\t\t\t\tnTone = DynamicColor.foregroundTone(bgTone, nContrast);\n\t\t\t\t\t\tfTone = DynamicColor.foregroundTone(bgTone, fContrast);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((fTone - nTone) * expansionDir < delta) {\n\t\t\t\tfTone = clampDouble(0, 100, nTone + delta * expansionDir);\n\t\t\t\tif ((fTone - nTone) * expansionDir >= delta) {} else nTone = clampDouble(0, 100, fTone - delta * expansionDir);\n\t\t\t}\n\t\t\tif (50 <= nTone && nTone < 60) if (expansionDir > 0) {\n\t\t\t\tnTone = 60;\n\t\t\t\tfTone = Math.max(fTone, nTone + delta * expansionDir);\n\t\t\t} else {\n\t\t\t\tnTone = 49;\n\t\t\t\tfTone = Math.min(fTone, nTone + delta * expansionDir);\n\t\t\t}\n\t\t\telse if (50 <= fTone && fTone < 60) if (stayTogether) if (expansionDir > 0) {\n\t\t\t\tnTone = 60;\n\t\t\t\tfTone = Math.max(fTone, nTone + delta * expansionDir);\n\t\t\t} else {\n\t\t\t\tnTone = 49;\n\t\t\t\tfTone = Math.min(fTone, nTone + delta * expansionDir);\n\t\t\t}\n\t\t\telse if (expansionDir > 0) fTone = 60;\n\t\t\telse fTone = 49;\n\t\t\treturn amNearer ? nTone : fTone;\n\t\t} else {\n\t\t\tlet answer = color.tone(scheme);\n\t\t\tif (color.background == void 0 || color.background(scheme) === void 0 || color.contrastCurve == void 0 || color.contrastCurve(scheme) === void 0) return answer;\n\t\t\tconst bgTone = color.background(scheme).getTone(scheme);\n\t\t\tconst desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n\t\t\tif (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio) {} else answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n\t\t\tif (decreasingContrast) answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n\t\t\tif (color.isBackground && 50 <= answer && answer < 60) if (Contrast.ratioOfTones(49, bgTone) >= desiredRatio) answer = 49;\n\t\t\telse answer = 60;\n\t\t\tif (color.secondBackground == void 0 || color.secondBackground(scheme) === void 0) return answer;\n\t\t\tconst [bg1, bg2] = [color.background, color.secondBackground];\n\t\t\tconst [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n\t\t\tconst [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n\t\t\tif (Contrast.ratioOfTones(upper, answer) >= desiredRatio && Contrast.ratioOfTones(lower, answer) >= desiredRatio) return answer;\n\t\t\tconst lightOption = Contrast.lighter(upper, desiredRatio);\n\t\t\tconst darkOption = Contrast.darker(lower, desiredRatio);\n\t\t\tconst availables = [];\n\t\t\tif (lightOption !== -1) availables.push(lightOption);\n\t\t\tif (darkOption !== -1) availables.push(darkOption);\n\t\t\tconst prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) || DynamicColor.tonePrefersLightForeground(bgTone2);\n\t\t\tif (prefersLight) return lightOption < 0 ? 100 : lightOption;\n\t\t\tif (availables.length === 1) return availables[0];\n\t\t\treturn darkOption < 0 ? 0 : darkOption;\n\t\t}\n\t}\n};\n/**\n* A delegate for the color calculation of a DynamicScheme in the 2025 spec.\n*/\nvar ColorCalculationDelegateImpl2025 = class {\n\tgetHct(scheme, color) {\n\t\tconst palette = color.palette(scheme);\n\t\tconst tone = color.getTone(scheme);\n\t\tconst hue = palette.hue;\n\t\tconst chroma = palette.chroma * (color.chromaMultiplier ? color.chromaMultiplier(scheme) : 1);\n\t\treturn Hct.from(hue, chroma, tone);\n\t}\n\tgetTone(scheme, color) {\n\t\tconst toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : void 0;\n\t\tif (toneDeltaPair) {\n\t\t\tconst roleA = toneDeltaPair.roleA;\n\t\t\tconst roleB = toneDeltaPair.roleB;\n\t\t\tconst polarity = toneDeltaPair.polarity;\n\t\t\tconst constraint = toneDeltaPair.constraint;\n\t\t\tconst absoluteDelta = polarity === \"darker\" || polarity === \"relative_lighter\" && scheme.isDark || polarity === \"relative_darker\" && !scheme.isDark ? -toneDeltaPair.delta : toneDeltaPair.delta;\n\t\t\tconst amRoleA = color.name === roleA.name;\n\t\t\tconst selfRole = amRoleA ? roleA : roleB;\n\t\t\tconst refRole = amRoleA ? roleB : roleA;\n\t\t\tlet selfTone = selfRole.tone(scheme);\n\t\t\tlet refTone = refRole.getTone(scheme);\n\t\t\tconst relativeDelta = absoluteDelta * (amRoleA ? 1 : -1);\n\t\t\tif (constraint === \"exact\") selfTone = clampDouble(0, 100, refTone + relativeDelta);\n\t\t\telse if (constraint === \"nearer\") if (relativeDelta > 0) selfTone = clampDouble(0, 100, clampDouble(refTone, refTone + relativeDelta, selfTone));\n\t\t\telse selfTone = clampDouble(0, 100, clampDouble(refTone + relativeDelta, refTone, selfTone));\n\t\t\telse if (constraint === \"farther\") if (relativeDelta > 0) selfTone = clampDouble(refTone + relativeDelta, 100, selfTone);\n\t\t\telse selfTone = clampDouble(0, refTone + relativeDelta, selfTone);\n\t\t\tif (color.background && color.contrastCurve) {\n\t\t\t\tconst background = color.background(scheme);\n\t\t\t\tconst contrastCurve = color.contrastCurve(scheme);\n\t\t\t\tif (background && contrastCurve) {\n\t\t\t\t\tconst bgTone = background.getTone(scheme);\n\t\t\t\t\tconst selfContrast = contrastCurve.get(scheme.contrastLevel);\n\t\t\t\t\tselfTone = Contrast.ratioOfTones(bgTone, selfTone) >= selfContrast && scheme.contrastLevel >= 0 ? selfTone : DynamicColor.foregroundTone(bgTone, selfContrast);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (color.isBackground && !color.name.endsWith(\"_fixed_dim\")) if (selfTone >= 57) selfTone = clampDouble(65, 100, selfTone);\n\t\t\telse selfTone = clampDouble(0, 49, selfTone);\n\t\t\treturn selfTone;\n\t\t} else {\n\t\t\tlet answer = color.tone(scheme);\n\t\t\tif (color.background == void 0 || color.background(scheme) === void 0 || color.contrastCurve == void 0 || color.contrastCurve(scheme) === void 0) return answer;\n\t\t\tconst bgTone = color.background(scheme).getTone(scheme);\n\t\t\tconst desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n\t\t\tanswer = Contrast.ratioOfTones(bgTone, answer) >= desiredRatio && scheme.contrastLevel >= 0 ? answer : DynamicColor.foregroundTone(bgTone, desiredRatio);\n\t\t\tif (color.isBackground && !color.name.endsWith(\"_fixed_dim\")) if (answer >= 57) answer = clampDouble(65, 100, answer);\n\t\t\telse answer = clampDouble(0, 49, answer);\n\t\t\tif (color.secondBackground == void 0 || color.secondBackground(scheme) === void 0) return answer;\n\t\t\tconst [bg1, bg2] = [color.background, color.secondBackground];\n\t\t\tconst [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n\t\t\tconst [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n\t\t\tif (Contrast.ratioOfTones(upper, answer) >= desiredRatio && Contrast.ratioOfTones(lower, answer) >= desiredRatio) return answer;\n\t\t\tconst lightOption = Contrast.lighter(upper, desiredRatio);\n\t\t\tconst darkOption = Contrast.darker(lower, desiredRatio);\n\t\t\tconst availables = [];\n\t\t\tif (lightOption !== -1) availables.push(lightOption);\n\t\t\tif (darkOption !== -1) availables.push(darkOption);\n\t\t\tconst prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) || DynamicColor.tonePrefersLightForeground(bgTone2);\n\t\t\tif (prefersLight) return lightOption < 0 ? 100 : lightOption;\n\t\t\tif (availables.length === 1) return availables[0];\n\t\t\treturn darkOption < 0 ? 0 : darkOption;\n\t\t}\n\t}\n};\nconst spec2021$1 = new ColorCalculationDelegateImpl2021();\nconst spec2025$1 = new ColorCalculationDelegateImpl2025();\n/**\n* Returns the ColorCalculationDelegate for the given spec version.\n*/\nfunction getSpec$1(specVersion) {\n\treturn specVersion === \"2025\" ? spec2025$1 : spec2021$1;\n}\n/**\n* A convenience class for retrieving colors that are constant in hue and\n* chroma, but vary in tone.\n*/\nvar TonalPalette = class TonalPalette$1 {\n\tcache = /* @__PURE__ */ new Map();\n\t/**\n\t* @param argb ARGB representation of a color\n\t* @return Tones matching that color's hue and chroma.\n\t*/\n\tstatic fromInt(argb) {\n\t\tconst hct = Hct.fromInt(argb);\n\t\treturn TonalPalette$1.fromHct(hct);\n\t}\n\t/**\n\t* @param hct Hct\n\t* @return Tones matching that color's hue and chroma.\n\t*/\n\tstatic fromHct(hct) {\n\t\treturn new TonalPalette$1(hct.hue, hct.chroma, hct);\n\t}\n\t/**\n\t* @param hue HCT hue\n\t* @param chroma HCT chroma\n\t* @return Tones matching hue and chroma.\n\t*/\n\tstatic fromHueAndChroma(hue, chroma) {\n\t\tconst keyColor = new KeyColor(hue, chroma).create();\n\t\treturn new TonalPalette$1(hue, chroma, keyColor);\n\t}\n\tconstructor(hue, chroma, keyColor) {\n\t\tthis.hue = hue;\n\t\tthis.chroma = chroma;\n\t\tthis.keyColor = keyColor;\n\t}\n\t/**\n\t* @param tone HCT tone, measured from 0 to 100.\n\t* @return ARGB representation of a color with that tone.\n\t*/\n\ttone(tone) {\n\t\tlet argb = this.cache.get(tone);\n\t\tif (argb === void 0) {\n\t\t\tif (tone == 99 && Hct.isYellow(this.hue)) argb = this.averageArgb(this.tone(98), this.tone(100));\n\t\t\telse argb = Hct.from(this.hue, this.chroma, tone).toInt();\n\t\t\tthis.cache.set(tone, argb);\n\t\t}\n\t\treturn argb;\n\t}\n\t/**\n\t* @param tone HCT tone.\n\t* @return HCT representation of a color with that tone.\n\t*/\n\tgetHct(tone) {\n\t\treturn Hct.fromInt(this.tone(tone));\n\t}\n\taverageArgb(argb1, argb2) {\n\t\tconst red1 = argb1 >>> 16 & 255;\n\t\tconst green1 = argb1 >>> 8 & 255;\n\t\tconst blue1 = argb1 & 255;\n\t\tconst red2 = argb2 >>> 16 & 255;\n\t\tconst green2 = argb2 >>> 8 & 255;\n\t\tconst blue2 = argb2 & 255;\n\t\tconst red = Math.round((red1 + red2) / 2);\n\t\tconst green = Math.round((green1 + green2) / 2);\n\t\tconst blue = Math.round((blue1 + blue2) / 2);\n\t\treturn (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>> 0;\n\t}\n};\n/**\n* Key color is a color that represents the hue and chroma of a tonal palette\n*/\nvar KeyColor = class {\n\tchromaCache = /* @__PURE__ */ new Map();\n\tmaxChromaValue = 200;\n\tconstructor(hue, requestedChroma) {\n\t\tthis.hue = hue;\n\t\tthis.requestedChroma = requestedChroma;\n\t}\n\t/**\n\t* Creates a key color from a [hue] and a [chroma].\n\t* The key color is the first tone, starting from T50, matching the given hue\n\t* and chroma.\n\t*\n\t* @return Key color [Hct]\n\t*/\n\tcreate() {\n\t\tconst pivotTone = 50;\n\t\tconst toneStepSize = 1;\n\t\tconst epsilon = .01;\n\t\tlet lowerTone = 0;\n\t\tlet upperTone = 100;\n\t\twhile (lowerTone < upperTone) {\n\t\t\tconst midTone = Math.floor((lowerTone + upperTone) / 2);\n\t\t\tconst isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);\n\t\t\tconst sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;\n\t\t\tif (sufficientChroma) if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) upperTone = midTone;\n\t\t\telse {\n\t\t\t\tif (lowerTone === midTone) return Hct.from(this.hue, this.requestedChroma, lowerTone);\n\t\t\t\tlowerTone = midTone;\n\t\t\t}\n\t\t\telse if (isAscending) lowerTone = midTone + toneStepSize;\n\t\t\telse upperTone = midTone;\n\t\t}\n\t\treturn Hct.from(this.hue, this.requestedChroma, lowerTone);\n\t}\n\tmaxChroma(tone) {\n\t\tif (this.chromaCache.has(tone)) return this.chromaCache.get(tone);\n\t\tconst chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;\n\t\tthis.chromaCache.set(tone, chroma);\n\t\treturn chroma;\n\t}\n};\n/**\n* Design utilities using color temperature theory.\n*\n* Analogous colors, complementary color, and cache to efficiently, lazily,\n* generate data for calculations when needed.\n*/\nvar TemperatureCache = class TemperatureCache$1 {\n\tconstructor(input) {\n\t\tthis.input = input;\n\t}\n\thctsByTempCache = [];\n\thctsByHueCache = [];\n\ttempsByHctCache = /* @__PURE__ */ new Map();\n\tinputRelativeTemperatureCache = -1;\n\tcomplementCache = null;\n\tget hctsByTemp() {\n\t\tif (this.hctsByTempCache.length > 0) return this.hctsByTempCache;\n\t\tconst hcts = this.hctsByHue.concat([this.input]);\n\t\tconst temperaturesByHct = this.tempsByHct;\n\t\thcts.sort((a, b) => temperaturesByHct.get(a) - temperaturesByHct.get(b));\n\t\tthis.hctsByTempCache = hcts;\n\t\treturn hcts;\n\t}\n\tget warmest() {\n\t\treturn this.hctsByTemp[this.hctsByTemp.length - 1];\n\t}\n\tget coldest() {\n\t\treturn this.hctsByTemp[0];\n\t}\n\t/**\n\t* A set of colors with differing hues, equidistant in temperature.\n\t*\n\t* In art, this is usually described as a set of 5 colors on a color wheel\n\t* divided into 12 sections. This method allows provision of either of those\n\t* values.\n\t*\n\t* Behavior is undefined when [count] or [divisions] is 0.\n\t* When divisions < count, colors repeat.\n\t*\n\t* [count] The number of colors to return, includes the input color.\n\t* [divisions] The number of divisions on the color wheel.\n\t*/\n\tanalogous(count = 5, divisions = 12) {\n\t\tconst startHue = Math.round(this.input.hue);\n\t\tconst startHct = this.hctsByHue[startHue];\n\t\tlet lastTemp = this.relativeTemperature(startHct);\n\t\tconst allColors = [startHct];\n\t\tlet absoluteTotalTempDelta = 0;\n\t\tfor (let i = 0; i < 360; i++) {\n\t\t\tconst hue = sanitizeDegreesInt(startHue + i);\n\t\t\tconst hct = this.hctsByHue[hue];\n\t\t\tconst temp = this.relativeTemperature(hct);\n\t\t\tconst tempDelta = Math.abs(temp - lastTemp);\n\t\t\tlastTemp = temp;\n\t\t\tabsoluteTotalTempDelta += tempDelta;\n\t\t}\n\t\tlet hueAddend = 1;\n\t\tconst tempStep = absoluteTotalTempDelta / divisions;\n\t\tlet totalTempDelta = 0;\n\t\tlastTemp = this.relativeTemperature(startHct);\n\t\twhile (allColors.length < divisions) {\n\t\t\tconst hue = sanitizeDegreesInt(startHue + hueAddend);\n\t\t\tconst hct = this.hctsByHue[hue];\n\t\t\tconst temp = this.relativeTemperature(hct);\n\t\t\tconst tempDelta = Math.abs(temp - lastTemp);\n\t\t\ttotalTempDelta += tempDelta;\n\t\t\tconst desiredTotalTempDeltaForIndex = allColors.length * tempStep;\n\t\t\tlet indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;\n\t\t\tlet indexAddend = 1;\n\t\t\twhile (indexSatisfied && allColors.length < divisions) {\n\t\t\t\tallColors.push(hct);\n\t\t\t\tconst desiredTotalTempDeltaForIndex$1 = (allColors.length + indexAddend) * tempStep;\n\t\t\t\tindexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex$1;\n\t\t\t\tindexAddend++;\n\t\t\t}\n\t\t\tlastTemp = temp;\n\t\t\thueAddend++;\n\t\t\tif (hueAddend > 360) {\n\t\t\t\twhile (allColors.length < divisions) allColors.push(hct);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst answers = [this.input];\n\t\tconst increaseHueCount = Math.floor((count - 1) / 2);\n\t\tfor (let i = 1; i < increaseHueCount + 1; i++) {\n\t\t\tlet index = 0 - i;\n\t\t\twhile (index < 0) index = allColors.length + index;\n\t\t\tif (index >= allColors.length) index = index % allColors.length;\n\t\t\tanswers.splice(0, 0, allColors[index]);\n\t\t}\n\t\tconst decreaseHueCount = count - increaseHueCount - 1;\n\t\tfor (let i = 1; i < decreaseHueCount + 1; i++) {\n\t\t\tlet index = i;\n\t\t\twhile (index < 0) index = allColors.length + index;\n\t\t\tif (index >= allColors.length) index = index % allColors.length;\n\t\t\tanswers.push(allColors[index]);\n\t\t}\n\t\treturn answers;\n\t}\n\t/**\n\t* A color that complements the input color aesthetically.\n\t*\n\t* In art, this is usually described as being across the color wheel.\n\t* History of this shows intent as a color that is just as cool-warm as the\n\t* input color is warm-cool.\n\t*/\n\tget complement() {\n\t\tif (this.complementCache != null) return this.complementCache;\n\t\tconst coldestHue = this.coldest.hue;\n\t\tconst coldestTemp = this.tempsByHct.get(this.coldest);\n\t\tconst warmestHue = this.warmest.hue;\n\t\tconst warmestTemp = this.tempsByHct.get(this.warmest);\n\t\tconst range = warmestTemp - coldestTemp;\n\t\tconst startHueIsColdestToWarmest = TemperatureCache$1.isBetween(this.input.hue, coldestHue, warmestHue);\n\t\tconst startHue = startHueIsColdestToWarmest ? warmestHue : coldestHue;\n\t\tconst endHue = startHueIsColdestToWarmest ? coldestHue : warmestHue;\n\t\tconst directionOfRotation = 1;\n\t\tlet smallestError = 1e3;\n\t\tlet answer = this.hctsByHue[Math.round(this.input.hue)];\n\t\tconst complementRelativeTemp = 1 - this.inputRelativeTemperature;\n\t\tfor (let hueAddend = 0; hueAddend <= 360; hueAddend += 1) {\n\t\t\tconst hue = sanitizeDegreesDouble(startHue + directionOfRotation * hueAddend);\n\t\t\tif (!TemperatureCache$1.isBetween(hue, startHue, endHue)) continue;\n\t\t\tconst possibleAnswer = this.hctsByHue[Math.round(hue)];\n\t\t\tconst relativeTemp = (this.tempsByHct.get(possibleAnswer) - coldestTemp) / range;\n\t\t\tconst error = Math.abs(complementRelativeTemp - relativeTemp);\n\t\t\tif (error < smallestError) {\n\t\t\t\tsmallestError = error;\n\t\t\t\tanswer = possibleAnswer;\n\t\t\t}\n\t\t}\n\t\tthis.complementCache = answer;\n\t\treturn this.complementCache;\n\t}\n\t/**\n\t* Temperature relative to all colors with the same chroma and tone.\n\t* Value on a scale from 0 to 1.\n\t*/\n\trelativeTemperature(hct) {\n\t\tconst range = this.tempsByHct.get(this.warmest) - this.tempsByHct.get(this.coldest);\n\t\tconst differenceFromColdest = this.tempsByHct.get(hct) - this.tempsByHct.get(this.coldest);\n\t\tif (range === 0) return .5;\n\t\treturn differenceFromColdest / range;\n\t}\n\t/** Relative temperature of the input color. See [relativeTemperature]. */\n\tget inputRelativeTemperature() {\n\t\tif (this.inputRelativeTemperatureCache >= 0) return this.inputRelativeTemperatureCache;\n\t\tthis.inputRelativeTemperatureCache = this.relativeTemperature(this.input);\n\t\treturn this.inputRelativeTemperatureCache;\n\t}\n\t/** A Map with keys of HCTs in [hctsByTemp], values of raw temperature. */\n\tget tempsByHct() {\n\t\tif (this.tempsByHctCache.size > 0) return this.tempsByHctCache;\n\t\tconst allHcts = this.hctsByHue.concat([this.input]);\n\t\tconst temperaturesByHct = /* @__PURE__ */ new Map();\n\t\tfor (const e of allHcts) temperaturesByHct.set(e, TemperatureCache$1.rawTemperature(e));\n\t\tthis.tempsByHctCache = temperaturesByHct;\n\t\treturn temperaturesByHct;\n\t}\n\t/**\n\t* HCTs for all hues, with the same chroma/tone as the input.\n\t* Sorted ascending, hue 0 to 360.\n\t*/\n\tget hctsByHue() {\n\t\tif (this.hctsByHueCache.length > 0) return this.hctsByHueCache;\n\t\tconst hcts = [];\n\t\tfor (let hue = 0; hue <= 360; hue += 1) {\n\t\t\tconst colorAtHue = Hct.from(hue, this.input.chroma, this.input.tone);\n\t\t\thcts.push(colorAtHue);\n\t\t}\n\t\tthis.hctsByHueCache = hcts;\n\t\treturn this.hctsByHueCache;\n\t}\n\t/** Determines if an angle is between two other angles, rotating clockwise. */\n\tstatic isBetween(angle, a, b) {\n\t\tif (a < b) return a <= angle && angle <= b;\n\t\treturn a <= angle || angle <= b;\n\t}\n\t/**\n\t* Value representing cool-warm factor of a color.\n\t* Values below 0 are considered cool, above, warm.\n\t*\n\t* Color science has researched emotion and harmony, which art uses to select\n\t* colors. Warm-cool is the foundation of analogous and complementary colors.\n\t* See:\n\t* - Li-Chen Ou's Chapter 19 in Handbook of Color Psychology (2015).\n\t* - Josef Albers' Interaction of Color chapters 19 and 21.\n\t*\n\t* Implementation of Ou, Woodcock and Wright's algorithm, which uses\n\t* L*a*b* / LCH color space.\n\t* Return value has these properties:\n\t* - Values below 0 are cool, above 0 are warm.\n\t* - Lower bound: -0.52 - (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n\t* Assuming max of 130 chroma, -9.66.\n\t* - Upper bound: -0.52 + (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n\t* Assuming max of 130 chroma, 8.61.\n\t*/\n\tstatic rawTemperature(color) {\n\t\tconst lab = labFromArgb(color.toInt());\n\t\tconst hue = sanitizeDegreesDouble(Math.atan2(lab[2], lab[1]) * 180 / Math.PI);\n\t\tconst chroma = Math.sqrt(lab[1] * lab[1] + lab[2] * lab[2]);\n\t\tconst temperature = -.5 + .02 * Math.pow(chroma, 1.07) * Math.cos(sanitizeDegreesDouble(hue - 50) * Math.PI / 180);\n\t\treturn temperature;\n\t}\n};\n/**\n* Documents a constraint between two DynamicColors, in which their tones must\n* have a certain distance from each other.\n*\n* Prefer a DynamicColor with a background, this is for special cases when\n* designers want tonal distance, literally contrast, between two colors that\n* don't have a background / foreground relationship or a contrast guarantee.\n*/\nvar ToneDeltaPair = class {\n\t/**\n\t* Documents a constraint in tone distance between two DynamicColors.\n\t*\n\t* The polarity is an adjective that describes \"A\", compared to \"B\".\n\t*\n\t* For instance, ToneDeltaPair(A, B, 15, 'darker', 'exact') states that\n\t* A's tone should be exactly 15 darker than B's.\n\t*\n\t* 'relative_darker' and 'relative_lighter' describes the tone adjustment\n\t* relative to the surface color trend (white in light mode; black in dark\n\t* mode). For instance, ToneDeltaPair(A, B, 10, 'relative_lighter',\n\t* 'farther') states that A should be at least 10 lighter than B in light\n\t* mode, and at least 10 darker than B in dark mode.\n\t*\n\t* @param roleA The first role in a pair.\n\t* @param roleB The second role in a pair.\n\t* @param delta Required difference between tones. Absolute value, negative\n\t* values have undefined behavior.\n\t* @param polarity The relative relation between tones of roleA and roleB,\n\t* as described above.\n\t* @param constraint How to fulfill the tone delta pair constraint.\n\t* @param stayTogether Whether these two roles should stay on the same side\n\t* of the \"awkward zone\" (T50-59). This is necessary for certain cases where\n\t* one role has two backgrounds.\n\t*/\n\tconstructor(roleA, roleB, delta, polarity, stayTogether, constraint) {\n\t\tthis.roleA = roleA;\n\t\tthis.roleB = roleB;\n\t\tthis.delta = delta;\n\t\tthis.polarity = polarity;\n\t\tthis.stayTogether = stayTogether;\n\t\tthis.constraint = constraint;\n\t\tthis.constraint = constraint ?? \"exact\";\n\t}\n};\n/**\n* @license\n* Copyright 2022 Google LLC\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n* Set of themes supported by Dynamic Color.\n* Instantiate the corresponding subclass, ex. SchemeTonalSpot, to create\n* colors corresponding to the theme.\n*/\nlet Variant = /* @__PURE__ */ function(Variant$1) {\n\tVariant$1[Variant$1[\"MONOCHROME\"] = 0] = \"MONOCHROME\";\n\tVariant$1[Variant$1[\"NEUTRAL\"] = 1] = \"NEUTRAL\";\n\tVariant$1[Variant$1[\"TONAL_SPOT\"] = 2] = \"TONAL_SPOT\";\n\tVariant$1[Variant$1[\"VIBRANT\"] = 3] = \"VIBRANT\";\n\tVariant$1[Variant$1[\"EXPRESSIVE\"] = 4] = \"EXPRESSIVE\";\n\tVariant$1[Variant$1[\"FIDELITY\"] = 5] = \"FIDELITY\";\n\tVariant$1[Variant$1[\"CONTENT\"] = 6] = \"CONTENT\";\n\tVariant$1[Variant$1[\"RAINBOW\"] = 7] = \"RAINBOW\";\n\tVariant$1[Variant$1[\"FRUIT_SALAD\"] = 8] = \"FRUIT_SALAD\";\n\treturn Variant$1;\n}({});\n/**\n* Returns true if the scheme is Fidelity or Content.\n*/\nfunction isFidelity(scheme) {\n\treturn scheme.variant === Variant.FIDELITY || scheme.variant === Variant.CONTENT;\n}\n/**\n* Returns true if the scheme is Monochrome.\n*/\nfunction isMonochrome(scheme) {\n\treturn scheme.variant === Variant.MONOCHROME;\n}\n/**\n* Returns the desired chroma for a given tone at a specific hue.\n*\n* @param hue The given hue.\n* @param chroma The target chroma.\n* @param tone The tone to start with.\n* @param byDecreasingTone Whether to search for lower tones.\n*/\nfunction findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {\n\tlet answer = tone;\n\tlet closestToChroma = Hct.from(hue, chroma, tone);\n\tif (closestToChroma.chroma < chroma) {\n\t\tlet chromaPeak = closestToChroma.chroma;\n\t\twhile (closestToChroma.chroma < chroma) {\n\t\t\tanswer += byDecreasingTone ? -1 : 1;\n\t\t\tconst potentialSolution = Hct.from(hue, chroma, answer);\n\t\t\tif (chromaPeak > potentialSolution.chroma) break;\n\t\t\tif (Math.abs(potentialSolution.chroma - chroma) < .4) break;\n\t\t\tconst potentialDelta = Math.abs(potentialSolution.chroma - chroma);\n\t\t\tconst currentDelta = Math.abs(closestToChroma.chroma - chroma);\n\t\t\tif (potentialDelta < currentDelta) closestToChroma = potentialSolution;\n\t\t\tchromaPeak = Math.max(chromaPeak, potentialSolution.chroma);\n\t\t}\n\t}\n\treturn answer;\n}\n/**\n* A delegate for the dynamic color spec of a DynamicScheme in the 2021 spec.\n*/\nvar ColorSpecDelegateImpl2021 = class {\n\tprimaryPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary_palette_key_color\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => s.primaryPalette.keyColor.tone\n\t\t});\n\t}\n\tsecondaryPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary_palette_key_color\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => s.secondaryPalette.keyColor.tone\n\t\t});\n\t}\n\ttertiaryPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_palette_key_color\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => s.tertiaryPalette.keyColor.tone\n\t\t});\n\t}\n\tneutralPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"neutral_palette_key_color\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.neutralPalette.keyColor.tone\n\t\t});\n\t}\n\tneutralVariantPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"neutral_variant_palette_key_color\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.neutralVariantPalette.keyColor.tone\n\t\t});\n\t}\n\terrorPaletteKeyColor() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"error_palette_key_color\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => s.errorPalette.keyColor.tone\n\t\t});\n\t}\n\tbackground() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"background\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 6 : 98,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tonBackground() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_background\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 90 : 10,\n\t\t\tbackground: (s) => this.background(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 3, 4.5, 7)\n\t\t});\n\t}\n\tsurface() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 6 : 98,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_dim\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 6 : new ContrastCurve(87, 87, 80, 75).get(s.contrastLevel),\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceBright() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_bright\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(24, 24, 29, 34).get(s.contrastLevel) : 98,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceContainerLowest() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_lowest\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(4, 4, 2, 0).get(s.contrastLevel) : 100,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceContainerLow() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_low\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(10, 10, 11, 12).get(s.contrastLevel) : new ContrastCurve(96, 96, 96, 95).get(s.contrastLevel),\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_container\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(12, 12, 16, 20).get(s.contrastLevel) : new ContrastCurve(94, 94, 92, 90).get(s.contrastLevel),\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceContainerHigh() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_high\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(17, 17, 21, 25).get(s.contrastLevel) : new ContrastCurve(92, 92, 88, 85).get(s.contrastLevel),\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tsurfaceContainerHighest() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_highest\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? new ContrastCurve(22, 22, 26, 30).get(s.contrastLevel) : new ContrastCurve(90, 90, 84, 80).get(s.contrastLevel),\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tonSurface() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 90 : 10,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tsurfaceVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_variant\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 30 : 90,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tonSurfaceVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_surface_variant\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 80 : 30,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\tinverseSurface() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"inverse_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 90 : 20,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tinverseOnSurface() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"inverse_on_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 20 : 95,\n\t\t\tbackground: (s) => this.inverseSurface(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\toutline() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"outline\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 60 : 50,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1.5, 3, 4.5, 7)\n\t\t});\n\t}\n\toutlineVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"outline_variant\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 30 : 80,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5)\n\t\t});\n\t}\n\tshadow() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"shadow\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => 0\n\t\t});\n\t}\n\tscrim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"scrim\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => 0\n\t\t});\n\t}\n\tsurfaceTint() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"surface_tint\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => s.isDark ? 80 : 40,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tprimary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 100 : 0;\n\t\t\t\treturn s.isDark ? 80 : 40;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tprimaryDim() {\n\t\treturn void 0;\n\t}\n\tonPrimary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 10 : 90;\n\t\t\t\treturn s.isDark ? 20 : 100;\n\t\t\t},\n\t\t\tbackground: (s) => this.primary(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tprimaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary_container\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isFidelity(s)) return s.sourceColorHct.tone;\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 85 : 25;\n\t\t\t\treturn s.isDark ? 30 : 90;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tonPrimaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_container\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isFidelity(s)) return DynamicColor.foregroundTone(this.primaryContainer().tone(s), 4.5);\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 0 : 100;\n\t\t\t\treturn s.isDark ? 90 : 30;\n\t\t\t},\n\t\t\tbackground: (s) => this.primaryContainer(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\tinversePrimary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"inverse_primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => s.isDark ? 40 : 80,\n\t\t\tbackground: (s) => this.inverseSurface(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7)\n\t\t});\n\t}\n\tsecondary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => s.isDark ? 80 : 40,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tsecondaryDim() {\n\t\treturn void 0;\n\t}\n\tonSecondary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 10 : 100;\n\t\t\t\telse return s.isDark ? 20 : 100;\n\t\t\t},\n\t\t\tbackground: (s) => this.secondary(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tsecondaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary_container\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tconst initialTone = s.isDark ? 30 : 90;\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 30 : 85;\n\t\t\t\tif (!isFidelity(s)) return initialTone;\n\t\t\t\treturn findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tonSecondaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_container\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 90 : 10;\n\t\t\t\tif (!isFidelity(s)) return s.isDark ? 90 : 30;\n\t\t\t\treturn DynamicColor.foregroundTone(this.secondaryContainer().tone(s), 4.5);\n\t\t\t},\n\t\t\tbackground: (s) => this.secondaryContainer(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\ttertiary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 90 : 25;\n\t\t\t\treturn s.isDark ? 80 : 40;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\ttertiaryDim() {\n\t\treturn void 0;\n\t}\n\tonTertiary() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 10 : 90;\n\t\t\t\treturn s.isDark ? 20 : 100;\n\t\t\t},\n\t\t\tbackground: (s) => this.tertiary(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\ttertiaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_container\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 60 : 49;\n\t\t\t\tif (!isFidelity(s)) return s.isDark ? 30 : 90;\n\t\t\t\tconst proposedHct = s.tertiaryPalette.getHct(s.sourceColorHct.tone);\n\t\t\t\treturn DislikeAnalyzer.fixIfDisliked(proposedHct).tone;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tonTertiaryContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_container\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 0 : 100;\n\t\t\t\tif (!isFidelity(s)) return s.isDark ? 90 : 30;\n\t\t\t\treturn DynamicColor.foregroundTone(this.tertiaryContainer().tone(s), 4.5);\n\t\t\t},\n\t\t\tbackground: (s) => this.tertiaryContainer(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\terror() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"error\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => s.isDark ? 80 : 40,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, \"nearer\", false)\n\t\t});\n\t}\n\terrorDim() {\n\t\treturn void 0;\n\t}\n\tonError() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_error\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => s.isDark ? 20 : 100,\n\t\t\tbackground: (s) => this.error(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\terrorContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"error_container\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => s.isDark ? 30 : 90,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, \"nearer\", false)\n\t\t});\n\t}\n\tonErrorContainer() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_error_container\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (isMonochrome(s)) return s.isDark ? 90 : 10;\n\t\t\t\treturn s.isDark ? 90 : 30;\n\t\t\t},\n\t\t\tbackground: (s) => this.errorContainer(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\tprimaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary_fixed\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 40 : 90,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\tprimaryFixedDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary_fixed_dim\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 30 : 80,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\tonPrimaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_fixed\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 100 : 10,\n\t\t\tbackground: (s) => this.primaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.primaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tonPrimaryFixedVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_fixed_variant\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 90 : 30,\n\t\t\tbackground: (s) => this.primaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.primaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\tsecondaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary_fixed\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 80 : 90,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\tsecondaryFixedDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary_fixed_dim\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 70 : 80,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\tonSecondaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_fixed\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => 10,\n\t\t\tbackground: (s) => this.secondaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.secondaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tonSecondaryFixedVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_fixed_variant\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 25 : 30,\n\t\t\tbackground: (s) => this.secondaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.secondaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\ttertiaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_fixed\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 40 : 90,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\ttertiaryFixedDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_fixed_dim\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 30 : 80,\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.highestSurface(s),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, \"lighter\", true)\n\t\t});\n\t}\n\tonTertiaryFixed() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_fixed\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 100 : 10,\n\t\t\tbackground: (s) => this.tertiaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.tertiaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21)\n\t\t});\n\t}\n\tonTertiaryFixedVariant() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_fixed_variant\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => isMonochrome(s) ? 90 : 30,\n\t\t\tbackground: (s) => this.tertiaryFixedDim(),\n\t\t\tsecondBackground: (s) => this.tertiaryFixed(),\n\t\t\tcontrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11)\n\t\t});\n\t}\n\tcontrolActivated() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"control_activated\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => s.isDark ? 30 : 90,\n\t\t\tisBackground: true\n\t\t});\n\t}\n\tcontrolNormal() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"control_normal\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 80 : 30\n\t\t});\n\t}\n\tcontrolHighlight() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"control_highlight\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 100 : 0,\n\t\t\topacity: (s) => s.isDark ? .2 : .12\n\t\t});\n\t}\n\ttextPrimaryInverse() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"text_primary_inverse\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 10 : 90\n\t\t});\n\t}\n\ttextSecondaryAndTertiaryInverse() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"text_secondary_and_tertiary_inverse\",\n\t\t\tpalette: (s) => s.neutralVariantPalette,\n\t\t\ttone: (s) => s.isDark ? 30 : 80\n\t\t});\n\t}\n\ttextPrimaryInverseDisableOnly() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"text_primary_inverse_disable_only\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.inverseOnSurface ? 10 : 90\n\t\t});\n\t}\n\ttextSecondaryAndTertiaryInverseDisabled() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"text_secondary_and_tertiary_inverse_disabled\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 10 : 90\n\t\t});\n\t}\n\ttextHintInverse() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"text_hint_inverse\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 10 : 90\n\t\t});\n\t}\n\thighestSurface(s) {\n\t\treturn s.isDark ? this.surfaceBright() : this.surfaceDim();\n\t}\n};\nlet SpecVersion = /* @__PURE__ */ function(SpecVersion$1) {\n\tSpecVersion$1[\"SPEC_2021\"] = \"2021\";\n\tSpecVersion$1[\"SPEC_2025\"] = \"2025\";\n\treturn SpecVersion$1;\n}({});\n/**\n* The platform on which this scheme is intended to be used. Only used in the\n* 2025 spec.\n*/\nlet Platform = /* @__PURE__ */ function(Platform$1) {\n\tPlatform$1[Platform$1[\"PHONE\"] = 0] = \"PHONE\";\n\tPlatform$1[Platform$1[\"WATCH\"] = 1] = \"WATCH\";\n\treturn Platform$1;\n}({});\n/**\n* Returns the maximum tone for a given chroma in the palette.\n*\n* @param palette The tonal palette to use.\n* @param lowerBound The lower bound of the tone.\n* @param upperBound The upper bound of the tone.\n*/\nfunction tMaxC(palette, lowerBound = 0, upperBound = 100, chromaMultiplier = 1) {\n\tlet answer = findBestToneForChroma(palette.hue, palette.chroma * chromaMultiplier, 100, true);\n\treturn clampDouble(lowerBound, upperBound, answer);\n}\n/**\n* Returns the minimum tone for a given chroma in the palette.\n*\n* @param palette The tonal palette to use.\n* @param lowerBound The lower bound of the tone.\n* @param upperBound The upper bound of the tone.\n*/\nfunction tMinC(palette, lowerBound = 0, upperBound = 100) {\n\tlet answer = findBestToneForChroma(palette.hue, palette.chroma, 0, false);\n\treturn clampDouble(lowerBound, upperBound, answer);\n}\n/**\n* Searches for the best tone with a given chroma from a given tone at a\n* specific hue.\n*\n* @param hue The given hue.\n* @param chroma The target chroma.\n* @param tone The tone to start with.\n* @param byDecreasingTone Whether to search for lower tones.\n*/\nfunction findBestToneForChroma(hue, chroma, tone, byDecreasingTone) {\n\tlet answer = tone;\n\tlet bestCandidate = Hct.from(hue, chroma, answer);\n\twhile (bestCandidate.chroma < chroma) {\n\t\tif (tone < 0 || tone > 100) break;\n\t\ttone += byDecreasingTone ? -1 : 1;\n\t\tconst newCandidate = Hct.from(hue, chroma, tone);\n\t\tif (bestCandidate.chroma < newCandidate.chroma) {\n\t\t\tbestCandidate = newCandidate;\n\t\t\tanswer = tone;\n\t\t}\n\t}\n\treturn answer;\n}\n/**\n* Returns the contrast curve for a given default contrast.\n*\n* @param defaultContrast The default contrast to use.\n*/\nfunction getCurve(defaultContrast) {\n\tif (defaultContrast === 1.5) return new ContrastCurve(1.5, 1.5, 3, 4.5);\n\telse if (defaultContrast === 3) return new ContrastCurve(3, 3, 4.5, 7);\n\telse if (defaultContrast === 4.5) return new ContrastCurve(4.5, 4.5, 7, 11);\n\telse if (defaultContrast === 6) return new ContrastCurve(6, 6, 7, 11);\n\telse if (defaultContrast === 7) return new ContrastCurve(7, 7, 11, 21);\n\telse if (defaultContrast === 9) return new ContrastCurve(9, 9, 11, 21);\n\telse if (defaultContrast === 11) return new ContrastCurve(11, 11, 21, 21);\n\telse if (defaultContrast === 21) return new ContrastCurve(21, 21, 21, 21);\n\telse return new ContrastCurve(defaultContrast, defaultContrast, 7, 21);\n}\n/**\n* A delegate for the dynamic color spec of a DynamicScheme in the 2025 spec.\n*/\nvar ColorSpecDelegateImpl2025 = class extends ColorSpecDelegateImpl2021 {\n\tsurface() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tsuper.surface().tone(s);\n\t\t\t\tif (s.platform === Platform.PHONE) if (s.isDark) return 4;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 99;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 97;\n\t\t\t\telse return 98;\n\t\t\t\telse return 0;\n\t\t\t},\n\t\t\tisBackground: true\n\t\t});\n\t\treturn extendSpecVersion(super.surface(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceDim() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_dim\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.isDark) return 4;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 90;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 85;\n\t\t\t\telse return 87;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (!s.isDark) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.5;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n\t\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.36;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceDim(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceBright() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_bright\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.isDark) return 18;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 99;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 97;\n\t\t\t\telse return 98;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.isDark) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.5;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n\t\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.36;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceBright(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceContainerLowest() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_lowest\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 0 : 100,\n\t\t\tisBackground: true\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceContainerLowest(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceContainerLow() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_low\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) if (s.isDark) return 6;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 98;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 95;\n\t\t\t\telse return 96;\n\t\t\t\telse return 15;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 1.3;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.25;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 1.3 : 1.15;\n\t\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.08;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceContainerLow(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_container\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) if (s.isDark) return 9;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 96;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 92;\n\t\t\t\telse return 94;\n\t\t\t\telse return 20;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 1.6;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.4;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 1.6 : 1.3;\n\t\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.15;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceContainerHigh() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_high\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) if (s.isDark) return 12;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 94;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 90;\n\t\t\t\telse return 92;\n\t\t\t\telse return 25;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 1.9;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.5;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 1.95 : 1.45;\n\t\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.22;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceContainerHigh(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceContainerHighest() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"surface_container_highest\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.isDark) return 15;\n\t\t\t\telse if (Hct.isYellow(s.neutralPalette.hue)) return 92;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 88;\n\t\t\t\telse return 90;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.2;\n\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? 2.3 : 1.6;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return 1.29;\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.surfaceContainerHighest(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonSurface() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.variant === Variant.VIBRANT) return tMaxC(s.neutralPalette, 0, 100, 1.1);\n\t\t\t\telse return DynamicColor.getInitialToneFromBackground((s$1) => s$1.platform === Platform.PHONE ? this.highestSurface(s$1) : this.surfaceContainerHigh())(s);\n\t\t\t},\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.2;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? s.isDark ? 3 : 2.3 : 1.6;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.isDark ? getCurve(11) : getCurve(9)\n\t\t});\n\t\treturn extendSpecVersion(super.onSurface(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonSurfaceVariant() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_surface_variant\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.2;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? s.isDark ? 3 : 2.3 : 1.6;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? s.isDark ? getCurve(6) : getCurve(4.5) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onSurfaceVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\toutline() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"outline\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.2;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? s.isDark ? 3 : 2.3 : 1.6;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(3) : getCurve(4.5)\n\t\t});\n\t\treturn extendSpecVersion(super.outline(), SpecVersion.SPEC_2025, color2025);\n\t}\n\toutlineVariant() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"outline_variant\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\tchromaMultiplier: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) {\n\t\t\t\t\tif (s.variant === Variant.NEUTRAL) return 2.2;\n\t\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return 1.7;\n\t\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return Hct.isYellow(s.neutralPalette.hue) ? s.isDark ? 3 : 2.3 : 1.6;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t},\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(1.5) : getCurve(3)\n\t\t});\n\t\treturn extendSpecVersion(super.outlineVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tinverseSurface() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"inverse_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\ttone: (s) => s.isDark ? 98 : 4,\n\t\t\tisBackground: true\n\t\t});\n\t\treturn extendSpecVersion(super.inverseSurface(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tinverseOnSurface() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"inverse_on_surface\",\n\t\t\tpalette: (s) => s.neutralPalette,\n\t\t\tbackground: (s) => this.inverseSurface(),\n\t\t\tcontrastCurve: (s) => getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.inverseOnSurface(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tprimary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.variant === Variant.NEUTRAL) if (s.platform === Platform.PHONE) return s.isDark ? 80 : 40;\n\t\t\t\telse return 90;\n\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) if (s.platform === Platform.PHONE) if (s.isDark) return 80;\n\t\t\t\telse return tMaxC(s.primaryPalette);\n\t\t\t\telse return tMaxC(s.primaryPalette, 0, 90);\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return tMaxC(s.primaryPalette, 0, Hct.isYellow(s.primaryPalette.hue) ? 25 : Hct.isCyan(s.primaryPalette.hue) ? 88 : 98);\n\t\t\t\telse return tMaxC(s.primaryPalette, 0, Hct.isCyan(s.primaryPalette.hue) ? 88 : 98);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(4.5) : getCurve(7),\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.PHONE ? new ToneDeltaPair(this.primaryContainer(), this.primary(), 5, \"relative_lighter\", true, \"farther\") : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.primary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tprimaryDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"primary_dim\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.variant === Variant.NEUTRAL) return 85;\n\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return tMaxC(s.primaryPalette, 0, 90);\n\t\t\t\telse return tMaxC(s.primaryPalette);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryDim(), this.primary(), 5, \"darker\", true, \"farther\")\n\t\t});\n\t}\n\tonPrimary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.primary() : this.primaryDim(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onPrimary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tprimaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"primary_container\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return 30;\n\t\t\t\telse if (s.variant === Variant.NEUTRAL) return s.isDark ? 30 : 90;\n\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return s.isDark ? tMinC(s.primaryPalette, 35, 93) : tMaxC(s.primaryPalette, 0, 90);\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return s.isDark ? tMaxC(s.primaryPalette, 30, 93) : tMaxC(s.primaryPalette, 78, Hct.isCyan(s.primaryPalette.hue) ? 88 : 90);\n\t\t\t\telse return s.isDark ? tMinC(s.primaryPalette, 66, 93) : tMaxC(s.primaryPalette, 66, Hct.isCyan(s.primaryPalette.hue) ? 88 : 93);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.PHONE ? void 0 : new ToneDeltaPair(this.primaryContainer(), this.primaryDim(), 10, \"darker\", true, \"farther\"),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.primaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonPrimaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_container\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\tbackground: (s) => this.primaryContainer(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onPrimaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tprimaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"primary_fixed\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tlet tempS = Object.assign({}, s, {\n\t\t\t\t\tisDark: false,\n\t\t\t\t\tcontrastLevel: 0\n\t\t\t\t});\n\t\t\t\treturn this.primaryContainer().getTone(tempS);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.primaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tprimaryFixedDim() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"primary_fixed_dim\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => this.primaryFixed().getTone(s),\n\t\t\tisBackground: true,\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixedDim(), this.primaryFixed(), 5, \"darker\", true, \"exact\")\n\t\t});\n\t\treturn extendSpecVersion(super.primaryFixedDim(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonPrimaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_fixed\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\tbackground: (s) => this.primaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onPrimaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonPrimaryFixedVariant() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_primary_fixed_variant\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\tbackground: (s) => this.primaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5)\n\t\t});\n\t\treturn extendSpecVersion(super.onPrimaryFixedVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tinversePrimary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"inverse_primary\",\n\t\t\tpalette: (s) => s.primaryPalette,\n\t\t\ttone: (s) => tMaxC(s.primaryPalette),\n\t\t\tbackground: (s) => this.inverseSurface(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.inversePrimary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsecondary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"secondary\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return s.variant === Variant.NEUTRAL ? 90 : tMaxC(s.secondaryPalette, 0, 90);\n\t\t\t\telse if (s.variant === Variant.NEUTRAL) return s.isDark ? tMinC(s.secondaryPalette, 0, 98) : tMaxC(s.secondaryPalette);\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return tMaxC(s.secondaryPalette, 0, s.isDark ? 90 : 98);\n\t\t\t\telse return s.isDark ? 80 : tMaxC(s.secondaryPalette);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(4.5) : getCurve(7),\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.PHONE ? new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 5, \"relative_lighter\", true, \"farther\") : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.secondary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsecondaryDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"secondary_dim\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.variant === Variant.NEUTRAL) return 85;\n\t\t\t\telse return tMaxC(s.secondaryPalette, 0, 90);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryDim(), this.secondary(), 5, \"darker\", true, \"farther\")\n\t\t});\n\t}\n\tonSecondary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.secondary() : this.secondaryDim(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onSecondary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsecondaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"secondary_container\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return 30;\n\t\t\t\telse if (s.variant === Variant.VIBRANT) return s.isDark ? tMinC(s.secondaryPalette, 30, 40) : tMaxC(s.secondaryPalette, 84, 90);\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return s.isDark ? 15 : tMaxC(s.secondaryPalette, 90, 95);\n\t\t\t\telse return s.isDark ? 25 : 90;\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.WATCH ? new ToneDeltaPair(this.secondaryContainer(), this.secondaryDim(), 10, \"darker\", true, \"farther\") : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.secondaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonSecondaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_container\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\tbackground: (s) => this.secondaryContainer(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onSecondaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsecondaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"secondary_fixed\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tlet tempS = Object.assign({}, s, {\n\t\t\t\t\tisDark: false,\n\t\t\t\t\tcontrastLevel: 0\n\t\t\t\t});\n\t\t\t\treturn this.secondaryContainer().getTone(tempS);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.secondaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsecondaryFixedDim() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"secondary_fixed_dim\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\ttone: (s) => this.secondaryFixed().getTone(s),\n\t\t\tisBackground: true,\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixedDim(), this.secondaryFixed(), 5, \"darker\", true, \"exact\")\n\t\t});\n\t\treturn extendSpecVersion(super.secondaryFixedDim(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonSecondaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_fixed\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\tbackground: (s) => this.secondaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onSecondaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonSecondaryFixedVariant() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_secondary_fixed_variant\",\n\t\t\tpalette: (s) => s.secondaryPalette,\n\t\t\tbackground: (s) => this.secondaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5)\n\t\t});\n\t\treturn extendSpecVersion(super.onSecondaryFixedVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttertiary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"tertiary\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return s.variant === Variant.TONAL_SPOT ? tMaxC(s.tertiaryPalette, 0, 90) : tMaxC(s.tertiaryPalette);\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE || s.variant === Variant.VIBRANT) return tMaxC(s.tertiaryPalette, 0, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : s.isDark ? 98 : 100);\n\t\t\t\telse return s.isDark ? tMaxC(s.tertiaryPalette, 0, 98) : tMaxC(s.tertiaryPalette);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(4.5) : getCurve(7),\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.PHONE ? new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 5, \"relative_lighter\", true, \"farther\") : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.tertiary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttertiaryDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_dim\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.variant === Variant.TONAL_SPOT) return tMaxC(s.tertiaryPalette, 0, 90);\n\t\t\t\telse return tMaxC(s.tertiaryPalette);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryDim(), this.tertiary(), 5, \"darker\", true, \"farther\")\n\t\t});\n\t}\n\tonTertiary() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.tertiary() : this.tertiaryDim(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onTertiary(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttertiaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_container\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return s.variant === Variant.TONAL_SPOT ? tMaxC(s.tertiaryPalette, 0, 90) : tMaxC(s.tertiaryPalette);\n\t\t\t\telse if (s.variant === Variant.NEUTRAL) return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) : tMaxC(s.tertiaryPalette, 0, 96);\n\t\t\t\telse if (s.variant === Variant.TONAL_SPOT) return tMaxC(s.tertiaryPalette, 0, s.isDark ? 93 : 100);\n\t\t\t\telse if (s.variant === Variant.EXPRESSIVE) return tMaxC(s.tertiaryPalette, 75, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : s.isDark ? 93 : 100);\n\t\t\t\telse return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) : tMaxC(s.tertiaryPalette, 72, 100);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.WATCH ? new ToneDeltaPair(this.tertiaryContainer(), this.tertiaryDim(), 10, \"darker\", true, \"farther\") : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.tertiaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonTertiaryContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_container\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\tbackground: (s) => this.tertiaryContainer(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onTertiaryContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttertiaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_fixed\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tlet tempS = Object.assign({}, s, {\n\t\t\t\t\tisDark: false,\n\t\t\t\t\tcontrastLevel: 0\n\t\t\t\t});\n\t\t\t\treturn this.tertiaryContainer().getTone(tempS);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.tertiaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttertiaryFixedDim() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"tertiary_fixed_dim\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\ttone: (s) => this.tertiaryFixed().getTone(s),\n\t\t\tisBackground: true,\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, \"darker\", true, \"exact\")\n\t\t});\n\t\treturn extendSpecVersion(super.tertiaryFixedDim(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonTertiaryFixed() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_fixed\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\tbackground: (s) => this.tertiaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onTertiaryFixed(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonTertiaryFixedVariant() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_tertiary_fixed_variant\",\n\t\t\tpalette: (s) => s.tertiaryPalette,\n\t\t\tbackground: (s) => this.tertiaryFixedDim(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5)\n\t\t});\n\t\treturn extendSpecVersion(super.onTertiaryFixedVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\terror() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"error\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.PHONE) return s.isDark ? tMinC(s.errorPalette, 0, 98) : tMaxC(s.errorPalette);\n\t\t\t\telse return tMinC(s.errorPalette);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(4.5) : getCurve(7),\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.PHONE ? new ToneDeltaPair(this.errorContainer(), this.error(), 5, \"relative_lighter\", true, \"farther\") : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.error(), SpecVersion.SPEC_2025, color2025);\n\t}\n\terrorDim() {\n\t\treturn DynamicColor.fromPalette({\n\t\t\tname: \"error_dim\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => tMinC(s.errorPalette),\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => this.surfaceContainerHigh(),\n\t\t\tcontrastCurve: (s) => getCurve(4.5),\n\t\t\ttoneDeltaPair: (s) => new ToneDeltaPair(this.errorDim(), this.error(), 5, \"darker\", true, \"farther\")\n\t\t});\n\t}\n\tonError() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_error\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.error() : this.errorDim(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(6) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onError(), SpecVersion.SPEC_2025, color2025);\n\t}\n\terrorContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"error_container\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\ttone: (s) => {\n\t\t\t\tif (s.platform === Platform.WATCH) return 30;\n\t\t\t\telse return s.isDark ? tMinC(s.errorPalette, 30, 93) : tMaxC(s.errorPalette, 0, 90);\n\t\t\t},\n\t\t\tisBackground: true,\n\t\t\tbackground: (s) => s.platform === Platform.PHONE ? this.highestSurface(s) : void 0,\n\t\t\ttoneDeltaPair: (s) => s.platform === Platform.WATCH ? new ToneDeltaPair(this.errorContainer(), this.errorDim(), 10, \"darker\", true, \"farther\") : void 0,\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE && s.contrastLevel > 0 ? getCurve(1.5) : void 0\n\t\t});\n\t\treturn extendSpecVersion(super.errorContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonErrorContainer() {\n\t\tconst color2025 = DynamicColor.fromPalette({\n\t\t\tname: \"on_error_container\",\n\t\t\tpalette: (s) => s.errorPalette,\n\t\t\tbackground: (s) => this.errorContainer(),\n\t\t\tcontrastCurve: (s) => s.platform === Platform.PHONE ? getCurve(4.5) : getCurve(7)\n\t\t});\n\t\treturn extendSpecVersion(super.onErrorContainer(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceVariant() {\n\t\tconst color2025 = Object.assign(this.surfaceContainerHighest().clone(), { name: \"surface_variant\" });\n\t\treturn extendSpecVersion(super.surfaceVariant(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tsurfaceTint() {\n\t\tconst color2025 = Object.assign(this.primary().clone(), { name: \"surface_tint\" });\n\t\treturn extendSpecVersion(super.surfaceTint(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tbackground() {\n\t\tconst color2025 = Object.assign(this.surface().clone(), { name: \"background\" });\n\t\treturn extendSpecVersion(super.background(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tonBackground() {\n\t\tconst color2025 = Object.assign(this.onSurface().clone(), {\n\t\t\tname: \"on_background\",\n\t\t\ttone: (s) => {\n\t\t\t\treturn s.platform === Platform.WATCH ? 100 : this.onSurface().getTone(s);\n\t\t\t}\n\t\t});\n\t\treturn extendSpecVersion(super.onBackground(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tcontrolActivated() {\n\t\tconst color2025 = Object.assign(this.primaryContainer().clone(), { name: \"control_activated\" });\n\t\treturn extendSpecVersion(super.controlActivated(), SpecVersion.SPEC_2025, color2025);\n\t}\n\tcontrolNormal() {\n\t\tconst color2025 = Object.assign(this.onSurfaceVariant().clone(), { name: \"control_normal\" });\n\t\treturn extendSpecVersion(super.controlNormal(), SpecVersion.SPEC_2025, color2025);\n\t}\n\ttextPrimaryInverse() {\n\t\tconst color2025 = Object.assign(this.inverseOnSurface().clone(), { name: \"text_primary_inverse\" });\n\t\treturn extendSpecVersion(super.textPrimaryInverse(), SpecVersion.SPEC_2025, color2025);\n\t}\n};\n/**\n* DynamicColors for the colors in the Material Design system.\n*/\nvar MaterialDynamicColors = class MaterialDynamicColors$1 {\n\tstatic contentAccentToneDelta = 15;\n\tstatic colorSpec = new ColorSpecDelegateImpl2025();\n\thighestSurface(s) {\n\t\treturn MaterialDynamicColors$1.colorSpec.highestSurface(s);\n\t}\n\tprimaryPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primaryPaletteKeyColor();\n\t}\n\tsecondaryPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondaryPaletteKeyColor();\n\t}\n\ttertiaryPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiaryPaletteKeyColor();\n\t}\n\tneutralPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.neutralPaletteKeyColor();\n\t}\n\tneutralVariantPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.neutralVariantPaletteKeyColor();\n\t}\n\terrorPaletteKeyColor() {\n\t\treturn MaterialDynamicColors$1.colorSpec.errorPaletteKeyColor();\n\t}\n\tbackground() {\n\t\treturn MaterialDynamicColors$1.colorSpec.background();\n\t}\n\tonBackground() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onBackground();\n\t}\n\tsurface() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surface();\n\t}\n\tsurfaceDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceDim();\n\t}\n\tsurfaceBright() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceBright();\n\t}\n\tsurfaceContainerLowest() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceContainerLowest();\n\t}\n\tsurfaceContainerLow() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceContainerLow();\n\t}\n\tsurfaceContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceContainer();\n\t}\n\tsurfaceContainerHigh() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceContainerHigh();\n\t}\n\tsurfaceContainerHighest() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceContainerHighest();\n\t}\n\tonSurface() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSurface();\n\t}\n\tsurfaceVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceVariant();\n\t}\n\tonSurfaceVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSurfaceVariant();\n\t}\n\toutline() {\n\t\treturn MaterialDynamicColors$1.colorSpec.outline();\n\t}\n\toutlineVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.outlineVariant();\n\t}\n\tinverseSurface() {\n\t\treturn MaterialDynamicColors$1.colorSpec.inverseSurface();\n\t}\n\tinverseOnSurface() {\n\t\treturn MaterialDynamicColors$1.colorSpec.inverseOnSurface();\n\t}\n\tshadow() {\n\t\treturn MaterialDynamicColors$1.colorSpec.shadow();\n\t}\n\tscrim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.scrim();\n\t}\n\tsurfaceTint() {\n\t\treturn MaterialDynamicColors$1.colorSpec.surfaceTint();\n\t}\n\tprimary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primary();\n\t}\n\tprimaryDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primaryDim();\n\t}\n\tonPrimary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onPrimary();\n\t}\n\tprimaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primaryContainer();\n\t}\n\tonPrimaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onPrimaryContainer();\n\t}\n\tinversePrimary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.inversePrimary();\n\t}\n\tprimaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primaryFixed();\n\t}\n\tprimaryFixedDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.primaryFixedDim();\n\t}\n\tonPrimaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onPrimaryFixed();\n\t}\n\tonPrimaryFixedVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onPrimaryFixedVariant();\n\t}\n\tsecondary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondary();\n\t}\n\tsecondaryDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondaryDim();\n\t}\n\tonSecondary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSecondary();\n\t}\n\tsecondaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondaryContainer();\n\t}\n\tonSecondaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSecondaryContainer();\n\t}\n\tsecondaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondaryFixed();\n\t}\n\tsecondaryFixedDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.secondaryFixedDim();\n\t}\n\tonSecondaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSecondaryFixed();\n\t}\n\tonSecondaryFixedVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onSecondaryFixedVariant();\n\t}\n\ttertiary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiary();\n\t}\n\ttertiaryDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiaryDim();\n\t}\n\tonTertiary() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onTertiary();\n\t}\n\ttertiaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiaryContainer();\n\t}\n\tonTertiaryContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onTertiaryContainer();\n\t}\n\ttertiaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiaryFixed();\n\t}\n\ttertiaryFixedDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.tertiaryFixedDim();\n\t}\n\tonTertiaryFixed() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onTertiaryFixed();\n\t}\n\tonTertiaryFixedVariant() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onTertiaryFixedVariant();\n\t}\n\terror() {\n\t\treturn MaterialDynamicColors$1.colorSpec.error();\n\t}\n\terrorDim() {\n\t\treturn MaterialDynamicColors$1.colorSpec.errorDim();\n\t}\n\tonError() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onError();\n\t}\n\terrorContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.errorContainer();\n\t}\n\tonErrorContainer() {\n\t\treturn MaterialDynamicColors$1.colorSpec.onErrorContainer();\n\t}\n\tcontrolActivated() {\n\t\treturn MaterialDynamicColors$1.colorSpec.controlActivated();\n\t}\n\tcontrolNormal() {\n\t\treturn MaterialDynamicColors$1.colorSpec.controlNormal();\n\t}\n\tcontrolHighlight() {\n\t\treturn MaterialDynamicColors$1.colorSpec.controlHighlight();\n\t}\n\ttextPrimaryInverse() {\n\t\treturn MaterialDynamicColors$1.colorSpec.textPrimaryInverse();\n\t}\n\ttextSecondaryAndTertiaryInverse() {\n\t\treturn MaterialDynamicColors$1.colorSpec.textSecondaryAndTertiaryInverse();\n\t}\n\ttextPrimaryInverseDisableOnly() {\n\t\treturn MaterialDynamicColors$1.colorSpec.textPrimaryInverseDisableOnly();\n\t}\n\ttextSecondaryAndTertiaryInverseDisabled() {\n\t\treturn MaterialDynamicColors$1.colorSpec.textSecondaryAndTertiaryInverseDisabled();\n\t}\n\ttextHintInverse() {\n\t\treturn MaterialDynamicColors$1.colorSpec.textHintInverse();\n\t}\n\tallDynamicColors = [\n\t\tthis.primaryPaletteKeyColor(),\n\t\tthis.secondaryPaletteKeyColor(),\n\t\tthis.tertiaryPaletteKeyColor(),\n\t\tthis.neutralPaletteKeyColor(),\n\t\tthis.neutralVariantPaletteKeyColor(),\n\t\tthis.errorPaletteKeyColor(),\n\t\tthis.background(),\n\t\tthis.onBackground(),\n\t\tthis.surface(),\n\t\tthis.surfaceDim(),\n\t\tthis.surfaceBright(),\n\t\tthis.surfaceContainerLowest(),\n\t\tthis.surfaceContainerLow(),\n\t\tthis.surfaceContainer(),\n\t\tthis.surfaceContainerHigh(),\n\t\tthis.surfaceContainerHighest(),\n\t\tthis.onSurface(),\n\t\tthis.surfaceVariant(),\n\t\tthis.onSurfaceVariant(),\n\t\tthis.outline(),\n\t\tthis.outlineVariant(),\n\t\tthis.inverseSurface(),\n\t\tthis.inverseOnSurface(),\n\t\tthis.shadow(),\n\t\tthis.scrim(),\n\t\tthis.surfaceTint(),\n\t\tthis.primary(),\n\t\tthis.primaryDim(),\n\t\tthis.onPrimary(),\n\t\tthis.primaryContainer(),\n\t\tthis.onPrimaryContainer(),\n\t\tthis.primaryFixed(),\n\t\tthis.primaryFixedDim(),\n\t\tthis.onPrimaryFixed(),\n\t\tthis.onPrimaryFixedVariant(),\n\t\tthis.inversePrimary(),\n\t\tthis.secondary(),\n\t\tthis.secondaryDim(),\n\t\tthis.onSecondary(),\n\t\tthis.secondaryContainer(),\n\t\tthis.onSecondaryContainer(),\n\t\tthis.secondaryFixed(),\n\t\tthis.secondaryFixedDim(),\n\t\tthis.onSecondaryFixed(),\n\t\tthis.onSecondaryFixedVariant(),\n\t\tthis.tertiary(),\n\t\tthis.tertiaryDim(),\n\t\tthis.onTertiary(),\n\t\tthis.tertiaryContainer(),\n\t\tthis.onTertiaryContainer(),\n\t\tthis.tertiaryFixed(),\n\t\tthis.tertiaryFixedDim(),\n\t\tthis.onTertiaryFixed(),\n\t\tthis.onTertiaryFixedVariant(),\n\t\tthis.error(),\n\t\tthis.errorDim(),\n\t\tthis.onError(),\n\t\tthis.errorContainer(),\n\t\tthis.onErrorContainer(),\n\t\tthis.controlActivated(),\n\t\tthis.controlNormal(),\n\t\tthis.controlHighlight(),\n\t\tthis.textPrimaryInverse(),\n\t\tthis.textSecondaryAndTertiaryInverse(),\n\t\tthis.textPrimaryInverseDisableOnly(),\n\t\tthis.textSecondaryAndTertiaryInverseDisabled(),\n\t\tthis.textHintInverse()\n\t];\n\t/** @deprecated Use highestSurface() instead. */\n\tstatic highestSurface(s) {\n\t\treturn MaterialDynamicColors$1.colorSpec.highestSurface(s);\n\t}\n\t/** @deprecated Use primaryPaletteKeyColor() instead. */\n\tstatic primaryPaletteKeyColor = MaterialDynamicColors$1.colorSpec.primaryPaletteKeyColor();\n\t/** @deprecated Use secondaryPaletteKeyColor() instead. */\n\tstatic secondaryPaletteKeyColor = MaterialDynamicColors$1.colorSpec.secondaryPaletteKeyColor();\n\t/** @deprecated Use tertiaryPaletteKeyColor() instead. */\n\tstatic tertiaryPaletteKeyColor = MaterialDynamicColors$1.colorSpec.tertiaryPaletteKeyColor();\n\t/** @deprecated Use neutralPaletteKeyColor() instead. */\n\tstatic neutralPaletteKeyColor = MaterialDynamicColors$1.colorSpec.neutralPaletteKeyColor();\n\t/** @deprecated Use neutralVariantPaletteKeyColor() instead. */\n\tstatic neutralVariantPaletteKeyColor = MaterialDynamicColors$1.colorSpec.neutralVariantPaletteKeyColor();\n\t/** @deprecated Use background() instead. */\n\tstatic background = MaterialDynamicColors$1.colorSpec.background();\n\t/** @deprecated Use background() instead. */\n\tstatic onBackground = MaterialDynamicColors$1.colorSpec.onBackground();\n\t/** @deprecated Use surface() instead. */\n\tstatic surface = MaterialDynamicColors$1.colorSpec.surface();\n\t/** @deprecated Use surfaceDim() instead. */\n\tstatic surfaceDim = MaterialDynamicColors$1.colorSpec.surfaceDim();\n\t/** @deprecated Use surfaceBright() instead. */\n\tstatic surfaceBright = MaterialDynamicColors$1.colorSpec.surfaceBright();\n\t/** @deprecated Use surfaceContainerLowest() instead. */\n\tstatic surfaceContainerLowest = MaterialDynamicColors$1.colorSpec.surfaceContainerLowest();\n\t/** @deprecated Use surfaceContainerLow() instead. */\n\tstatic surfaceContainerLow = MaterialDynamicColors$1.colorSpec.surfaceContainerLow();\n\t/** @deprecated Use surfaceContainer() instead. */\n\tstatic surfaceContainer = MaterialDynamicColors$1.colorSpec.surfaceContainer();\n\t/** @deprecated Use surfaceContainerHigh() instead. */\n\tstatic surfaceContainerHigh = MaterialDynamicColors$1.colorSpec.surfaceContainerHigh();\n\t/** @deprecated Use surfaceContainerHighest() instead. */\n\tstatic surfaceContainerHighest = MaterialDynamicColors$1.colorSpec.surfaceContainerHighest();\n\t/** @deprecated Use onSurface() instead. */\n\tstatic onSurface = MaterialDynamicColors$1.colorSpec.onSurface();\n\t/** @deprecated Use surfaceVariant() instead. */\n\tstatic surfaceVariant = MaterialDynamicColors$1.colorSpec.surfaceVariant();\n\t/** @deprecated Use onSurfaceVariant() instead. */\n\tstatic onSurfaceVariant = MaterialDynamicColors$1.colorSpec.onSurfaceVariant();\n\t/** @deprecated Use inverseSurface() instead. */\n\tstatic inverseSurface = MaterialDynamicColors$1.colorSpec.inverseSurface();\n\t/** @deprecated Use inverseOnSurface() instead. */\n\tstatic inverseOnSurface = MaterialDynamicColors$1.colorSpec.inverseOnSurface();\n\t/** @deprecated Use outline() instead. */\n\tstatic outline = MaterialDynamicColors$1.colorSpec.outline();\n\t/** @deprecated Use outlineVariant() instead. */\n\tstatic outlineVariant = MaterialDynamicColors$1.colorSpec.outlineVariant();\n\t/** @deprecated Use shadow() instead. */\n\tstatic shadow = MaterialDynamicColors$1.colorSpec.shadow();\n\t/** @deprecated Use scrim() instead. */\n\tstatic scrim = MaterialDynamicColors$1.colorSpec.scrim();\n\t/** @deprecated Use surfaceTint() instead. */\n\tstatic surfaceTint = MaterialDynamicColors$1.colorSpec.surfaceTint();\n\t/** @deprecated Use primary() instead. */\n\tstatic primary = MaterialDynamicColors$1.colorSpec.primary();\n\t/** @deprecated Use onPrimary() instead. */\n\tstatic onPrimary = MaterialDynamicColors$1.colorSpec.onPrimary();\n\t/** @deprecated Use primaryContainer() instead. */\n\tstatic primaryContainer = MaterialDynamicColors$1.colorSpec.primaryContainer();\n\t/** @deprecated Use onPrimaryContainer() instead. */\n\tstatic onPrimaryContainer = MaterialDynamicColors$1.colorSpec.onPrimaryContainer();\n\t/** @deprecated Use inversePrimary() instead. */\n\tstatic inversePrimary = MaterialDynamicColors$1.colorSpec.inversePrimary();\n\t/** @deprecated Use secondary() instead. */\n\tstatic secondary = MaterialDynamicColors$1.colorSpec.secondary();\n\t/** @deprecated Use onSecondary() instead. */\n\tstatic onSecondary = MaterialDynamicColors$1.colorSpec.onSecondary();\n\t/** @deprecated Use secondaryContainer() instead. */\n\tstatic secondaryContainer = MaterialDynamicColors$1.colorSpec.secondaryContainer();\n\t/** @deprecated Use onSecondaryContainer() instead. */\n\tstatic onSecondaryContainer = MaterialDynamicColors$1.colorSpec.onSecondaryContainer();\n\t/** @deprecated Use tertiary() instead. */\n\tstatic tertiary = MaterialDynamicColors$1.colorSpec.tertiary();\n\t/** @deprecated Use onTertiary() instead. */\n\tstatic onTertiary = MaterialDynamicColors$1.colorSpec.onTertiary();\n\t/** @deprecated Use tertiaryContainer() instead. */\n\tstatic tertiaryContainer = MaterialDynamicColors$1.colorSpec.tertiaryContainer();\n\t/** @deprecated Use onTertiaryContainer() instead. */\n\tstatic onTertiaryContainer = MaterialDynamicColors$1.colorSpec.onTertiaryContainer();\n\t/** @deprecated Use error() instead. */\n\tstatic error = MaterialDynamicColors$1.colorSpec.error();\n\t/** @deprecated Use onError() instead. */\n\tstatic onError = MaterialDynamicColors$1.colorSpec.onError();\n\t/** @deprecated Use errorContainer() instead. */\n\tstatic errorContainer = MaterialDynamicColors$1.colorSpec.errorContainer();\n\t/** @deprecated Use onErrorContainer() instead. */\n\tstatic onErrorContainer = MaterialDynamicColors$1.colorSpec.onErrorContainer();\n\t/** @deprecated Use primaryFixed() instead. */\n\tstatic primaryFixed = MaterialDynamicColors$1.colorSpec.primaryFixed();\n\t/** @deprecated Use primaryFixedDim() instead. */\n\tstatic primaryFixedDim = MaterialDynamicColors$1.colorSpec.primaryFixedDim();\n\t/** @deprecated Use onPrimaryFixed() instead. */\n\tstatic onPrimaryFixed = MaterialDynamicColors$1.colorSpec.onPrimaryFixed();\n\t/** @deprecated Use onPrimaryFixedVariant() instead. */\n\tstatic onPrimaryFixedVariant = MaterialDynamicColors$1.colorSpec.onPrimaryFixedVariant();\n\t/** @deprecated Use secondaryFixed() instead. */\n\tstatic secondaryFixed = MaterialDynamicColors$1.colorSpec.secondaryFixed();\n\t/** @deprecated Use secondaryFixedDim() instead. */\n\tstatic secondaryFixedDim = MaterialDynamicColors$1.colorSpec.secondaryFixedDim();\n\t/** @deprecated Use onSecondaryFixed() instead. */\n\tstatic onSecondaryFixed = MaterialDynamicColors$1.colorSpec.onSecondaryFixed();\n\t/** @deprecated Use onSecondaryFixedVariant() instead. */\n\tstatic onSecondaryFixedVariant = MaterialDynamicColors$1.colorSpec.onSecondaryFixedVariant();\n\t/** @deprecated Use tertiaryFixed() instead. */\n\tstatic tertiaryFixed = MaterialDynamicColors$1.colorSpec.tertiaryFixed();\n\t/** @deprecated Use tertiaryFixedDim() instead. */\n\tstatic tertiaryFixedDim = MaterialDynamicColors$1.colorSpec.tertiaryFixedDim();\n\t/** @deprecated Use onTertiaryFixed() instead. */\n\tstatic onTertiaryFixed = MaterialDynamicColors$1.colorSpec.onTertiaryFixed();\n\t/** @deprecated Use onTertiaryFixedVariant() instead. */\n\tstatic onTertiaryFixedVariant = MaterialDynamicColors$1.colorSpec.onTertiaryFixedVariant();\n};\n/**\n* Constructed by a set of values representing the current UI state (such as\n* whether or not its dark theme, what the theme style is, etc.), and\n* provides a set of TonalPalettes that can create colors that fit in\n* with the theme style. Used by DynamicColor to resolve into a color.\n*/\nvar DynamicScheme = class DynamicScheme$1 {\n\tstatic DEFAULT_SPEC_VERSION = SpecVersion.SPEC_2021;\n\tstatic DEFAULT_PLATFORM = Platform.PHONE;\n\t/**\n\t* The source color of the theme as an HCT color.\n\t*/\n\tsourceColorHct;\n\t/** The source color of the theme as an ARGB 32-bit integer. */\n\tsourceColorArgb;\n\t/** The variant, or style, of the theme. */\n\tvariant;\n\t/**\n\t* Value from -1 to 1. -1 represents minimum contrast. 0 represents standard\n\t* (i.e. the design as spec'd), and 1 represents maximum contrast.\n\t*/\n\tcontrastLevel;\n\t/** Whether the scheme is in dark mode or light mode. */\n\tisDark;\n\t/** The platform on which this scheme is intended to be used. */\n\tplatform;\n\t/** The version of the design spec that this scheme is based on. */\n\tspecVersion;\n\t/**\n\t* Given a tone, produces a color. Hue and chroma of the\n\t* color are specified in the design specification of the variant. Usually\n\t* colorful.\n\t*/\n\tprimaryPalette;\n\t/**\n\t* Given a tone, produces a color. Hue and chroma of\n\t* the color are specified in the design specification of the variant. Usually\n\t* less colorful.\n\t*/\n\tsecondaryPalette;\n\t/**\n\t* Given a tone, produces a color. Hue and chroma of\n\t* the color are specified in the design specification of the variant. Usually\n\t* a different hue from primary and colorful.\n\t*/\n\ttertiaryPalette;\n\t/**\n\t* Given a tone, produces a color. Hue and chroma of the\n\t* color are specified in the design specification of the variant. Usually not\n\t* colorful at all, intended for background & surface colors.\n\t*/\n\tneutralPalette;\n\t/**\n\t* Given a tone, produces a color. Hue and chroma\n\t* of the color are specified in the design specification of the variant.\n\t* Usually not colorful, but slightly more colorful than Neutral. Intended for\n\t* backgrounds & surfaces.\n\t*/\n\tneutralVariantPalette;\n\t/**\n\t* Given a tone, produces a reddish, colorful, color.\n\t*/\n\terrorPalette;\n\tcolors;\n\tconstructor({ sourceColorHct, isDark, contrastLevel = 0, variant, specVersion = DynamicScheme$1.DEFAULT_SPEC_VERSION, platform = DynamicScheme$1.DEFAULT_PLATFORM, primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, errorPalette }) {\n\t\tthis.sourceColorArgb = sourceColorHct.toInt();\n\t\tthis.variant = variant;\n\t\tthis.contrastLevel = contrastLevel;\n\t\tthis.isDark = isDark;\n\t\tthis.platform = platform;\n\t\tthis.specVersion = specVersion;\n\t\tthis.sourceColorHct = sourceColorHct;\n\t\tthis.primaryPalette = primaryPalette ?? getSpec(specVersion).getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\tthis.secondaryPalette = secondaryPalette ?? getSpec(specVersion).getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\tthis.tertiaryPalette = tertiaryPalette ?? getSpec(specVersion).getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\tthis.neutralPalette = neutralPalette ?? getSpec(specVersion).getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\tthis.neutralVariantPalette = neutralVariantPalette ?? getSpec(specVersion).getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\tthis.errorPalette = errorPalette ?? getSpec(specVersion).getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) ?? TonalPalette.fromHueAndChroma(25, 84);\n\t\tthis.colors = new MaterialDynamicColors();\n\t}\n\tstatic from({ sourceColorHct = Hct.fromInt(4284960932), isDark, contrastLevel = 0, variant = Variant.TONAL_SPOT, specVersion = DynamicScheme$1.DEFAULT_SPEC_VERSION, platform = DynamicScheme$1.DEFAULT_PLATFORM, primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, errorPalette, primaryPaletteKeyColor, secondaryPaletteKeyColor, tertiaryPaletteKeyColor, neutralPaletteKeyColor, neutralVariantPaletteKeyColor, errorPaletteKeyColor }) {\n\t\treturn new DynamicScheme$1({\n\t\t\tsourceColorHct,\n\t\t\tisDark,\n\t\t\tcontrastLevel,\n\t\t\tvariant,\n\t\t\tspecVersion,\n\t\t\tplatform,\n\t\t\tprimaryPalette: primaryPalette ?? getSpec(specVersion).getPrimaryPalette(variant, primaryPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel),\n\t\t\tsecondaryPalette: secondaryPalette ?? getSpec(specVersion).getSecondaryPalette(variant, secondaryPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel),\n\t\t\ttertiaryPalette: tertiaryPalette ?? getSpec(specVersion).getTertiaryPalette(variant, tertiaryPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel),\n\t\t\tneutralPalette: neutralPalette ?? getSpec(specVersion).getNeutralPalette(variant, neutralPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel),\n\t\t\tneutralVariantPalette: neutralVariantPalette ?? getSpec(specVersion).getNeutralVariantPalette(variant, neutralVariantPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel),\n\t\t\terrorPalette: errorPalette ?? getSpec(specVersion).getErrorPalette(variant, errorPaletteKeyColor ?? sourceColorHct, isDark, platform, contrastLevel) ?? TonalPalette.fromHueAndChroma(25, 84)\n\t\t});\n\t}\n\ttoString() {\n\t\treturn `Scheme: variant=${Variant[this.variant]}, mode=${this.isDark ? \"dark\" : \"light\"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`;\n\t}\n\t/**\n\t* Returns a new hue based on a piecewise function and input color hue.\n\t*\n\t* For example, for the following function:\n\t* result = 26 if 0 <= hue < 101\n\t* result = 39 if 101 <= hue < 210\n\t* result = 28 if 210 <= hue < 360\n\t*\n\t* call the function as:\n\t*\n\t* const hueBreakpoints = [0, 101, 210, 360];\n\t* const hues = [26, 39, 28];\n\t* const result = scheme.piecewise(hue, hueBreakpoints, hues);\n\t*\n\t* @param sourceColorHct The input value.\n\t* @param hueBreakpoints The breakpoints, in sorted order. No default lower or\n\t* upper bounds are assumed.\n\t* @param hues The hues that should be applied when source color's hue is >=\n\t* the same index in hueBrakpoints array, and < the hue at the next index\n\t* in hueBrakpoints array. Otherwise, the source color's hue is returned.\n\t*/\n\tstatic getPiecewiseHue(sourceColorHct, hueBreakpoints, hues) {\n\t\tconst size = Math.min(hueBreakpoints.length - 1, hues.length);\n\t\tconst sourceHue = sourceColorHct.hue;\n\t\tfor (let i = 0; i < size; i++) if (sourceHue >= hueBreakpoints[i] && sourceHue < hueBreakpoints[i + 1]) return sanitizeDegreesDouble(hues[i]);\n\t\treturn sourceHue;\n\t}\n\t/**\n\t* Returns a shifted hue based on a piecewise function and input color hue.\n\t*\n\t* For example, for the following function:\n\t* result = hue + 26 if 0 <= hue < 101\n\t* result = hue - 39 if 101 <= hue < 210\n\t* result = hue + 28 if 210 <= hue < 360\n\t*\n\t* call the function as:\n\t*\n\t* const hueBreakpoints = [0, 101, 210, 360];\n\t* const hues = [26, -39, 28];\n\t* const result = scheme.getRotatedHue(hue, hueBreakpoints, hues);\n\t*\n\t* @param sourceColorHct the source color of the theme, in HCT.\n\t* @param hueBreakpoints The \"breakpoints\", i.e. the hues at which a rotation\n\t* should be apply. No default lower or upper bounds are assumed.\n\t* @param rotations The rotation that should be applied when source color's\n\t* hue is >= the same index in hues array, and < the hue at the next\n\t* index in hues array. Otherwise, the source color's hue is returned.\n\t*/\n\tstatic getRotatedHue(sourceColorHct, hueBreakpoints, rotations) {\n\t\tlet rotation = DynamicScheme$1.getPiecewiseHue(sourceColorHct, hueBreakpoints, rotations);\n\t\tif (Math.min(hueBreakpoints.length - 1, rotations.length) <= 0) rotation = 0;\n\t\treturn sanitizeDegreesDouble(sourceColorHct.hue + rotation);\n\t}\n\tgetArgb(dynamicColor) {\n\t\treturn dynamicColor.getArgb(this);\n\t}\n\tgetHct(dynamicColor) {\n\t\treturn dynamicColor.getHct(this);\n\t}\n\tget primaryPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.primaryPaletteKeyColor());\n\t}\n\tget secondaryPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.secondaryPaletteKeyColor());\n\t}\n\tget tertiaryPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.tertiaryPaletteKeyColor());\n\t}\n\tget neutralPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.neutralPaletteKeyColor());\n\t}\n\tget neutralVariantPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.neutralVariantPaletteKeyColor());\n\t}\n\tget errorPaletteKeyColor() {\n\t\treturn this.getArgb(this.colors.errorPaletteKeyColor());\n\t}\n\tget background() {\n\t\treturn this.getArgb(this.colors.background());\n\t}\n\tget onBackground() {\n\t\treturn this.getArgb(this.colors.onBackground());\n\t}\n\tget surface() {\n\t\treturn this.getArgb(this.colors.surface());\n\t}\n\tget surfaceDim() {\n\t\treturn this.getArgb(this.colors.surfaceDim());\n\t}\n\tget surfaceBright() {\n\t\treturn this.getArgb(this.colors.surfaceBright());\n\t}\n\tget surfaceContainerLowest() {\n\t\treturn this.getArgb(this.colors.surfaceContainerLowest());\n\t}\n\tget surfaceContainerLow() {\n\t\treturn this.getArgb(this.colors.surfaceContainerLow());\n\t}\n\tget surfaceContainer() {\n\t\treturn this.getArgb(this.colors.surfaceContainer());\n\t}\n\tget surfaceContainerHigh() {\n\t\treturn this.getArgb(this.colors.surfaceContainerHigh());\n\t}\n\tget surfaceContainerHighest() {\n\t\treturn this.getArgb(this.colors.surfaceContainerHighest());\n\t}\n\tget onSurface() {\n\t\treturn this.getArgb(this.colors.onSurface());\n\t}\n\tget surfaceVariant() {\n\t\treturn this.getArgb(this.colors.surfaceVariant());\n\t}\n\tget onSurfaceVariant() {\n\t\treturn this.getArgb(this.colors.onSurfaceVariant());\n\t}\n\tget inverseSurface() {\n\t\treturn this.getArgb(this.colors.inverseSurface());\n\t}\n\tget inverseOnSurface() {\n\t\treturn this.getArgb(this.colors.inverseOnSurface());\n\t}\n\tget outline() {\n\t\treturn this.getArgb(this.colors.outline());\n\t}\n\tget outlineVariant() {\n\t\treturn this.getArgb(this.colors.outlineVariant());\n\t}\n\tget shadow() {\n\t\treturn this.getArgb(this.colors.shadow());\n\t}\n\tget scrim() {\n\t\treturn this.getArgb(this.colors.scrim());\n\t}\n\tget surfaceTint() {\n\t\treturn this.getArgb(this.colors.surfaceTint());\n\t}\n\tget primary() {\n\t\treturn this.getArgb(this.colors.primary());\n\t}\n\tget primaryDim() {\n\t\tconst primaryDim = this.colors.primaryDim();\n\t\tif (primaryDim === void 0) throw new Error(\"`primaryDim` color is undefined prior to 2025 spec.\");\n\t\treturn this.getArgb(primaryDim);\n\t}\n\tget onPrimary() {\n\t\treturn this.getArgb(this.colors.onPrimary());\n\t}\n\tget primaryContainer() {\n\t\treturn this.getArgb(this.colors.primaryContainer());\n\t}\n\tget onPrimaryContainer() {\n\t\treturn this.getArgb(this.colors.onPrimaryContainer());\n\t}\n\tget primaryFixed() {\n\t\treturn this.getArgb(this.colors.primaryFixed());\n\t}\n\tget primaryFixedDim() {\n\t\treturn this.getArgb(this.colors.primaryFixedDim());\n\t}\n\tget onPrimaryFixed() {\n\t\treturn this.getArgb(this.colors.onPrimaryFixed());\n\t}\n\tget onPrimaryFixedVariant() {\n\t\treturn this.getArgb(this.colors.onPrimaryFixedVariant());\n\t}\n\tget inversePrimary() {\n\t\treturn this.getArgb(this.colors.inversePrimary());\n\t}\n\tget secondary() {\n\t\treturn this.getArgb(this.colors.secondary());\n\t}\n\tget secondaryDim() {\n\t\tconst secondaryDim = this.colors.secondaryDim();\n\t\tif (secondaryDim === void 0) throw new Error(\"`secondaryDim` color is undefined prior to 2025 spec.\");\n\t\treturn this.getArgb(secondaryDim);\n\t}\n\tget onSecondary() {\n\t\treturn this.getArgb(this.colors.onSecondary());\n\t}\n\tget secondaryContainer() {\n\t\treturn this.getArgb(this.colors.secondaryContainer());\n\t}\n\tget onSecondaryContainer() {\n\t\treturn this.getArgb(this.colors.onSecondaryContainer());\n\t}\n\tget secondaryFixed() {\n\t\treturn this.getArgb(this.colors.secondaryFixed());\n\t}\n\tget secondaryFixedDim() {\n\t\treturn this.getArgb(this.colors.secondaryFixedDim());\n\t}\n\tget onSecondaryFixed() {\n\t\treturn this.getArgb(this.colors.onSecondaryFixed());\n\t}\n\tget onSecondaryFixedVariant() {\n\t\treturn this.getArgb(this.colors.onSecondaryFixedVariant());\n\t}\n\tget tertiary() {\n\t\treturn this.getArgb(this.colors.tertiary());\n\t}\n\tget tertiaryDim() {\n\t\tconst tertiaryDim = this.colors.tertiaryDim();\n\t\tif (tertiaryDim === void 0) throw new Error(\"`tertiaryDim` color is undefined prior to 2025 spec.\");\n\t\treturn this.getArgb(tertiaryDim);\n\t}\n\tget onTertiary() {\n\t\treturn this.getArgb(this.colors.onTertiary());\n\t}\n\tget tertiaryContainer() {\n\t\treturn this.getArgb(this.colors.tertiaryContainer());\n\t}\n\tget onTertiaryContainer() {\n\t\treturn this.getArgb(this.colors.onTertiaryContainer());\n\t}\n\tget tertiaryFixed() {\n\t\treturn this.getArgb(this.colors.tertiaryFixed());\n\t}\n\tget tertiaryFixedDim() {\n\t\treturn this.getArgb(this.colors.tertiaryFixedDim());\n\t}\n\tget onTertiaryFixed() {\n\t\treturn this.getArgb(this.colors.onTertiaryFixed());\n\t}\n\tget onTertiaryFixedVariant() {\n\t\treturn this.getArgb(this.colors.onTertiaryFixedVariant());\n\t}\n\tget error() {\n\t\treturn this.getArgb(this.colors.error());\n\t}\n\tget errorDim() {\n\t\tconst errorDim = this.colors.errorDim();\n\t\tif (errorDim === void 0) throw new Error(\"`errorDim` color is undefined prior to 2025 spec.\");\n\t\treturn this.getArgb(errorDim);\n\t}\n\tget onError() {\n\t\treturn this.getArgb(this.colors.onError());\n\t}\n\tget errorContainer() {\n\t\treturn this.getArgb(this.colors.errorContainer());\n\t}\n\tget onErrorContainer() {\n\t\treturn this.getArgb(this.colors.onErrorContainer());\n\t}\n\tget controlActivated() {\n\t\treturn this.getArgb(this.colors.controlActivated());\n\t}\n\tget controlNormal() {\n\t\treturn this.getArgb(this.colors.controlNormal());\n\t}\n\tget controlHighlight() {\n\t\treturn this.getArgb(this.colors.controlHighlight());\n\t}\n\tget textPrimaryInverse() {\n\t\treturn this.getArgb(this.colors.textPrimaryInverse());\n\t}\n\tget textSecondaryAndTertiaryInverse() {\n\t\treturn this.getArgb(this.colors.textSecondaryAndTertiaryInverse());\n\t}\n\tget textPrimaryInverseDisableOnly() {\n\t\treturn this.getArgb(this.colors.textPrimaryInverseDisableOnly());\n\t}\n\tget textSecondaryAndTertiaryInverseDisabled() {\n\t\treturn this.getArgb(this.colors.textSecondaryAndTertiaryInverseDisabled());\n\t}\n\tget textHintInverse() {\n\t\treturn this.getArgb(this.colors.textHintInverse());\n\t}\n};\n/**\n* A delegate for the palettes of a DynamicScheme in the 2021 spec.\n*/\nvar DynamicSchemePalettesDelegateImpl2021 = class {\n\tgetPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.CONTENT:\n\t\t\tcase Variant.FIDELITY: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma);\n\t\t\tcase Variant.FRUIT_SALAD: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue - 50), 48);\n\t\t\tcase Variant.MONOCHROME: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12);\n\t\t\tcase Variant.RAINBOW: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 48);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue + 240), 40);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 200);\n\t\t\tdefault: throw new Error(`Unsupported variant: ${variant}`);\n\t\t}\n\t}\n\tgetSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.CONTENT:\n\t\t\tcase Variant.FIDELITY: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, Math.max(sourceColorHct.chroma - 32, sourceColorHct.chroma * .5));\n\t\t\tcase Variant.FRUIT_SALAD: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue - 50), 36);\n\t\t\tcase Variant.MONOCHROME: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8);\n\t\t\tcase Variant.RAINBOW: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t21,\n\t\t\t\t51,\n\t\t\t\t121,\n\t\t\t\t151,\n\t\t\t\t191,\n\t\t\t\t271,\n\t\t\t\t321,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t45,\n\t\t\t\t95,\n\t\t\t\t45,\n\t\t\t\t20,\n\t\t\t\t45,\n\t\t\t\t90,\n\t\t\t\t45,\n\t\t\t\t45,\n\t\t\t\t45\n\t\t\t]), 24);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t41,\n\t\t\t\t61,\n\t\t\t\t101,\n\t\t\t\t131,\n\t\t\t\t181,\n\t\t\t\t251,\n\t\t\t\t301,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t18,\n\t\t\t\t15,\n\t\t\t\t10,\n\t\t\t\t12,\n\t\t\t\t15,\n\t\t\t\t18,\n\t\t\t\t15,\n\t\t\t\t12,\n\t\t\t\t12\n\t\t\t]), 24);\n\t\t\tdefault: throw new Error(`Unsupported variant: ${variant}`);\n\t\t}\n\t}\n\tgetTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.CONTENT: return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct).analogous(3, 6)[2]));\n\t\t\tcase Variant.FIDELITY: return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct).complement));\n\t\t\tcase Variant.FRUIT_SALAD: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36);\n\t\t\tcase Variant.MONOCHROME: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n\t\t\tcase Variant.RAINBOW:\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue + 60), 24);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t21,\n\t\t\t\t51,\n\t\t\t\t121,\n\t\t\t\t151,\n\t\t\t\t191,\n\t\t\t\t271,\n\t\t\t\t321,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t120,\n\t\t\t\t120,\n\t\t\t\t20,\n\t\t\t\t45,\n\t\t\t\t20,\n\t\t\t\t15,\n\t\t\t\t20,\n\t\t\t\t120,\n\t\t\t\t120\n\t\t\t]), 32);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t41,\n\t\t\t\t61,\n\t\t\t\t101,\n\t\t\t\t131,\n\t\t\t\t181,\n\t\t\t\t251,\n\t\t\t\t301,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t35,\n\t\t\t\t30,\n\t\t\t\t20,\n\t\t\t\t25,\n\t\t\t\t30,\n\t\t\t\t35,\n\t\t\t\t30,\n\t\t\t\t25,\n\t\t\t\t25\n\t\t\t]), 32);\n\t\t\tdefault: throw new Error(`Unsupported variant: ${variant}`);\n\t\t}\n\t}\n\tgetNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.CONTENT:\n\t\t\tcase Variant.FIDELITY: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8);\n\t\t\tcase Variant.FRUIT_SALAD: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10);\n\t\t\tcase Variant.MONOCHROME: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2);\n\t\t\tcase Variant.RAINBOW: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 6);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue + 15), 8);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10);\n\t\t\tdefault: throw new Error(`Unsupported variant: ${variant}`);\n\t\t}\n\t}\n\tgetNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.CONTENT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8 + 4);\n\t\t\tcase Variant.FIDELITY: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8 + 4);\n\t\t\tcase Variant.FRUIT_SALAD: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n\t\t\tcase Variant.MONOCHROME: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2);\n\t\t\tcase Variant.RAINBOW: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(sanitizeDegreesDouble(sourceColorHct.hue + 15), 12);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12);\n\t\t\tdefault: throw new Error(`Unsupported variant: ${variant}`);\n\t\t}\n\t}\n\tgetErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\treturn void 0;\n\t}\n};\n/**\n* A delegate for the palettes of a DynamicScheme in the 2025 spec.\n*/\nvar DynamicSchemePalettesDelegateImpl2025 = class DynamicSchemePalettesDelegateImpl2025$1 extends DynamicSchemePalettesDelegateImpl2021 {\n\tgetPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? Hct.isBlue(sourceColorHct.hue) ? 12 : 8 : Hct.isBlue(sourceColorHct.hue) ? 16 : 12);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE && isDark ? 26 : 32);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? isDark ? 36 : 48 : 40);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? 74 : 56);\n\t\t\tdefault: return super.getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n\tgetSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? Hct.isBlue(sourceColorHct.hue) ? 6 : 4 : Hct.isBlue(sourceColorHct.hue) ? 10 : 6);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t105,\n\t\t\t\t140,\n\t\t\t\t204,\n\t\t\t\t253,\n\t\t\t\t278,\n\t\t\t\t300,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-160,\n\t\t\t\t155,\n\t\t\t\t-100,\n\t\t\t\t96,\n\t\t\t\t-96,\n\t\t\t\t-156,\n\t\t\t\t-165,\n\t\t\t\t-160\n\t\t\t]), platform === Platform.PHONE ? isDark ? 16 : 24 : 24);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t38,\n\t\t\t\t105,\n\t\t\t\t140,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-14,\n\t\t\t\t10,\n\t\t\t\t-14,\n\t\t\t\t10,\n\t\t\t\t-14\n\t\t\t]), platform === Platform.PHONE ? 56 : 36);\n\t\t\tdefault: return super.getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n\tgetTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t38,\n\t\t\t\t105,\n\t\t\t\t161,\n\t\t\t\t204,\n\t\t\t\t278,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-32,\n\t\t\t\t26,\n\t\t\t\t10,\n\t\t\t\t-39,\n\t\t\t\t24,\n\t\t\t\t-15,\n\t\t\t\t-32\n\t\t\t]), platform === Platform.PHONE ? 20 : 36);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t20,\n\t\t\t\t71,\n\t\t\t\t161,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-40,\n\t\t\t\t48,\n\t\t\t\t-32,\n\t\t\t\t40,\n\t\t\t\t-32\n\t\t\t]), platform === Platform.PHONE ? 28 : 32);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t105,\n\t\t\t\t140,\n\t\t\t\t204,\n\t\t\t\t253,\n\t\t\t\t278,\n\t\t\t\t300,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-165,\n\t\t\t\t160,\n\t\t\t\t-105,\n\t\t\t\t101,\n\t\t\t\t-101,\n\t\t\t\t-160,\n\t\t\t\t-170,\n\t\t\t\t-165\n\t\t\t]), 48);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t\t0,\n\t\t\t\t38,\n\t\t\t\t71,\n\t\t\t\t105,\n\t\t\t\t140,\n\t\t\t\t161,\n\t\t\t\t253,\n\t\t\t\t333,\n\t\t\t\t360\n\t\t\t], [\n\t\t\t\t-72,\n\t\t\t\t35,\n\t\t\t\t24,\n\t\t\t\t-24,\n\t\t\t\t62,\n\t\t\t\t50,\n\t\t\t\t62,\n\t\t\t\t-72\n\t\t\t]), 56);\n\t\t\tdefault: return super.getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n\tstatic getExpressiveNeutralHue(sourceColorHct) {\n\t\tconst hue = DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t0,\n\t\t\t71,\n\t\t\t124,\n\t\t\t253,\n\t\t\t278,\n\t\t\t300,\n\t\t\t360\n\t\t], [\n\t\t\t10,\n\t\t\t0,\n\t\t\t10,\n\t\t\t0,\n\t\t\t10,\n\t\t\t0\n\t\t]);\n\t\treturn hue;\n\t}\n\tstatic getExpressiveNeutralChroma(sourceColorHct, isDark, platform) {\n\t\tconst neutralHue = DynamicSchemePalettesDelegateImpl2025$1.getExpressiveNeutralHue(sourceColorHct);\n\t\treturn platform === Platform.PHONE ? isDark ? Hct.isYellow(neutralHue) ? 6 : 14 : 18 : 12;\n\t}\n\tstatic getVibrantNeutralHue(sourceColorHct) {\n\t\treturn DynamicScheme.getRotatedHue(sourceColorHct, [\n\t\t\t0,\n\t\t\t38,\n\t\t\t105,\n\t\t\t140,\n\t\t\t333,\n\t\t\t360\n\t\t], [\n\t\t\t-14,\n\t\t\t10,\n\t\t\t-14,\n\t\t\t10,\n\t\t\t-14\n\t\t]);\n\t}\n\tstatic getVibrantNeutralChroma(sourceColorHct, platform) {\n\t\tconst neutralHue = DynamicSchemePalettesDelegateImpl2025$1.getVibrantNeutralHue(sourceColorHct);\n\t\treturn platform === Platform.PHONE ? 28 : Hct.isBlue(neutralHue) ? 28 : 20;\n\t}\n\tgetNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? 1.4 : 6);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === Platform.PHONE ? 5 : 10);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025$1.getExpressiveNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025$1.getExpressiveNeutralChroma(sourceColorHct, isDark, platform));\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025$1.getVibrantNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025$1.getVibrantNeutralChroma(sourceColorHct, platform));\n\t\t\tdefault: return super.getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n\tgetNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === Platform.PHONE ? 1.4 : 6) * 2.2);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === Platform.PHONE ? 5 : 10) * 1.7);\n\t\t\tcase Variant.EXPRESSIVE:\n\t\t\t\tconst expressiveNeutralHue = DynamicSchemePalettesDelegateImpl2025$1.getExpressiveNeutralHue(sourceColorHct);\n\t\t\t\tconst expressiveNeutralChroma = DynamicSchemePalettesDelegateImpl2025$1.getExpressiveNeutralChroma(sourceColorHct, isDark, platform);\n\t\t\t\treturn TonalPalette.fromHueAndChroma(expressiveNeutralHue, expressiveNeutralChroma * (expressiveNeutralHue >= 105 && expressiveNeutralHue < 125 ? 1.6 : 2.3));\n\t\t\tcase Variant.VIBRANT:\n\t\t\t\tconst vibrantNeutralHue = DynamicSchemePalettesDelegateImpl2025$1.getVibrantNeutralHue(sourceColorHct);\n\t\t\t\tconst vibrantNeutralChroma = DynamicSchemePalettesDelegateImpl2025$1.getVibrantNeutralChroma(sourceColorHct, platform);\n\t\t\t\treturn TonalPalette.fromHueAndChroma(vibrantNeutralHue, vibrantNeutralChroma * 1.29);\n\t\t\tdefault: return super.getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n\tgetErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n\t\tconst errorHue = DynamicScheme.getPiecewiseHue(sourceColorHct, [\n\t\t\t0,\n\t\t\t3,\n\t\t\t13,\n\t\t\t23,\n\t\t\t33,\n\t\t\t43,\n\t\t\t153,\n\t\t\t273,\n\t\t\t360\n\t\t], [\n\t\t\t12,\n\t\t\t22,\n\t\t\t32,\n\t\t\t12,\n\t\t\t22,\n\t\t\t32,\n\t\t\t22,\n\t\t\t12\n\t\t]);\n\t\tswitch (variant) {\n\t\t\tcase Variant.NEUTRAL: return TonalPalette.fromHueAndChroma(errorHue, platform === Platform.PHONE ? 50 : 40);\n\t\t\tcase Variant.TONAL_SPOT: return TonalPalette.fromHueAndChroma(errorHue, platform === Platform.PHONE ? 60 : 48);\n\t\t\tcase Variant.EXPRESSIVE: return TonalPalette.fromHueAndChroma(errorHue, platform === Platform.PHONE ? 64 : 48);\n\t\t\tcase Variant.VIBRANT: return TonalPalette.fromHueAndChroma(errorHue, platform === Platform.PHONE ? 80 : 60);\n\t\t\tdefault: return super.getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n\t\t}\n\t}\n};\nconst spec2021 = new DynamicSchemePalettesDelegateImpl2021();\nconst spec2025 = new DynamicSchemePalettesDelegateImpl2025();\n/**\n* Returns the DynamicSchemePalettesDelegate for the given spec version.\n*/\nfunction getSpec(specVersion) {\n\treturn specVersion === \"2025\" ? spec2025 : spec2021;\n}\n/**\n* An intermediate concept between the key color for a UI theme, and a full\n* color scheme. 5 sets of tones are generated, all except one use the same hue\n* as the key color, and all vary in chroma.\n*\n* @deprecated Use {@link DynamicScheme} for color scheme generation.\n* Use {@link CorePalettes} for core palettes container class.\n*/\nvar CorePalette = class CorePalette$1 {\n\ta1;\n\ta2;\n\ta3;\n\tn1;\n\tn2;\n\terror;\n\t/**\n\t* @param argb ARGB representation of a color\n\t*\n\t* @deprecated Use {@link DynamicScheme} for color scheme generation.\n\t* Use {@link CorePalettes} for core palettes container class.\n\t*/\n\tstatic of(argb) {\n\t\treturn new CorePalette$1(argb, false);\n\t}\n\t/**\n\t* @param argb ARGB representation of a color\n\t*\n\t* @deprecated Use {@link DynamicScheme} for color scheme generation.\n\t* Use {@link CorePalettes} for core palettes container class.\n\t*/\n\tstatic contentOf(argb) {\n\t\treturn new CorePalette$1(argb, true);\n\t}\n\t/**\n\t* Create a [CorePalette] from a set of colors\n\t*\n\t* @deprecated Use {@link DynamicScheme} for color scheme generation.\n\t* Use {@link CorePalettes} for core palettes container class.\n\t*/\n\tstatic fromColors(colors) {\n\t\treturn CorePalette$1.createPaletteFromColors(false, colors);\n\t}\n\t/**\n\t* Create a content [CorePalette] from a set of colors\n\t*\n\t* @deprecated Use {@link DynamicScheme} for color scheme generation.\n\t* Use {@link CorePalettes} for core palettes container class.\n\t*/\n\tstatic contentFromColors(colors) {\n\t\treturn CorePalette$1.createPaletteFromColors(true, colors);\n\t}\n\tstatic createPaletteFromColors(content, colors) {\n\t\tconst palette = new CorePalette$1(colors.primary, content);\n\t\tif (colors.secondary) {\n\t\t\tconst p = new CorePalette$1(colors.secondary, content);\n\t\t\tpalette.a2 = p.a1;\n\t\t}\n\t\tif (colors.tertiary) {\n\t\t\tconst p = new CorePalette$1(colors.tertiary, content);\n\t\t\tpalette.a3 = p.a1;\n\t\t}\n\t\tif (colors.error) {\n\t\t\tconst p = new CorePalette$1(colors.error, content);\n\t\t\tpalette.error = p.a1;\n\t\t}\n\t\tif (colors.neutral) {\n\t\t\tconst p = new CorePalette$1(colors.neutral, content);\n\t\t\tpalette.n1 = p.n1;\n\t\t}\n\t\tif (colors.neutralVariant) {\n\t\t\tconst p = new CorePalette$1(colors.neutralVariant, content);\n\t\t\tpalette.n2 = p.n2;\n\t\t}\n\t\treturn palette;\n\t}\n\tconstructor(argb, isContent) {\n\t\tconst hct = Hct.fromInt(argb);\n\t\tconst hue = hct.hue;\n\t\tconst chroma = hct.chroma;\n\t\tif (isContent) {\n\t\t\tthis.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n\t\t\tthis.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n\t\t\tthis.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n\t\t\tthis.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n\t\t\tthis.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n\t\t} else {\n\t\t\tthis.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n\t\t\tthis.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n\t\t\tthis.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n\t\t\tthis.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n\t\t\tthis.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n\t\t}\n\t\tthis.error = TonalPalette.fromHueAndChroma(25, 84);\n\t}\n};\n/**\n* Comprises foundational palettes to build a color scheme. Generated from a\n* source color, these palettes will then be part of a [DynamicScheme] together\n* with appearance preferences.\n*/\nvar CorePalettes = class {\n\tconstructor(primary, secondary, tertiary, neutral, neutralVariant) {\n\t\tthis.primary = primary;\n\t\tthis.secondary = secondary;\n\t\tthis.tertiary = tertiary;\n\t\tthis.neutral = neutral;\n\t\tthis.neutralVariant = neutralVariant;\n\t}\n};\n/**\n* Provides conversions needed for K-Means quantization. Converting input to\n* points, and converting the final state of the K-Means algorithm to colors.\n*/\nvar LabPointProvider = class {\n\t/**\n\t* Convert a color represented in ARGB to a 3-element array of L*a*b*\n\t* coordinates of the color.\n\t*/\n\tfromInt(argb) {\n\t\treturn labFromArgb(argb);\n\t}\n\t/**\n\t* Convert a 3-element array to a color represented in ARGB.\n\t*/\n\ttoInt(point) {\n\t\treturn argbFromLab(point[0], point[1], point[2]);\n\t}\n\t/**\n\t* Standard CIE 1976 delta E formula also takes the square root, unneeded\n\t* here. This method is used by quantization algorithms to compare distance,\n\t* and the relative ordering is the same, with or without a square root.\n\t*\n\t* This relatively minor optimization is helpful because this method is\n\t* called at least once for each pixel in an image.\n\t*/\n\tdistance(from, to) {\n\t\tconst dL = from[0] - to[0];\n\t\tconst dA = from[1] - to[1];\n\t\tconst dB = from[2] - to[2];\n\t\treturn dL * dL + dA * dA + dB * dB;\n\t}\n};\nconst MAX_ITERATIONS = 10;\nconst MIN_MOVEMENT_DISTANCE = 3;\n/**\n* An image quantizer that improves on the speed of a standard K-Means algorithm\n* by implementing several optimizations, including deduping identical pixels\n* and a triangle inequality rule that reduces the number of comparisons needed\n* to identify which cluster a point should be moved to.\n*\n* Wsmeans stands for Weighted Square Means.\n*\n* This algorithm was designed by M. Emre Celebi, and was found in their 2011\n* paper, Improving the Performance of K-Means for Color Quantization.\n* https://arxiv.org/abs/1101.0395\n*/\nvar QuantizerWsmeans = class {\n\t/**\n\t* @param inputPixels Colors in ARGB format.\n\t* @param startingClusters Defines the initial state of the quantizer. Passing\n\t* an empty array is fine, the implementation will create its own initial\n\t* state that leads to reproducible results for the same inputs.\n\t* Passing an array that is the result of Wu quantization leads to higher\n\t* quality results.\n\t* @param maxColors The number of colors to divide the image into. A lower\n\t* number of colors may be returned.\n\t* @return Colors in ARGB format.\n\t*/\n\tstatic quantize(inputPixels, startingClusters, maxColors) {\n\t\tconst pixelToCount = /* @__PURE__ */ new Map();\n\t\tconst points = new Array();\n\t\tconst pixels = new Array();\n\t\tconst pointProvider = new LabPointProvider();\n\t\tlet pointCount = 0;\n\t\tfor (let i = 0; i < inputPixels.length; i++) {\n\t\t\tconst inputPixel = inputPixels[i];\n\t\t\tconst pixelCount = pixelToCount.get(inputPixel);\n\t\t\tif (pixelCount === void 0) {\n\t\t\t\tpointCount++;\n\t\t\t\tpoints.push(pointProvider.fromInt(inputPixel));\n\t\t\t\tpixels.push(inputPixel);\n\t\t\t\tpixelToCount.set(inputPixel, 1);\n\t\t\t} else pixelToCount.set(inputPixel, pixelCount + 1);\n\t\t}\n\t\tconst counts = new Array();\n\t\tfor (let i = 0; i < pointCount; i++) {\n\t\t\tconst pixel = pixels[i];\n\t\t\tconst count = pixelToCount.get(pixel);\n\t\t\tif (count !== void 0) counts[i] = count;\n\t\t}\n\t\tlet clusterCount = Math.min(maxColors, pointCount);\n\t\tif (startingClusters.length > 0) clusterCount = Math.min(clusterCount, startingClusters.length);\n\t\tconst clusters = new Array();\n\t\tfor (let i = 0; i < startingClusters.length; i++) clusters.push(pointProvider.fromInt(startingClusters[i]));\n\t\tconst additionalClustersNeeded = clusterCount - clusters.length;\n\t\tif (startingClusters.length === 0 && additionalClustersNeeded > 0) for (let i = 0; i < additionalClustersNeeded; i++) {\n\t\t\tconst l = Math.random() * 100;\n\t\t\tconst a = Math.random() * 201 + -100;\n\t\t\tconst b = Math.random() * 201 + -100;\n\t\t\tclusters.push(new Array(l, a, b));\n\t\t}\n\t\tconst clusterIndices = new Array();\n\t\tfor (let i = 0; i < pointCount; i++) clusterIndices.push(Math.floor(Math.random() * clusterCount));\n\t\tconst indexMatrix = new Array();\n\t\tfor (let i = 0; i < clusterCount; i++) {\n\t\t\tindexMatrix.push(new Array());\n\t\t\tfor (let j = 0; j < clusterCount; j++) indexMatrix[i].push(0);\n\t\t}\n\t\tconst distanceToIndexMatrix = new Array();\n\t\tfor (let i = 0; i < clusterCount; i++) {\n\t\t\tdistanceToIndexMatrix.push(new Array());\n\t\t\tfor (let j = 0; j < clusterCount; j++) distanceToIndexMatrix[i].push(new DistanceAndIndex());\n\t\t}\n\t\tconst pixelCountSums = new Array();\n\t\tfor (let i = 0; i < clusterCount; i++) pixelCountSums.push(0);\n\t\tfor (let iteration = 0; iteration < MAX_ITERATIONS; iteration++) {\n\t\t\tfor (let i = 0; i < clusterCount; i++) {\n\t\t\t\tfor (let j = i + 1; j < clusterCount; j++) {\n\t\t\t\t\tconst distance = pointProvider.distance(clusters[i], clusters[j]);\n\t\t\t\t\tdistanceToIndexMatrix[j][i].distance = distance;\n\t\t\t\t\tdistanceToIndexMatrix[j][i].index = i;\n\t\t\t\t\tdistanceToIndexMatrix[i][j].distance = distance;\n\t\t\t\t\tdistanceToIndexMatrix[i][j].index = j;\n\t\t\t\t}\n\t\t\t\tdistanceToIndexMatrix[i].sort();\n\t\t\t\tfor (let j = 0; j < clusterCount; j++) indexMatrix[i][j] = distanceToIndexMatrix[i][j].index;\n\t\t\t}\n\t\t\tlet pointsMoved = 0;\n\t\t\tfor (let i = 0; i < pointCount; i++) {\n\t\t\t\tconst point = points[i];\n\t\t\t\tconst previousClusterIndex = clusterIndices[i];\n\t\t\t\tconst previousCluster = clusters[previousClusterIndex];\n\t\t\t\tconst previousDistance = pointProvider.distance(point, previousCluster);\n\t\t\t\tlet minimumDistance = previousDistance;\n\t\t\t\tlet newClusterIndex = -1;\n\t\t\t\tfor (let j = 0; j < clusterCount; j++) {\n\t\t\t\t\tif (distanceToIndexMatrix[previousClusterIndex][j].distance >= 4 * previousDistance) continue;\n\t\t\t\t\tconst distance = pointProvider.distance(point, clusters[j]);\n\t\t\t\t\tif (distance < minimumDistance) {\n\t\t\t\t\t\tminimumDistance = distance;\n\t\t\t\t\t\tnewClusterIndex = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (newClusterIndex !== -1) {\n\t\t\t\t\tconst distanceChange = Math.abs(Math.sqrt(minimumDistance) - Math.sqrt(previousDistance));\n\t\t\t\t\tif (distanceChange > MIN_MOVEMENT_DISTANCE) {\n\t\t\t\t\t\tpointsMoved++;\n\t\t\t\t\t\tclusterIndices[i] = newClusterIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pointsMoved === 0 && iteration !== 0) break;\n\t\t\tconst componentASums = new Array(clusterCount).fill(0);\n\t\t\tconst componentBSums = new Array(clusterCount).fill(0);\n\t\t\tconst componentCSums = new Array(clusterCount).fill(0);\n\t\t\tfor (let i = 0; i < clusterCount; i++) pixelCountSums[i] = 0;\n\t\t\tfor (let i = 0; i < pointCount; i++) {\n\t\t\t\tconst clusterIndex = clusterIndices[i];\n\t\t\t\tconst point = points[i];\n\t\t\t\tconst count = counts[i];\n\t\t\t\tpixelCountSums[clusterIndex] += count;\n\t\t\t\tcomponentASums[clusterIndex] += point[0] * count;\n\t\t\t\tcomponentBSums[clusterIndex] += point[1] * count;\n\t\t\t\tcomponentCSums[clusterIndex] += point[2] * count;\n\t\t\t}\n\t\t\tfor (let i = 0; i < clusterCount; i++) {\n\t\t\t\tconst count = pixelCountSums[i];\n\t\t\t\tif (count === 0) {\n\t\t\t\t\tclusters[i] = [\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t0\n\t\t\t\t\t];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst a = componentASums[i] / count;\n\t\t\t\tconst b = componentBSums[i] / count;\n\t\t\t\tconst c = componentCSums[i] / count;\n\t\t\t\tclusters[i] = [\n\t\t\t\t\ta,\n\t\t\t\t\tb,\n\t\t\t\t\tc\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\tconst argbToPopulation = /* @__PURE__ */ new Map();\n\t\tfor (let i = 0; i < clusterCount; i++) {\n\t\t\tconst count = pixelCountSums[i];\n\t\t\tif (count === 0) continue;\n\t\t\tconst possibleNewCluster = pointProvider.toInt(clusters[i]);\n\t\t\tif (argbToPopulation.has(possibleNewCluster)) continue;\n\t\t\targbToPopulation.set(possibleNewCluster, count);\n\t\t}\n\t\treturn argbToPopulation;\n\t}\n};\n/**\n* A wrapper for maintaining a table of distances between K-Means clusters.\n*/\nvar DistanceAndIndex = class {\n\tdistance = -1;\n\tindex = -1;\n};\n/**\n* Quantizes an image into a map, with keys of ARGB colors, and values of the\n* number of times that color appears in the image.\n*/\nvar QuantizerMap = class {\n\t/**\n\t* @param pixels Colors in ARGB format.\n\t* @return A Map with keys of ARGB colors, and values of the number of times\n\t* the color appears in the image.\n\t*/\n\tstatic quantize(pixels) {\n\t\tconst countByColor = /* @__PURE__ */ new Map();\n\t\tfor (let i = 0; i < pixels.length; i++) {\n\t\t\tconst pixel = pixels[i];\n\t\t\tconst alpha = alphaFromArgb(pixel);\n\t\t\tif (alpha < 255) continue;\n\t\t\tcountByColor.set(pixel, (countByColor.get(pixel) ?? 0) + 1);\n\t\t}\n\t\treturn countByColor;\n\t}\n};\nconst INDEX_BITS = 5;\nconst SIDE_LENGTH = 33;\nconst TOTAL_SIZE = 35937;\nconst directions = {\n\tRED: \"red\",\n\tGREEN: \"green\",\n\tBLUE: \"blue\"\n};\n/**\n* An image quantizer that divides the image's pixels into clusters by\n* recursively cutting an RGB cube, based on the weight of pixels in each area\n* of the cube.\n*\n* The algorithm was described by Xiaolin Wu in Graphic Gems II, published in\n* 1991.\n*/\nvar QuantizerWu = class {\n\tconstructor(weights = [], momentsR = [], momentsG = [], momentsB = [], moments = [], cubes = []) {\n\t\tthis.weights = weights;\n\t\tthis.momentsR = momentsR;\n\t\tthis.momentsG = momentsG;\n\t\tthis.momentsB = momentsB;\n\t\tthis.moments = moments;\n\t\tthis.cubes = cubes;\n\t}\n\t/**\n\t* @param pixels Colors in ARGB format.\n\t* @param maxColors The number of colors to divide the image into. A lower\n\t* number of colors may be returned.\n\t* @return Colors in ARGB format.\n\t*/\n\tquantize(pixels, maxColors) {\n\t\tthis.constructHistogram(pixels);\n\t\tthis.computeMoments();\n\t\tconst createBoxesResult = this.createBoxes(maxColors);\n\t\tconst results = this.createResult(createBoxesResult.resultCount);\n\t\treturn results;\n\t}\n\tconstructHistogram(pixels) {\n\t\tthis.weights = Array.from({ length: TOTAL_SIZE }).fill(0);\n\t\tthis.momentsR = Array.from({ length: TOTAL_SIZE }).fill(0);\n\t\tthis.momentsG = Array.from({ length: TOTAL_SIZE }).fill(0);\n\t\tthis.momentsB = Array.from({ length: TOTAL_SIZE }).fill(0);\n\t\tthis.moments = Array.from({ length: TOTAL_SIZE }).fill(0);\n\t\tconst countByColor = QuantizerMap.quantize(pixels);\n\t\tfor (const [pixel, count] of countByColor.entries()) {\n\t\t\tconst red = redFromArgb(pixel);\n\t\t\tconst green = greenFromArgb(pixel);\n\t\t\tconst blue = blueFromArgb(pixel);\n\t\t\tconst bitsToRemove = 8 - INDEX_BITS;\n\t\t\tconst iR = (red >> bitsToRemove) + 1;\n\t\t\tconst iG = (green >> bitsToRemove) + 1;\n\t\t\tconst iB = (blue >> bitsToRemove) + 1;\n\t\t\tconst index = this.getIndex(iR, iG, iB);\n\t\t\tthis.weights[index] = (this.weights[index] ?? 0) + count;\n\t\t\tthis.momentsR[index] += count * red;\n\t\t\tthis.momentsG[index] += count * green;\n\t\t\tthis.momentsB[index] += count * blue;\n\t\t\tthis.moments[index] += count * (red * red + green * green + blue * blue);\n\t\t}\n\t}\n\tcomputeMoments() {\n\t\tfor (let r = 1; r < SIDE_LENGTH; r++) {\n\t\t\tconst area = Array.from({ length: SIDE_LENGTH }).fill(0);\n\t\t\tconst areaR = Array.from({ length: SIDE_LENGTH }).fill(0);\n\t\t\tconst areaG = Array.from({ length: SIDE_LENGTH }).fill(0);\n\t\t\tconst areaB = Array.from({ length: SIDE_LENGTH }).fill(0);\n\t\t\tconst area2 = Array.from({ length: SIDE_LENGTH }).fill(0);\n\t\t\tfor (let g = 1; g < SIDE_LENGTH; g++) {\n\t\t\t\tlet line = 0;\n\t\t\t\tlet lineR = 0;\n\t\t\t\tlet lineG = 0;\n\t\t\t\tlet lineB = 0;\n\t\t\t\tlet line2 = 0;\n\t\t\t\tfor (let b = 1; b < SIDE_LENGTH; b++) {\n\t\t\t\t\tconst index = this.getIndex(r, g, b);\n\t\t\t\t\tline += this.weights[index];\n\t\t\t\t\tlineR += this.momentsR[index];\n\t\t\t\t\tlineG += this.momentsG[index];\n\t\t\t\t\tlineB += this.momentsB[index];\n\t\t\t\t\tline2 += this.moments[index];\n\t\t\t\t\tarea[b] += line;\n\t\t\t\t\tareaR[b] += lineR;\n\t\t\t\t\tareaG[b] += lineG;\n\t\t\t\t\tareaB[b] += lineB;\n\t\t\t\t\tarea2[b] += line2;\n\t\t\t\t\tconst previousIndex = this.getIndex(r - 1, g, b);\n\t\t\t\t\tthis.weights[index] = this.weights[previousIndex] + area[b];\n\t\t\t\t\tthis.momentsR[index] = this.momentsR[previousIndex] + areaR[b];\n\t\t\t\t\tthis.momentsG[index] = this.momentsG[previousIndex] + areaG[b];\n\t\t\t\t\tthis.momentsB[index] = this.momentsB[previousIndex] + areaB[b];\n\t\t\t\t\tthis.moments[index] = this.moments[previousIndex] + area2[b];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcreateBoxes(maxColors) {\n\t\tthis.cubes = Array.from({ length: maxColors }).fill(0).map(() => new Box());\n\t\tconst volumeVariance = Array.from({ length: maxColors }).fill(0);\n\t\tthis.cubes[0].r0 = 0;\n\t\tthis.cubes[0].g0 = 0;\n\t\tthis.cubes[0].b0 = 0;\n\t\tthis.cubes[0].r1 = SIDE_LENGTH - 1;\n\t\tthis.cubes[0].g1 = SIDE_LENGTH - 1;\n\t\tthis.cubes[0].b1 = SIDE_LENGTH - 1;\n\t\tlet generatedColorCount = maxColors;\n\t\tlet next = 0;\n\t\tfor (let i = 1; i < maxColors; i++) {\n\t\t\tif (this.cut(this.cubes[next], this.cubes[i])) {\n\t\t\t\tvolumeVariance[next] = this.cubes[next].vol > 1 ? this.variance(this.cubes[next]) : 0;\n\t\t\t\tvolumeVariance[i] = this.cubes[i].vol > 1 ? this.variance(this.cubes[i]) : 0;\n\t\t\t} else {\n\t\t\t\tvolumeVariance[next] = 0;\n\t\t\t\ti--;\n\t\t\t}\n\t\t\tnext = 0;\n\t\t\tlet temp = volumeVariance[0];\n\t\t\tfor (let j = 1; j <= i; j++) if (volumeVariance[j] > temp) {\n\t\t\t\ttemp = volumeVariance[j];\n\t\t\t\tnext = j;\n\t\t\t}\n\t\t\tif (temp <= 0) {\n\t\t\t\tgeneratedColorCount = i + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn new CreateBoxesResult(maxColors, generatedColorCount);\n\t}\n\tcreateResult(colorCount) {\n\t\tconst colors = [];\n\t\tfor (let i = 0; i < colorCount; ++i) {\n\t\t\tconst cube = this.cubes[i];\n\t\t\tconst weight = this.volume(cube, this.weights);\n\t\t\tif (weight > 0) {\n\t\t\t\tconst r = Math.round(this.volume(cube, this.momentsR) / weight);\n\t\t\t\tconst g = Math.round(this.volume(cube, this.momentsG) / weight);\n\t\t\t\tconst b = Math.round(this.volume(cube, this.momentsB) / weight);\n\t\t\t\tconst color = 255 << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;\n\t\t\t\tcolors.push(color);\n\t\t\t}\n\t\t}\n\t\treturn colors;\n\t}\n\tvariance(cube) {\n\t\tconst dr = this.volume(cube, this.momentsR);\n\t\tconst dg = this.volume(cube, this.momentsG);\n\t\tconst db = this.volume(cube, this.momentsB);\n\t\tconst xx = this.moments[this.getIndex(cube.r1, cube.g1, cube.b1)] - this.moments[this.getIndex(cube.r1, cube.g1, cube.b0)] - this.moments[this.getIndex(cube.r1, cube.g0, cube.b1)] + this.moments[this.getIndex(cube.r1, cube.g0, cube.b0)] - this.moments[this.getIndex(cube.r0, cube.g1, cube.b1)] + this.moments[this.getIndex(cube.r0, cube.g1, cube.b0)] + this.moments[this.getIndex(cube.r0, cube.g0, cube.b1)] - this.moments[this.getIndex(cube.r0, cube.g0, cube.b0)];\n\t\tconst hypotenuse = dr * dr + dg * dg + db * db;\n\t\tconst volume = this.volume(cube, this.weights);\n\t\treturn xx - hypotenuse / volume;\n\t}\n\tcut(one, two) {\n\t\tconst wholeR = this.volume(one, this.momentsR);\n\t\tconst wholeG = this.volume(one, this.momentsG);\n\t\tconst wholeB = this.volume(one, this.momentsB);\n\t\tconst wholeW = this.volume(one, this.weights);\n\t\tconst maxRResult = this.maximize(one, directions.RED, one.r0 + 1, one.r1, wholeR, wholeG, wholeB, wholeW);\n\t\tconst maxGResult = this.maximize(one, directions.GREEN, one.g0 + 1, one.g1, wholeR, wholeG, wholeB, wholeW);\n\t\tconst maxBResult = this.maximize(one, directions.BLUE, one.b0 + 1, one.b1, wholeR, wholeG, wholeB, wholeW);\n\t\tlet direction;\n\t\tconst maxR = maxRResult.maximum;\n\t\tconst maxG = maxGResult.maximum;\n\t\tconst maxB = maxBResult.maximum;\n\t\tif (maxR >= maxG && maxR >= maxB) {\n\t\t\tif (maxRResult.cutLocation < 0) return false;\n\t\t\tdirection = directions.RED;\n\t\t} else if (maxG >= maxR && maxG >= maxB) direction = directions.GREEN;\n\t\telse direction = directions.BLUE;\n\t\ttwo.r1 = one.r1;\n\t\ttwo.g1 = one.g1;\n\t\ttwo.b1 = one.b1;\n\t\tswitch (direction) {\n\t\t\tcase directions.RED:\n\t\t\t\tone.r1 = maxRResult.cutLocation;\n\t\t\t\ttwo.r0 = one.r1;\n\t\t\t\ttwo.g0 = one.g0;\n\t\t\t\ttwo.b0 = one.b0;\n\t\t\t\tbreak;\n\t\t\tcase directions.GREEN:\n\t\t\t\tone.g1 = maxGResult.cutLocation;\n\t\t\t\ttwo.r0 = one.r0;\n\t\t\t\ttwo.g0 = one.g1;\n\t\t\t\ttwo.b0 = one.b0;\n\t\t\t\tbreak;\n\t\t\tcase directions.BLUE:\n\t\t\t\tone.b1 = maxBResult.cutLocation;\n\t\t\t\ttwo.r0 = one.r0;\n\t\t\t\ttwo.g0 = one.g0;\n\t\t\t\ttwo.b0 = one.b1;\n\t\t\t\tbreak;\n\t\t\tdefault: throw new Error(\"unexpected direction \" + direction);\n\t\t}\n\t\tone.vol = (one.r1 - one.r0) * (one.g1 - one.g0) * (one.b1 - one.b0);\n\t\ttwo.vol = (two.r1 - two.r0) * (two.g1 - two.g0) * (two.b1 - two.b0);\n\t\treturn true;\n\t}\n\tmaximize(cube, direction, first, last, wholeR, wholeG, wholeB, wholeW) {\n\t\tconst bottomR = this.bottom(cube, direction, this.momentsR);\n\t\tconst bottomG = this.bottom(cube, direction, this.momentsG);\n\t\tconst bottomB = this.bottom(cube, direction, this.momentsB);\n\t\tconst bottomW = this.bottom(cube, direction, this.weights);\n\t\tlet max = 0;\n\t\tlet cut = -1;\n\t\tlet halfR = 0;\n\t\tlet halfG = 0;\n\t\tlet halfB = 0;\n\t\tlet halfW = 0;\n\t\tfor (let i = first; i < last; i++) {\n\t\t\thalfR = bottomR + this.top(cube, direction, i, this.momentsR);\n\t\t\thalfG = bottomG + this.top(cube, direction, i, this.momentsG);\n\t\t\thalfB = bottomB + this.top(cube, direction, i, this.momentsB);\n\t\t\thalfW = bottomW + this.top(cube, direction, i, this.weights);\n\t\t\tif (halfW === 0) continue;\n\t\t\tlet tempNumerator = (halfR * halfR + halfG * halfG + halfB * halfB) * 1;\n\t\t\tlet tempDenominator = halfW * 1;\n\t\t\tlet temp = tempNumerator / tempDenominator;\n\t\t\thalfR = wholeR - halfR;\n\t\t\thalfG = wholeG - halfG;\n\t\t\thalfB = wholeB - halfB;\n\t\t\thalfW = wholeW - halfW;\n\t\t\tif (halfW === 0) continue;\n\t\t\ttempNumerator = (halfR * halfR + halfG * halfG + halfB * halfB) * 1;\n\t\t\ttempDenominator = halfW * 1;\n\t\t\ttemp += tempNumerator / tempDenominator;\n\t\t\tif (temp > max) {\n\t\t\t\tmax = temp;\n\t\t\t\tcut = i;\n\t\t\t}\n\t\t}\n\t\treturn new MaximizeResult(cut, max);\n\t}\n\tvolume(cube, moment) {\n\t\treturn moment[this.getIndex(cube.r1, cube.g1, cube.b1)] - moment[this.getIndex(cube.r1, cube.g1, cube.b0)] - moment[this.getIndex(cube.r1, cube.g0, cube.b1)] + moment[this.getIndex(cube.r1, cube.g0, cube.b0)] - moment[this.getIndex(cube.r0, cube.g1, cube.b1)] + moment[this.getIndex(cube.r0, cube.g1, cube.b0)] + moment[this.getIndex(cube.r0, cube.g0, cube.b1)] - moment[this.getIndex(cube.r0, cube.g0, cube.b0)];\n\t}\n\tbottom(cube, direction, moment) {\n\t\tswitch (direction) {\n\t\t\tcase directions.RED: return -moment[this.getIndex(cube.r0, cube.g1, cube.b1)] + moment[this.getIndex(cube.r0, cube.g1, cube.b0)] + moment[this.getIndex(cube.r0, cube.g0, cube.b1)] - moment[this.getIndex(cube.r0, cube.g0, cube.b0)];\n\t\t\tcase directions.GREEN: return -moment[this.getIndex(cube.r1, cube.g0, cube.b1)] + moment[this.getIndex(cube.r1, cube.g0, cube.b0)] + moment[this.getIndex(cube.r0, cube.g0, cube.b1)] - moment[this.getIndex(cube.r0, cube.g0, cube.b0)];\n\t\t\tcase directions.BLUE: return -moment[this.getIndex(cube.r1, cube.g1, cube.b0)] + moment[this.getIndex(cube.r1, cube.g0, cube.b0)] + moment[this.getIndex(cube.r0, cube.g1, cube.b0)] - moment[this.getIndex(cube.r0, cube.g0, cube.b0)];\n\t\t\tdefault: throw new Error(\"unexpected direction $direction\");\n\t\t}\n\t}\n\ttop(cube, direction, position, moment) {\n\t\tswitch (direction) {\n\t\t\tcase directions.RED: return moment[this.getIndex(position, cube.g1, cube.b1)] - moment[this.getIndex(position, cube.g1, cube.b0)] - moment[this.getIndex(position, cube.g0, cube.b1)] + moment[this.getIndex(position, cube.g0, cube.b0)];\n\t\t\tcase directions.GREEN: return moment[this.getIndex(cube.r1, position, cube.b1)] - moment[this.getIndex(cube.r1, position, cube.b0)] - moment[this.getIndex(cube.r0, position, cube.b1)] + moment[this.getIndex(cube.r0, position, cube.b0)];\n\t\t\tcase directions.BLUE: return moment[this.getIndex(cube.r1, cube.g1, position)] - moment[this.getIndex(cube.r1, cube.g0, position)] - moment[this.getIndex(cube.r0, cube.g1, position)] + moment[this.getIndex(cube.r0, cube.g0, position)];\n\t\t\tdefault: throw new Error(\"unexpected direction $direction\");\n\t\t}\n\t}\n\tgetIndex(r, g, b) {\n\t\treturn (r << INDEX_BITS * 2) + (r << INDEX_BITS + 1) + r + (g << INDEX_BITS) + g + b;\n\t}\n};\n/**\n* Keeps track of the state of each box created as the Wu quantization\n* algorithm progresses through dividing the image's pixels as plotted in RGB.\n*/\nvar Box = class {\n\tconstructor(r0 = 0, r1 = 0, g0 = 0, g1 = 0, b0 = 0, b1 = 0, vol = 0) {\n\t\tthis.r0 = r0;\n\t\tthis.r1 = r1;\n\t\tthis.g0 = g0;\n\t\tthis.g1 = g1;\n\t\tthis.b0 = b0;\n\t\tthis.b1 = b1;\n\t\tthis.vol = vol;\n\t}\n};\n/**\n* Represents final result of Wu algorithm.\n*/\nvar CreateBoxesResult = class {\n\t/**\n\t* @param requestedCount how many colors the caller asked to be returned from\n\t* quantization.\n\t* @param resultCount the actual number of colors achieved from quantization.\n\t* May be lower than the requested count.\n\t*/\n\tconstructor(requestedCount, resultCount) {\n\t\tthis.requestedCount = requestedCount;\n\t\tthis.resultCount = resultCount;\n\t}\n};\n/**\n* Represents the result of calculating where to cut an existing box in such\n* a way to maximize variance between the two new boxes created by a cut.\n*/\nvar MaximizeResult = class {\n\tconstructor(cutLocation, maximum) {\n\t\tthis.cutLocation = cutLocation;\n\t\tthis.maximum = maximum;\n\t}\n};\n/**\n* An image quantizer that improves on the quality of a standard K-Means\n* algorithm by setting the K-Means initial state to the output of a Wu\n* quantizer, instead of random centroids. Improves on speed by several\n* optimizations, as implemented in Wsmeans, or Weighted Square Means, K-Means\n* with those optimizations.\n*\n* This algorithm was designed by M. Emre Celebi, and was found in their 2011\n* paper, Improving the Performance of K-Means for Color Quantization.\n* https://arxiv.org/abs/1101.0395\n*/\nvar QuantizerCelebi = class {\n\t/**\n\t* @param pixels Colors in ARGB format.\n\t* @param maxColors The number of colors to divide the image into. A lower\n\t* number of colors may be returned.\n\t* @return Map with keys of colors in ARGB format, and values of number of\n\t* pixels in the original image that correspond to the color in the\n\t* quantized image.\n\t*/\n\tstatic quantize(pixels, maxColors) {\n\t\tconst wu = new QuantizerWu();\n\t\tconst wuResult = wu.quantize(pixels, maxColors);\n\t\treturn QuantizerWsmeans.quantize(pixels, wuResult, maxColors);\n\t}\n};\n/**\n* Represents an Android 12 color scheme, a mapping of color roles to colors.\n*/\nvar SchemeAndroid = class SchemeAndroid$1 {\n\tget colorAccentPrimary() {\n\t\treturn this.props.colorAccentPrimary;\n\t}\n\tget colorAccentPrimaryVariant() {\n\t\treturn this.props.colorAccentPrimaryVariant;\n\t}\n\tget colorAccentSecondary() {\n\t\treturn this.props.colorAccentSecondary;\n\t}\n\tget colorAccentSecondaryVariant() {\n\t\treturn this.props.colorAccentSecondaryVariant;\n\t}\n\tget colorAccentTertiary() {\n\t\treturn this.props.colorAccentTertiary;\n\t}\n\tget colorAccentTertiaryVariant() {\n\t\treturn this.props.colorAccentTertiaryVariant;\n\t}\n\tget textColorPrimary() {\n\t\treturn this.props.textColorPrimary;\n\t}\n\tget textColorSecondary() {\n\t\treturn this.props.textColorSecondary;\n\t}\n\tget textColorTertiary() {\n\t\treturn this.props.textColorTertiary;\n\t}\n\tget textColorPrimaryInverse() {\n\t\treturn this.props.textColorPrimaryInverse;\n\t}\n\tget textColorSecondaryInverse() {\n\t\treturn this.props.textColorSecondaryInverse;\n\t}\n\tget textColorTertiaryInverse() {\n\t\treturn this.props.textColorTertiaryInverse;\n\t}\n\tget colorBackground() {\n\t\treturn this.props.colorBackground;\n\t}\n\tget colorBackgroundFloating() {\n\t\treturn this.props.colorBackgroundFloating;\n\t}\n\tget colorSurface() {\n\t\treturn this.props.colorSurface;\n\t}\n\tget colorSurfaceVariant() {\n\t\treturn this.props.colorSurfaceVariant;\n\t}\n\tget colorSurfaceHighlight() {\n\t\treturn this.props.colorSurfaceHighlight;\n\t}\n\tget surfaceHeader() {\n\t\treturn this.props.surfaceHeader;\n\t}\n\tget underSurface() {\n\t\treturn this.props.underSurface;\n\t}\n\tget offState() {\n\t\treturn this.props.offState;\n\t}\n\tget accentSurface() {\n\t\treturn this.props.accentSurface;\n\t}\n\tget textPrimaryOnAccent() {\n\t\treturn this.props.textPrimaryOnAccent;\n\t}\n\tget textSecondaryOnAccent() {\n\t\treturn this.props.textSecondaryOnAccent;\n\t}\n\tget volumeBackground() {\n\t\treturn this.props.volumeBackground;\n\t}\n\tget scrim() {\n\t\treturn this.props.scrim;\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Light Material color scheme, based on the color's hue.\n\t*/\n\tstatic light(argb) {\n\t\tconst core = CorePalette.of(argb);\n\t\treturn SchemeAndroid$1.lightFromCorePalette(core);\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Dark Material color scheme, based on the color's hue.\n\t*/\n\tstatic dark(argb) {\n\t\tconst core = CorePalette.of(argb);\n\t\treturn SchemeAndroid$1.darkFromCorePalette(core);\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Light Android color scheme, based on the color's hue.\n\t*/\n\tstatic lightContent(argb) {\n\t\tconst core = CorePalette.contentOf(argb);\n\t\treturn SchemeAndroid$1.lightFromCorePalette(core);\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Dark Android color scheme, based on the color's hue.\n\t*/\n\tstatic darkContent(argb) {\n\t\tconst core = CorePalette.contentOf(argb);\n\t\treturn SchemeAndroid$1.darkFromCorePalette(core);\n\t}\n\t/**\n\t* Light scheme from core palette\n\t*/\n\tstatic lightFromCorePalette(core) {\n\t\treturn new SchemeAndroid$1({\n\t\t\tcolorAccentPrimary: core.a1.tone(90),\n\t\t\tcolorAccentPrimaryVariant: core.a1.tone(40),\n\t\t\tcolorAccentSecondary: core.a2.tone(90),\n\t\t\tcolorAccentSecondaryVariant: core.a2.tone(40),\n\t\t\tcolorAccentTertiary: core.a3.tone(90),\n\t\t\tcolorAccentTertiaryVariant: core.a3.tone(40),\n\t\t\ttextColorPrimary: core.n1.tone(10),\n\t\t\ttextColorSecondary: core.n2.tone(30),\n\t\t\ttextColorTertiary: core.n2.tone(50),\n\t\t\ttextColorPrimaryInverse: core.n1.tone(95),\n\t\t\ttextColorSecondaryInverse: core.n1.tone(80),\n\t\t\ttextColorTertiaryInverse: core.n1.tone(60),\n\t\t\tcolorBackground: core.n1.tone(95),\n\t\t\tcolorBackgroundFloating: core.n1.tone(98),\n\t\t\tcolorSurface: core.n1.tone(98),\n\t\t\tcolorSurfaceVariant: core.n1.tone(90),\n\t\t\tcolorSurfaceHighlight: core.n1.tone(100),\n\t\t\tsurfaceHeader: core.n1.tone(90),\n\t\t\tunderSurface: core.n1.tone(0),\n\t\t\toffState: core.n1.tone(20),\n\t\t\taccentSurface: core.a2.tone(95),\n\t\t\ttextPrimaryOnAccent: core.n1.tone(10),\n\t\t\ttextSecondaryOnAccent: core.n2.tone(30),\n\t\t\tvolumeBackground: core.n1.tone(25),\n\t\t\tscrim: core.n1.tone(80)\n\t\t});\n\t}\n\t/**\n\t* Dark scheme from core palette\n\t*/\n\tstatic darkFromCorePalette(core) {\n\t\treturn new SchemeAndroid$1({\n\t\t\tcolorAccentPrimary: core.a1.tone(90),\n\t\t\tcolorAccentPrimaryVariant: core.a1.tone(70),\n\t\t\tcolorAccentSecondary: core.a2.tone(90),\n\t\t\tcolorAccentSecondaryVariant: core.a2.tone(70),\n\t\t\tcolorAccentTertiary: core.a3.tone(90),\n\t\t\tcolorAccentTertiaryVariant: core.a3.tone(70),\n\t\t\ttextColorPrimary: core.n1.tone(95),\n\t\t\ttextColorSecondary: core.n2.tone(80),\n\t\t\ttextColorTertiary: core.n2.tone(60),\n\t\t\ttextColorPrimaryInverse: core.n1.tone(10),\n\t\t\ttextColorSecondaryInverse: core.n1.tone(30),\n\t\t\ttextColorTertiaryInverse: core.n1.tone(50),\n\t\t\tcolorBackground: core.n1.tone(10),\n\t\t\tcolorBackgroundFloating: core.n1.tone(10),\n\t\t\tcolorSurface: core.n1.tone(20),\n\t\t\tcolorSurfaceVariant: core.n1.tone(30),\n\t\t\tcolorSurfaceHighlight: core.n1.tone(35),\n\t\t\tsurfaceHeader: core.n1.tone(30),\n\t\t\tunderSurface: core.n1.tone(0),\n\t\t\toffState: core.n1.tone(20),\n\t\t\taccentSurface: core.a2.tone(95),\n\t\t\ttextPrimaryOnAccent: core.n1.tone(10),\n\t\t\ttextSecondaryOnAccent: core.n2.tone(30),\n\t\t\tvolumeBackground: core.n1.tone(25),\n\t\t\tscrim: core.n1.tone(80)\n\t\t});\n\t}\n\tconstructor(props) {\n\t\tthis.props = props;\n\t}\n\ttoJSON() {\n\t\treturn { ...this.props };\n\t}\n};\n/**\n* A scheme that places the source color in `Scheme.primaryContainer`.\n*\n* Primary Container is the source color, adjusted for color relativity.\n* It maintains constant appearance in light mode and dark mode.\n* This adds ~5 tone in light mode, and subtracts ~5 tone in dark mode.\n* Tertiary Container is the complement to the source color, using\n* `TemperatureCache`. It also maintains constant appearance.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeContent = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.CONTENT,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A Dynamic Color theme that is intentionally detached from the source color.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeExpressive = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.EXPRESSIVE,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A scheme that places the source color in `Scheme.primaryContainer`.\n*\n* Primary Container is the source color, adjusted for color relativity.\n* It maintains constant appearance in light mode and dark mode.\n* This adds ~5 tone in light mode, and subtracts ~5 tone in dark mode.\n* Tertiary Container is the complement to the source color, using\n* `TemperatureCache`. It also maintains constant appearance.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeFidelity = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.FIDELITY,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A playful theme - the source color's hue does not appear in the theme.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeFruitSalad = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.FRUIT_SALAD,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A Dynamic Color theme that is grayscale.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeMonochrome = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.MONOCHROME,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A Dynamic Color theme that is near grayscale.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeNeutral = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.NEUTRAL,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A playful theme - the source color's hue does not appear in the theme.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeRainbow = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.RAINBOW,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A Dynamic Color theme with low to medium colorfulness and a Tertiary\n* TonalPalette with a hue related to the source color.\n*\n* The default Material You theme on Android 12 and 13.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeTonalSpot = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.TONAL_SPOT,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* A Dynamic Color theme that maxes out colorfulness at each position in the\n* Primary Tonal Palette.\n*\n* @deprecated Use {@link DynamicScheme.from} instead.\n*/\nvar SchemeVibrant = class extends DynamicScheme {\n\tconstructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n\t\tsuper({\n\t\t\tsourceColorHct,\n\t\t\tvariant: Variant.VIBRANT,\n\t\t\tcontrastLevel,\n\t\t\tisDark,\n\t\t\tplatform,\n\t\t\tspecVersion\n\t\t});\n\t}\n};\n/**\n* DEPRECATED. The `Scheme` class is deprecated in favor of `DynamicScheme`.\n* Please see\n* https://github.com/material-foundation/material-color-utilities/blob/main/make_schemes.md\n* for migration guidance.\n*\n* Represents a Material color scheme, a mapping of color roles to colors.\n*/\nvar Scheme = class Scheme$1 {\n\tget primary() {\n\t\treturn this.props.primary;\n\t}\n\tget onPrimary() {\n\t\treturn this.props.onPrimary;\n\t}\n\tget primaryContainer() {\n\t\treturn this.props.primaryContainer;\n\t}\n\tget onPrimaryContainer() {\n\t\treturn this.props.onPrimaryContainer;\n\t}\n\tget secondary() {\n\t\treturn this.props.secondary;\n\t}\n\tget onSecondary() {\n\t\treturn this.props.onSecondary;\n\t}\n\tget secondaryContainer() {\n\t\treturn this.props.secondaryContainer;\n\t}\n\tget onSecondaryContainer() {\n\t\treturn this.props.onSecondaryContainer;\n\t}\n\tget tertiary() {\n\t\treturn this.props.tertiary;\n\t}\n\tget onTertiary() {\n\t\treturn this.props.onTertiary;\n\t}\n\tget tertiaryContainer() {\n\t\treturn this.props.tertiaryContainer;\n\t}\n\tget onTertiaryContainer() {\n\t\treturn this.props.onTertiaryContainer;\n\t}\n\tget error() {\n\t\treturn this.props.error;\n\t}\n\tget onError() {\n\t\treturn this.props.onError;\n\t}\n\tget errorContainer() {\n\t\treturn this.props.errorContainer;\n\t}\n\tget onErrorContainer() {\n\t\treturn this.props.onErrorContainer;\n\t}\n\tget background() {\n\t\treturn this.props.background;\n\t}\n\tget onBackground() {\n\t\treturn this.props.onBackground;\n\t}\n\tget surface() {\n\t\treturn this.props.surface;\n\t}\n\tget onSurface() {\n\t\treturn this.props.onSurface;\n\t}\n\tget surfaceVariant() {\n\t\treturn this.props.surfaceVariant;\n\t}\n\tget onSurfaceVariant() {\n\t\treturn this.props.onSurfaceVariant;\n\t}\n\tget outline() {\n\t\treturn this.props.outline;\n\t}\n\tget outlineVariant() {\n\t\treturn this.props.outlineVariant;\n\t}\n\tget shadow() {\n\t\treturn this.props.shadow;\n\t}\n\tget scrim() {\n\t\treturn this.props.scrim;\n\t}\n\tget inverseSurface() {\n\t\treturn this.props.inverseSurface;\n\t}\n\tget inverseOnSurface() {\n\t\treturn this.props.inverseOnSurface;\n\t}\n\tget inversePrimary() {\n\t\treturn this.props.inversePrimary;\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Light Material color scheme, based on the color's hue.\n\t*/\n\tstatic light(argb) {\n\t\treturn Scheme$1.lightFromCorePalette(CorePalette.of(argb));\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Dark Material color scheme, based on the color's hue.\n\t*/\n\tstatic dark(argb) {\n\t\treturn Scheme$1.darkFromCorePalette(CorePalette.of(argb));\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Light Material content color scheme, based on the color's hue.\n\t*/\n\tstatic lightContent(argb) {\n\t\treturn Scheme$1.lightFromCorePalette(CorePalette.contentOf(argb));\n\t}\n\t/**\n\t* @param argb ARGB representation of a color.\n\t* @return Dark Material content color scheme, based on the color's hue.\n\t*/\n\tstatic darkContent(argb) {\n\t\treturn Scheme$1.darkFromCorePalette(CorePalette.contentOf(argb));\n\t}\n\t/**\n\t* Light scheme from core palette\n\t*/\n\tstatic lightFromCorePalette(core) {\n\t\treturn new Scheme$1({\n\t\t\tprimary: core.a1.tone(40),\n\t\t\tonPrimary: core.a1.tone(100),\n\t\t\tprimaryContainer: core.a1.tone(90),\n\t\t\tonPrimaryContainer: core.a1.tone(10),\n\t\t\tsecondary: core.a2.tone(40),\n\t\t\tonSecondary: core.a2.tone(100),\n\t\t\tsecondaryContainer: core.a2.tone(90),\n\t\t\tonSecondaryContainer: core.a2.tone(10),\n\t\t\ttertiary: core.a3.tone(40),\n\t\t\tonTertiary: core.a3.tone(100),\n\t\t\ttertiaryContainer: core.a3.tone(90),\n\t\t\tonTertiaryContainer: core.a3.tone(10),\n\t\t\terror: core.error.tone(40),\n\t\t\tonError: core.error.tone(100),\n\t\t\terrorContainer: core.error.tone(90),\n\t\t\tonErrorContainer: core.error.tone(10),\n\t\t\tbackground: core.n1.tone(99),\n\t\t\tonBackground: core.n1.tone(10),\n\t\t\tsurface: core.n1.tone(99),\n\t\t\tonSurface: core.n1.tone(10),\n\t\t\tsurfaceVariant: core.n2.tone(90),\n\t\t\tonSurfaceVariant: core.n2.tone(30),\n\t\t\toutline: core.n2.tone(50),\n\t\t\toutlineVariant: core.n2.tone(80),\n\t\t\tshadow: core.n1.tone(0),\n\t\t\tscrim: core.n1.tone(0),\n\t\t\tinverseSurface: core.n1.tone(20),\n\t\t\tinverseOnSurface: core.n1.tone(95),\n\t\t\tinversePrimary: core.a1.tone(80)\n\t\t});\n\t}\n\t/**\n\t* Dark scheme from core palette\n\t*/\n\tstatic darkFromCorePalette(core) {\n\t\treturn new Scheme$1({\n\t\t\tprimary: core.a1.tone(80),\n\t\t\tonPrimary: core.a1.tone(20),\n\t\t\tprimaryContainer: core.a1.tone(30),\n\t\t\tonPrimaryContainer: core.a1.tone(90),\n\t\t\tsecondary: core.a2.tone(80),\n\t\t\tonSecondary: core.a2.tone(20),\n\t\t\tsecondaryContainer: core.a2.tone(30),\n\t\t\tonSecondaryContainer: core.a2.tone(90),\n\t\t\ttertiary: core.a3.tone(80),\n\t\t\tonTertiary: core.a3.tone(20),\n\t\t\ttertiaryContainer: core.a3.tone(30),\n\t\t\tonTertiaryContainer: core.a3.tone(90),\n\t\t\terror: core.error.tone(80),\n\t\t\tonError: core.error.tone(20),\n\t\t\terrorContainer: core.error.tone(30),\n\t\t\tonErrorContainer: core.error.tone(80),\n\t\t\tbackground: core.n1.tone(10),\n\t\t\tonBackground: core.n1.tone(90),\n\t\t\tsurface: core.n1.tone(10),\n\t\t\tonSurface: core.n1.tone(90),\n\t\t\tsurfaceVariant: core.n2.tone(30),\n\t\t\tonSurfaceVariant: core.n2.tone(80),\n\t\t\toutline: core.n2.tone(60),\n\t\t\toutlineVariant: core.n2.tone(30),\n\t\t\tshadow: core.n1.tone(0),\n\t\t\tscrim: core.n1.tone(0),\n\t\t\tinverseSurface: core.n1.tone(90),\n\t\t\tinverseOnSurface: core.n1.tone(20),\n\t\t\tinversePrimary: core.a1.tone(40)\n\t\t});\n\t}\n\tconstructor(props) {\n\t\tthis.props = props;\n\t}\n\ttoJSON() {\n\t\treturn { ...this.props };\n\t}\n};\nconst SCORE_OPTION_DEFAULTS = {\n\tdesired: 4,\n\tfallbackColorARGB: 4282549748,\n\tfilter: true\n};\nfunction compare(a, b) {\n\tif (a.score > b.score) return -1;\n\telse if (a.score < b.score) return 1;\n\treturn 0;\n}\n/**\n* Given a large set of colors, remove colors that are unsuitable for a UI\n* theme, and rank the rest based on suitability.\n*\n* Enables use of a high cluster count for image quantization, thus ensuring\n* colors aren't muddied, while curating the high cluster count to a much\n* smaller number of appropriate choices.\n*/\nvar Score = class Score$1 {\n\tstatic TARGET_CHROMA = 48;\n\tstatic WEIGHT_PROPORTION = .7;\n\tstatic WEIGHT_CHROMA_ABOVE = .3;\n\tstatic WEIGHT_CHROMA_BELOW = .1;\n\tstatic CUTOFF_CHROMA = 5;\n\tstatic CUTOFF_EXCITED_PROPORTION = .01;\n\tconstructor() {}\n\t/**\n\t* Given a map with keys of colors and values of how often the color appears,\n\t* rank the colors based on suitability for being used for a UI theme.\n\t*\n\t* @param colorsToPopulation map with keys of colors and values of how often\n\t* the color appears, usually from a source image.\n\t* @param {ScoreOptions} options optional parameters.\n\t* @return Colors sorted by suitability for a UI theme. The most suitable\n\t* color is the first item, the least suitable is the last. There will\n\t* always be at least one color returned. If all the input colors\n\t* were not suitable for a theme, a default fallback color will be\n\t* provided, Google Blue.\n\t*/\n\tstatic score(colorsToPopulation, options) {\n\t\tconst { desired, fallbackColorARGB, filter } = {\n\t\t\t...SCORE_OPTION_DEFAULTS,\n\t\t\t...options\n\t\t};\n\t\tconst colorsHct = [];\n\t\tconst huePopulation = new Array(360).fill(0);\n\t\tlet populationSum = 0;\n\t\tfor (const [argb, population] of colorsToPopulation.entries()) {\n\t\t\tconst hct = Hct.fromInt(argb);\n\t\t\tcolorsHct.push(hct);\n\t\t\tconst hue = Math.floor(hct.hue);\n\t\t\thuePopulation[hue] += population;\n\t\t\tpopulationSum += population;\n\t\t}\n\t\tconst hueExcitedProportions = new Array(360).fill(0);\n\t\tfor (let hue = 0; hue < 360; hue++) {\n\t\t\tconst proportion = huePopulation[hue] / populationSum;\n\t\t\tfor (let i = hue - 14; i < hue + 16; i++) {\n\t\t\t\tconst neighborHue = sanitizeDegreesInt(i);\n\t\t\t\thueExcitedProportions[neighborHue] += proportion;\n\t\t\t}\n\t\t}\n\t\tconst scoredHct = new Array();\n\t\tfor (const hct of colorsHct) {\n\t\t\tconst hue = sanitizeDegreesInt(Math.round(hct.hue));\n\t\t\tconst proportion = hueExcitedProportions[hue];\n\t\t\tif (filter && (hct.chroma < Score$1.CUTOFF_CHROMA || proportion <= Score$1.CUTOFF_EXCITED_PROPORTION)) continue;\n\t\t\tconst proportionScore = proportion * 100 * Score$1.WEIGHT_PROPORTION;\n\t\t\tconst chromaWeight = hct.chroma < Score$1.TARGET_CHROMA ? Score$1.WEIGHT_CHROMA_BELOW : Score$1.WEIGHT_CHROMA_ABOVE;\n\t\t\tconst chromaScore = (hct.chroma - Score$1.TARGET_CHROMA) * chromaWeight;\n\t\t\tconst score = proportionScore + chromaScore;\n\t\t\tscoredHct.push({\n\t\t\t\thct,\n\t\t\t\tscore\n\t\t\t});\n\t\t}\n\t\tscoredHct.sort(compare);\n\t\tconst chosenColors = [];\n\t\tfor (let differenceDegrees$1 = 90; differenceDegrees$1 >= 15; differenceDegrees$1--) {\n\t\t\tchosenColors.length = 0;\n\t\t\tfor (const { hct } of scoredHct) {\n\t\t\t\tconst duplicateHue = chosenColors.find((chosenHct) => {\n\t\t\t\t\treturn differenceDegrees(hct.hue, chosenHct.hue) < differenceDegrees$1;\n\t\t\t\t});\n\t\t\t\tif (!duplicateHue) chosenColors.push(hct);\n\t\t\t\tif (chosenColors.length >= desired) break;\n\t\t\t}\n\t\t\tif (chosenColors.length >= desired) break;\n\t\t}\n\t\tconst colors = [];\n\t\tif (chosenColors.length === 0) colors.push(fallbackColorARGB);\n\t\tfor (const chosenHct of chosenColors) colors.push(chosenHct.toInt());\n\t\treturn colors;\n\t}\n};\n/**\n* Get the source color from an image.\n*\n* @param image The image element\n* @return Source color - the color most suitable for creating a UI theme\n*/\nasync function sourceColorFromImage(image) {\n\tconst imageBytes = await new Promise((resolve, reject) => {\n\t\tconst canvas = document.createElement(\"canvas\");\n\t\tconst context = canvas.getContext(\"2d\");\n\t\tif (!context) {\n\t\t\treject(/* @__PURE__ */ new Error(\"Could not get canvas context\"));\n\t\t\treturn;\n\t\t}\n\t\tconst loadCallback = () => {\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\t\t\tcontext.drawImage(image, 0, 0);\n\t\t\tlet rect = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\timage.width,\n\t\t\t\timage.height\n\t\t\t];\n\t\t\tconst area = image.dataset[\"area\"];\n\t\t\tif (area && /^\\d+(\\s*,\\s*\\d+){3}$/.test(area)) rect = area.split(/\\s*,\\s*/).map((s) => {\n\t\t\t\treturn parseInt(s, 10);\n\t\t\t});\n\t\t\tconst [sx, sy, sw, sh] = rect;\n\t\t\tresolve(context.getImageData(sx, sy, sw, sh).data);\n\t\t};\n\t\tconst errorCallback = () => {\n\t\t\treject(/* @__PURE__ */ new Error(\"Image load failed\"));\n\t\t};\n\t\tif (image.complete) loadCallback();\n\t\telse {\n\t\t\timage.onload = loadCallback;\n\t\t\timage.onerror = errorCallback;\n\t\t}\n\t});\n\treturn sourceColorFromImageBytes(imageBytes);\n}\n/**\n* Get the source color from image bytes.\n*\n* @param imageBytes The image bytes\n* @return Source color - the color most suitable for creating a UI theme\n*/\nfunction sourceColorFromImageBytes(imageBytes) {\n\tconst pixels = [];\n\tfor (let i = 0; i < imageBytes.length; i += 4) {\n\t\tconst r = imageBytes[i];\n\t\tconst g = imageBytes[i + 1];\n\t\tconst b = imageBytes[i + 2];\n\t\tconst a = imageBytes[i + 3];\n\t\tif (a < 255) continue;\n\t\tconst argb = argbFromRgb(r, g, b);\n\t\tpixels.push(argb);\n\t}\n\tconst result = QuantizerCelebi.quantize(pixels, 128);\n\tconst ranked = Score.score(result);\n\tconst top = ranked[0];\n\treturn top;\n}\n/**\n* Utility methods for hexadecimal representations of colors.\n*/\n/**\n* @param argb ARGB representation of a color.\n* @return Hex string representing color, ex. #ff0000 for red.\n*/\nfunction hexFromArgb(argb) {\n\tconst r = redFromArgb(argb);\n\tconst g = greenFromArgb(argb);\n\tconst b = blueFromArgb(argb);\n\tconst outParts = [\n\t\tr.toString(16),\n\t\tg.toString(16),\n\t\tb.toString(16)\n\t];\n\tfor (const [i, part] of outParts.entries()) if (part.length === 1) outParts[i] = \"0\" + part;\n\treturn \"#\" + outParts.join(\"\");\n}\n/**\n* @param hex String representing color as hex code. Accepts strings with or\n* without leading #, and string representing the color using 3, 6, or 8\n* hex characters.\n* @return ARGB representation of color.\n*/\nfunction argbFromHex(hex) {\n\thex = hex.replace(\"#\", \"\");\n\tconst isThree = hex.length === 3;\n\tconst isSix = hex.length === 6;\n\tconst isEight = hex.length === 8;\n\tif (!isThree && !isSix && !isEight) throw new Error(\"unexpected hex \" + hex);\n\tlet r = 0;\n\tlet g = 0;\n\tlet b = 0;\n\tif (isThree) {\n\t\tr = parseIntHex(hex.slice(0, 1).repeat(2));\n\t\tg = parseIntHex(hex.slice(1, 2).repeat(2));\n\t\tb = parseIntHex(hex.slice(2, 3).repeat(2));\n\t} else if (isSix) {\n\t\tr = parseIntHex(hex.slice(0, 2));\n\t\tg = parseIntHex(hex.slice(2, 4));\n\t\tb = parseIntHex(hex.slice(4, 6));\n\t} else if (isEight) {\n\t\tr = parseIntHex(hex.slice(2, 4));\n\t\tg = parseIntHex(hex.slice(4, 6));\n\t\tb = parseIntHex(hex.slice(6, 8));\n\t}\n\treturn (255 << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255) >>> 0;\n}\nfunction parseIntHex(value) {\n\treturn parseInt(value, 16);\n}\n/**\n* Generate a theme from a source color\n*\n* @param source Source color\n* @param customColors Array of custom colors\n* @return Theme object\n*/\nfunction themeFromSourceColor(source, customColors = []) {\n\tconst palette = CorePalette.of(source);\n\treturn {\n\t\tsource,\n\t\tschemes: {\n\t\t\tlight: Scheme.light(source),\n\t\t\tdark: Scheme.dark(source)\n\t\t},\n\t\tpalettes: {\n\t\t\tprimary: palette.a1,\n\t\t\tsecondary: palette.a2,\n\t\t\ttertiary: palette.a3,\n\t\t\tneutral: palette.n1,\n\t\t\tneutralVariant: palette.n2,\n\t\t\terror: palette.error\n\t\t},\n\t\tcustomColors: customColors.map((c) => customColor(source, c))\n\t};\n}\n/**\n* Generate a theme from an image source\n*\n* @param image Image element\n* @param customColors Array of custom colors\n* @return Theme object\n*/\nasync function themeFromImage(image, customColors = []) {\n\tconst source = await sourceColorFromImage(image);\n\treturn themeFromSourceColor(source, customColors);\n}\n/**\n* Generate custom color group from source and target color\n*\n* @param source Source color\n* @param color Custom color\n* @return Custom color group\n*\n* @link https://m3.material.io/styles/color/the-color-system/color-roles\n*/\nfunction customColor(source, color) {\n\tlet value = color.value;\n\tconst from = value;\n\tconst to = source;\n\tif (color.blend) value = Blend.harmonize(from, to);\n\tconst palette = CorePalette.of(value);\n\tconst tones = palette.a1;\n\treturn {\n\t\tcolor,\n\t\tvalue,\n\t\tlight: {\n\t\t\tcolor: tones.tone(40),\n\t\t\tonColor: tones.tone(100),\n\t\t\tcolorContainer: tones.tone(90),\n\t\t\tonColorContainer: tones.tone(10)\n\t\t},\n\t\tdark: {\n\t\t\tcolor: tones.tone(80),\n\t\t\tonColor: tones.tone(20),\n\t\t\tcolorContainer: tones.tone(30),\n\t\t\tonColorContainer: tones.tone(90)\n\t\t}\n\t};\n}\n/**\n* Apply a theme to an element\n*\n* @param theme Theme object\n* @param options Options\n*/\nfunction applyTheme(theme, options) {\n\tconst target = options?.target || document.body;\n\tconst isDark = options?.dark ?? false;\n\tconst scheme = isDark ? theme.schemes.dark : theme.schemes.light;\n\tsetSchemeProperties(target, scheme);\n\tif (options?.brightnessSuffix) {\n\t\tsetSchemeProperties(target, theme.schemes.dark, \"-dark\");\n\t\tsetSchemeProperties(target, theme.schemes.light, \"-light\");\n\t}\n\tif (options?.paletteTones) {\n\t\tconst tones = options?.paletteTones ?? [];\n\t\tfor (const [key, palette] of Object.entries(theme.palettes)) {\n\t\t\tconst paletteKey = key.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\t\t\tfor (const tone of tones) {\n\t\t\t\tconst token = `--md-ref-palette-${paletteKey}-${paletteKey}${tone}`;\n\t\t\t\tconst color = hexFromArgb(palette.tone(tone));\n\t\t\t\ttarget.style.setProperty(token, color);\n\t\t\t}\n\t\t}\n\t}\n}\nfunction setSchemeProperties(target, scheme, suffix = \"\") {\n\tfor (const [key, value] of Object.entries(scheme.toJSON())) {\n\t\tconst token = key.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\t\tconst color = hexFromArgb(value);\n\t\ttarget.style.setProperty(`--md-sys-color-${token}${suffix}`, color);\n\t}\n}\n\n//#endregion\nexport { Blend, Cam16, Contrast, ContrastCurve, CorePalette, CorePalettes, DislikeAnalyzer, DynamicColor, DynamicScheme, Hct, LabPointProvider, MaterialDynamicColors, Platform, QuantizerCelebi, QuantizerMap, QuantizerWsmeans, QuantizerWu, Scheme, SchemeAndroid, SchemeContent, SchemeExpressive, SchemeFidelity, SchemeFruitSalad, SchemeMonochrome, SchemeNeutral, SchemeRainbow, SchemeTonalSpot, SchemeVibrant, Score, SpecVersion, TemperatureCache, TonalPalette, ToneDeltaPair, Variant, ViewingConditions, alphaFromArgb, applyTheme, argbFromHex, argbFromLab, argbFromLinrgb, argbFromLstar, argbFromRgb, argbFromXyz, blueFromArgb, clampDouble, clampInt, customColor, delinearized, differenceDegrees, extendSpecVersion, greenFromArgb, hexFromArgb, isOpaque, labFromArgb, lerp, linearized, lstarFromArgb, lstarFromY, matrixMultiply, redFromArgb, rotationDirection, sanitizeDegreesDouble, sanitizeDegreesInt, signum, sourceColorFromImage, sourceColorFromImageBytes, themeFromImage, themeFromSourceColor, whitePointD65, xyzFromArgb, yFromLstar };","import { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { customElement, property } from \"lit/decorators.js\";\r\n\r\nimport {\r\n argbFromHex,\r\n DynamicScheme,\r\n Hct,\r\n hexFromArgb,\r\n MaterialDynamicColors,\r\n Platform,\r\n SpecVersion,\r\n Variant,\r\n} from \"@materialx/material-color-utilities\";\r\n\r\nimport { DesignToken } from \"@m3e/core\";\r\n\r\nimport { ColorScheme } from \"./ColorScheme\";\r\nimport { ContrastLevel } from \"./ContrastLevel\";\r\nimport { ThemeVariant } from \"./ThemeVariant\";\r\nimport { MotionScheme } from \"./MotionScheme\";\r\n\r\n/**\r\n * A non-visual element responsible for application-level theming.\r\n *\r\n * @description\r\n * The `m3e-theme` component is a non-visual element used to apply dynamic color, expressive motion, density, and strong focus indicators\r\n * to nested, theme-aware elements.\r\n *\r\n * When `m3e-theme` is nested directly beneath the `<body>` of a document, the `<body>`'s `background-color` is set to the computed\r\n * value of `--md-sys-color-background` and `color` is set to the computed value of `--md-sys-color-on-background`. In addition,\r\n * the document's `scrollbar-color` is set to the computed values of `--m3e-scrollbar-thumb-color` and `--m3e-scrollbar-track-color` which,\r\n * when supported, cascades to all viewport scrollbars.\r\n *\r\n * @example\r\n * The following example adds a top-level `m3e-theme` directly beneath a document's `<body>` element to\r\n * apply application-level theming. In this example, `color` and `scheme` are used to create a dynamic color\r\n * palette which automatically adjusts to a user's light or dark color preference. In addition, expressive motion\r\n * and strong focus indicators are enabled.\r\n *\r\n * ```html\r\n * <body>\r\n * <m3e-theme color=\"#6750A4\" scheme=\"auto\" motion=\"expressive\" strong-focus>\r\n * <!-- Normal body content here. -->\r\n * </m3e-theme>\r\n * <body/>\r\n * ```\r\n * @tag m3e-theme\r\n *\r\n * @attr color - The hex color from which to derive dynamic color palettes.\r\n * @attr contrast - The contrast level of the theme.\r\n * @attr density - The density scale (0, -1, -2).\r\n * @attr scheme - The color scheme of the theme.\r\n * @attr strong-focus - Whether to enable strong focus indicators.\r\n * @attr variant - The color variant of the theme.\r\n *\r\n * @fires change - Dispatched when the theme changes.\r\n */\r\n@customElement(\"m3e-theme\")\r\nexport class M3eThemeElement extends LitElement {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: contents;\r\n font-size: ${DesignToken.typescale.standard.body.large.fontSize};\r\n font-weight: ${DesignToken.typescale.standard.body.large.fontWeight};\r\n line-height: ${DesignToken.typescale.standard.body.large.lineHeight};\r\n letter-spacing: ${DesignToken.typescale.standard.body.large.tracking};\r\n }\r\n `;\r\n\r\n /** @private */ #styleSheet = new CSSStyleSheet();\r\n /** @private */ #firstUpdated = false;\r\n /** @private */ #light?: MediaQueryList;\r\n /** @private */ #dark?: MediaQueryList;\r\n /** @private */ #forcedColor?: MediaQueryList;\r\n\r\n /** @private */ readonly #colorSchemeChangeHandler = () => this.#apply();\r\n\r\n /**\r\n * The hex color from which to derive dynamic color palettes.\r\n * @default \"#6750A4\"\r\n */\r\n @property() color = \"#6750A4\";\r\n\r\n /**\r\n * The color variant of the theme.\r\n * @default \"content\"\r\n */\r\n @property() variant: ThemeVariant = \"content\";\r\n\r\n /**\r\n * The color scheme of the theme.\r\n * @default \"auto\"\r\n */\r\n @property() scheme: ColorScheme = \"auto\";\r\n\r\n /**\r\n * The contrast level of the theme.\r\n * @default \"standard\"\r\n */\r\n @property() contrast: ContrastLevel = \"standard\";\r\n\r\n /**\r\n * Whether to enable strong focus indicators.\r\n * @default false\r\n */\r\n @property({ attribute: \"strong-focus\", type: Boolean }) strongFocus = false;\r\n\r\n /**\r\n * The density scale (0, -1, -2).\r\n * @default 0\r\n */\r\n @property({ type: Number }) density = 0;\r\n\r\n /** The motion scheme.\r\n * @default \"standard\"\r\n */\r\n @property() motion: MotionScheme = \"standard\";\r\n\r\n /** Whether a dark theme is applied. */\r\n get isDark(): boolean {\r\n switch (this.scheme) {\r\n case \"light\":\r\n return false;\r\n case \"dark\":\r\n return true;\r\n default: // auto\r\n return this.#dark?.matches ?? false;\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n if (this.shadowRoot && !this.shadowRoot.adoptedStyleSheets.includes(this.#styleSheet)) {\r\n this.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets, this.#styleSheet];\r\n }\r\n\r\n this.#light = matchMedia(\"(prefers-color-scheme: light)\");\r\n this.#dark = matchMedia(\"(prefers-color-scheme: dark)\");\r\n this.#forcedColor = matchMedia(\"(forced-colors: active)\");\r\n\r\n [this.#light, this.#dark, this.#forcedColor].forEach((x) =>\r\n x.addEventListener(\"change\", this.#colorSchemeChangeHandler)\r\n );\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n [this.#light, this.#dark, this.#forcedColor].forEach((x) =>\r\n x?.removeEventListener(\"change\", this.#colorSchemeChangeHandler)\r\n );\r\n this.#light = this.#dark = this.#forcedColor = undefined;\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override updated(_changedProperties: PropertyValues<this>): void {\r\n super.updated(_changedProperties);\r\n this.#apply();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues): void {\r\n super.firstUpdated(_changedProperties);\r\n this.#firstUpdated = true;\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<slot></slot>`;\r\n }\r\n\r\n /** @private */\r\n #createScheme(sourceColor: Hct): DynamicScheme {\r\n let variant: Variant = Variant.CONTENT;\r\n\r\n switch (this.variant) {\r\n case \"expressive\":\r\n variant = Variant.EXPRESSIVE;\r\n break;\r\n case \"fidelity\":\r\n variant = Variant.FIDELITY;\r\n break;\r\n case \"fruit-salad\":\r\n variant = Variant.FRUIT_SALAD;\r\n break;\r\n case \"monochrome\":\r\n variant = Variant.MONOCHROME;\r\n break;\r\n case \"neutral\":\r\n variant = Variant.NEUTRAL;\r\n break;\r\n case \"rainbow\":\r\n variant = Variant.RAINBOW;\r\n break;\r\n case \"tonal-spot\":\r\n variant = Variant.TONAL_SPOT;\r\n break;\r\n case \"vibrant\":\r\n variant = Variant.VIBRANT;\r\n break;\r\n }\r\n\r\n return DynamicScheme.from({\r\n sourceColorHct: sourceColor,\r\n isDark: this.isDark,\r\n contrastLevel: this.#getContrastLevel(),\r\n variant: variant,\r\n specVersion: SpecVersion.SPEC_2025,\r\n platform: Platform.PHONE,\r\n });\r\n }\r\n\r\n /** @private */\r\n #apply(): void {\r\n const color = argbFromHex(this.color);\r\n const scheme = this.#createScheme(Hct.fromInt(color));\r\n\r\n let css = \"\";\r\n\r\n for (const dynamicColor of new MaterialDynamicColors().allDynamicColors.filter(\r\n (x) => !x.name.includes(\"palette\")\r\n )) {\r\n css += `--md-sys-color-${dynamicColor.name.replace(/_/g, \"-\").toLowerCase()}: ${hexFromArgb(\r\n dynamicColor.getArgb(scheme)\r\n )};`;\r\n }\r\n\r\n if (this.motion === \"expressive\") {\r\n css += \"--md-sys-motion-spring-fast-spatial: 350ms cubic-bezier(0.42, 1.67, 0.21, 0.90);\";\r\n css += \"--md-sys-motion-spring-default-spatial: 500ms cubic-bezier(0.38, 1.21, 0.22, 1.00);\";\r\n css += \"--md-sys-motion-spring-slow-spatial: 650ms cubic-bezier(0.39, 1.29, 0.35, 0.98);\";\r\n css += \"--md-sys-motion-spring-fast-effects: 150ms cubic-bezier(0.31, 0.94, 0.34, 1.00);\";\r\n css += \"--md-sys-motion-spring-default-effects: 200ms cubic-bezier(0.34, 0.80, 0.34, 1.00);\";\r\n css += \"--md-sys-motion-spring-slow-effects: 300ms cubic-bezier(0.34, 0.88, 0.34, 1.00);\";\r\n }\r\n\r\n css += `--md-sys-density-scale: ${this.density};`;\r\n css += `--m3e-scrollbar-thumb-color: ${hexFromArgb(scheme.neutralPalette.tone(60))};`;\r\n css += `--m3e-focus-ring-visibility: ${this.strongFocus ? \"visible\" : \"hidden\"};`;\r\n\r\n this.#styleSheet.replaceSync(`:host { ${css} }`);\r\n\r\n if (this.parentElement instanceof HTMLBodyElement) {\r\n const computedStyle = getComputedStyle(this);\r\n\r\n if (this.#forcedColor?.matches) {\r\n this.parentElement.style.backgroundColor =\r\n this.parentElement.style.color =\r\n this.parentElement.ownerDocument.documentElement.style.scrollbarColor =\r\n this.parentElement.style.scrollbarColor =\r\n \"\";\r\n } else {\r\n this.parentElement.style.backgroundColor = computedStyle.getPropertyValue(\"--md-sys-color-background\");\r\n this.parentElement.style.color = computedStyle.getPropertyValue(\"--md-sys-color-on-background\");\r\n\r\n this.parentElement.ownerDocument.documentElement.style.scrollbarColor =\r\n this.parentElement.style.scrollbarColor = `${computedStyle.getPropertyValue(\r\n \"--m3e-scrollbar-thumb-color\"\r\n )} ${computedStyle.getPropertyValue(\"--m3e-scrollbar-track-color\")}`;\r\n }\r\n }\r\n\r\n if (this.#firstUpdated) {\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n }\r\n\r\n /** @private */\r\n #getContrastLevel(): number {\r\n switch (this.contrast) {\r\n case \"high\":\r\n return 1;\r\n case \"medium\":\r\n return 0.5;\r\n default: // standard\r\n return 0;\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-theme\": M3eThemeElement;\r\n }\r\n}\r\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__classPrivateFieldGet","receiver","state","kind","f","TypeError","has","call","value","get","__classPrivateFieldSet","set","SuppressedError","t","globalThis","e","ShadowRoot","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","s","Symbol","o","WeakMap","n$2","constructor","this","_$cssResult$","Error","cssText","styleSheet","replaceSync","toString","S","adoptedStyleSheets","map","document","createElement","n","litNonce","setAttribute","textContent","appendChild","cssRules","is","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","b","attribute","type","String","converter","reflect","useDefault","hasChanged","metadata","litPropertyMetadata","y","HTMLElement","addInitializer","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","hasOwnProperty","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","name","init","signum","num","lerp","start","stop","amount","clampInt","min","max","input","clampDouble","sanitizeDegreesInt","degrees","sanitizeDegreesDouble","matrixMultiply","row","matrix","SRGB_TO_XYZ","XYZ_TO_SRGB","WHITE_POINT_D65","argbFromRgb","red","green","blue","argbFromLinrgb","linrgb","delinearized","redFromArgb","argb","greenFromArgb","blueFromArgb","lstarFromArgb","linearized","xyzFromArgb","labF","yFromLstar","lstar","ft","kappa","ft3","labInvf","lstarFromY","rgbComponent","normalized","Math","pow","delinearized$1","round","ViewingConditions","ViewingConditions$1","static","make","whitePoint","whitePointD65","adaptingLuminance","PI","backgroundLstar","surround","discountingIlluminant","xyz","rW","gW","bW","exp","nc","rgbD","k","k4","k4F","fl","cbrt","z","sqrt","nbb","ncb","rgbAFactors","rgbA","aw","fLRoot","Cam16","Cam16$1","hue","chroma","j","q","m","jstar","astar","bstar","distance","other","dJ","dA","dB","dEPrime","fromInt","fromIntInViewingConditions","DEFAULT","viewingConditions","redL","greenL","blueL","x","rC","gC","bC","rD","gD","bD","rAF","abs","gAF","bAF","rA","gA","bA","p2","atanDegrees","atan2","hueRadians","ac","huePrime","cos","alpha","mstar","log","sin","fromJch","fromJchInViewingConditions","fromUcs","fromUcsInViewingConditions","toInt","viewed","hRad","eHue","p1","hSin","hCos","gamma","rCBase","gCBase","bCBase","rF","gF","bF","linearR","linearG","linearB","argbFromXyz","fromXyzInViewingConditions","J","Q","M","xyzInViewingConditions","HctSolver","HctSolver$1","sanitizeRadians","angle","trueDelinearized","chromaticAdaptation","component","af","hueOf","scaledDiscount","SCALED_DISCOUNT_FROM_LINRGB","areInCyclicOrder","intercept","source","mid","lerpPoint","setCoordinate","coordinate","axis","isBounded","nthVertex","kR","Y_FROM_LINRGB","kG","kB","coordA","coordB","g","bisectToSegment","targetHue","left","right","leftHue","rightHue","initialized","uncut","midHue","midpoint","criticalPlaneBelow","floor","criticalPlaneAbove","ceil","bisectToLimit","segment","lPlane","rPlane","mPlane","midPlaneCoordinate","CRITICAL_PLANES","inverseChromaticAdaptation","adapted","adaptedAbs","base","findResultByJ","tInnerCoeff","iterationRound","jNormalized","LINRGB_FROM_SCALED_DISCOUNT","fnj","solveToInt","hueDegrees","argbFromLstar","exactAnswer","solveToCam","Hct","Hct$1","internalHue","internalChroma","internalTone","from","tone","newHue","setInternalState","newChroma","newTone","setValue","propertyName","toFixed","isBlue","isYellow","isCyan","cam","inViewingConditions","vc","viewedInVc","recastInVc","Contrast","Contrast$1","ratioOfTones","toneA","toneB","ratioOfYs","y1","y2","lighter","ratio","darkY","lightY","realContrast","delta","returnValue","darker","lighterUnsafe","lighterSafe","darkerUnsafe","darkerSafe","DislikeAnalyzer","DislikeAnalyzer$1","isDisliked","hct","huePasses","chromaPasses","tonePasses","fixIfDisliked","ContrastCurve","low","normal","medium","high","contrastLevel","extendSpecVersion","originalColor","specVersion","extendedColor","isBackground","validateExtendedColor","DynamicColor","fromPalette","palette","chromaMultiplier","background","secondBackground","contrastCurve","toneDeltaPair","opacity","DynamicColor$1","hctCache","args","getInitialToneFromBackground","getTone","clone","clearCache","clear","getArgb","scheme","getHct","percentage","cachedAnswer","answer","getSpec$1","foregroundTone","bgTone","lighterTone","darkerTone","lighterRatio","darkerRatio","tonePrefersLightForeground","negligibleDifference","toneAllowsLightForeground","enableLightForeground","spec2021$1","color","decreasingContrast","roleA","roleB","polarity","stayTogether","aIsNearer","isDark","nearer","farther","amNearer","expansionDir","nTone","fTone","bg","nContrastCurve","fContrastCurve","nContrast","fContrast","desiredRatio","bg1","bg2","bgTone1","bgTone2","upper","lower","lightOption","darkOption","availables","spec2025$1","constraint","absoluteDelta","amRoleA","refRole","selfTone","refTone","relativeDelta","selfContrast","endsWith","TonalPalette","TonalPalette$1","cache","fromHct","fromHueAndChroma","keyColor","KeyColor","averageArgb","argb1","argb2","red1","green1","blue1","red2","green2","blue2","chromaCache","maxChromaValue","requestedChroma","lowerTone","upperTone","midTone","isAscending","maxChroma","TemperatureCache","TemperatureCache$1","hctsByTempCache","hctsByHueCache","tempsByHctCache","inputRelativeTemperatureCache","complementCache","hctsByTemp","hcts","hctsByHue","concat","temperaturesByHct","tempsByHct","sort","warmest","coldest","analogous","count","divisions","startHue","startHct","lastTemp","relativeTemperature","allColors","absoluteTotalTempDelta","temp","tempDelta","hueAddend","tempStep","totalTempDelta","indexSatisfied","indexAddend","answers","increaseHueCount","index","splice","decreaseHueCount","complement","coldestHue","coldestTemp","warmestHue","range","startHueIsColdestToWarmest","isBetween","endHue","smallestError","complementRelativeTemp","inputRelativeTemperature","possibleAnswer","relativeTemp","error","differenceFromColdest","allHcts","rawTemperature","colorAtHue","lab","yNormalized","zNormalized","fx","fy","labFromArgb","ToneDeltaPair","Variant","Variant$1","isFidelity","variant","FIDELITY","CONTENT","isMonochrome","MONOCHROME","ColorSpecDelegateImpl2021","primaryPaletteKeyColor","primaryPalette","secondaryPaletteKeyColor","secondaryPalette","tertiaryPaletteKeyColor","tertiaryPalette","neutralPaletteKeyColor","neutralPalette","neutralVariantPaletteKeyColor","neutralVariantPalette","errorPaletteKeyColor","errorPalette","onBackground","surface","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest","onSurface","highestSurface","surfaceVariant","onSurfaceVariant","inverseSurface","inverseOnSurface","outline","outlineVariant","shadow","scrim","surfaceTint","primary","primaryContainer","primaryDim","onPrimary","sourceColorHct","onPrimaryContainer","inversePrimary","secondary","secondaryContainer","secondaryDim","onSecondary","initialTone","byDecreasingTone","closestToChroma","chromaPeak","potentialSolution","findDesiredChromaByTone","onSecondaryContainer","tertiary","tertiaryContainer","tertiaryDim","onTertiary","proposedHct","onTertiaryContainer","errorContainer","errorDim","onError","onErrorContainer","primaryFixed","primaryFixedDim","onPrimaryFixed","onPrimaryFixedVariant","secondaryFixed","secondaryFixedDim","onSecondaryFixed","onSecondaryFixedVariant","tertiaryFixed","tertiaryFixedDim","onTertiaryFixed","onTertiaryFixedVariant","controlActivated","controlNormal","controlHighlight","textPrimaryInverse","textSecondaryAndTertiaryInverse","textPrimaryInverseDisableOnly","textSecondaryAndTertiaryInverseDisabled","textHintInverse","SpecVersion","SpecVersion$1","Platform","Platform$1","tMaxC","lowerBound","upperBound","findBestToneForChroma","tMinC","bestCandidate","newCandidate","getCurve","defaultContrast","ColorSpecDelegateImpl2025","color2025","platform","PHONE","VIBRANT","SPEC_2025","NEUTRAL","TONAL_SPOT","EXPRESSIVE","s$1","WATCH","tempS","assign","MaterialDynamicColors","MaterialDynamicColors$1","colorSpec","allDynamicColors","DynamicScheme","DynamicScheme$1","SPEC_2021","sourceColorArgb","colors","DEFAULT_SPEC_VERSION","DEFAULT_PLATFORM","getSpec","getPrimaryPalette","getSecondaryPalette","getTertiaryPalette","getNeutralPalette","getNeutralVariantPalette","getErrorPalette","getPiecewiseHue","hueBreakpoints","hues","sourceHue","getRotatedHue","rotations","rotation","dynamicColor","DynamicSchemePalettesDelegateImpl2021","FRUIT_SALAD","RAINBOW","spec2021","spec2025","DynamicSchemePalettesDelegateImpl2025$1","getExpressiveNeutralHue","getExpressiveNeutralChroma","neutralHue","getVibrantNeutralHue","getVibrantNeutralChroma","expressiveNeutralHue","expressiveNeutralChroma","vibrantNeutralHue","vibrantNeutralChroma","errorHue","hexFromArgb","outParts","part","entries","join","parseIntHex","parseInt","M3eThemeElement","LitElement","_M3eThemeElement_styleSheet","_M3eThemeElement_firstUpdated","_M3eThemeElement_light","_M3eThemeElement_dark","_M3eThemeElement_forcedColor","_M3eThemeElement_colorSchemeChangeHandler","_M3eThemeElement_instances","_M3eThemeElement_apply","contrast","strongFocus","density","motion","matches","includes","matchMedia","addEventListener","removeEventListener","undefined","_changedProperties","render","html","sourceColor","_M3eThemeElement_getContrastLevel","hex","isThree","replace","isSix","isEight","slice","repeat","argbFromHex","css","filter","parentElement","HTMLBodyElement","computedStyle","getComputedStyle","style","backgroundColor","ownerDocument","documentElement","scrollbarColor","getPropertyValue","dispatchEvent","Event","bubbles","DesignToken","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","property","customElements","define","customElement"],"mappings":";;;;;4FAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,E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mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,kBACA,mBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,kBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,mBACA,kBACA,mBACA,kBACA,mBACA,mBACA,iBACA,mBACA,kBACA,mBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,mBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,mBACA,kBACA,mBACA,mBACA,iBACA,kBACA,mBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,mBACA,iBACA,iBACA,mBACA,mBACA,kBACA,kBACA,iBACA,mBACA,mBACA,kBACA,mBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,mBACA,kBACA,mBACA,iBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,kBACA,kBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA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c,KAAO6uB,eAAeC,OAAO/yB,EAAEE,EAAG,GAAG4yB,eAAeC,OAAO/yB,EAAEE,IKoD1G8yB,CAAc,cACF5D","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"index.min.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../node_modules/@lit/reactive-element/decorators/custom-element.js","../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@material/material-color-utilities/utils/math_utils.js","../../../node_modules/@material/material-color-utilities/utils/color_utils.js","../../../node_modules/@material/material-color-utilities/hct/viewing_conditions.js","../../../node_modules/@material/material-color-utilities/hct/cam16.js","../../../node_modules/@material/material-color-utilities/hct/hct_solver.js","../../../node_modules/@material/material-color-utilities/hct/hct.js","../../../node_modules/@material/material-color-utilities/contrast/contrast.js","../../../node_modules/@material/material-color-utilities/dislike/dislike_analyzer.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_color.js","../../../node_modules/@material/material-color-utilities/palettes/tonal_palette.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/contrast_curve.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/tone_delta_pair.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/variant.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/material_dynamic_colors.js","../../../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_scheme.js","../../../node_modules/@material/material-color-utilities/palettes/core_palette.js","../../../node_modules/@material/material-color-utilities/scheme/scheme_expressive.js","../../../node_modules/@material/material-color-utilities/scheme/scheme_vibrant.js","../../../node_modules/@material/material-color-utilities/utils/string_utils.js","../../src/ThemeElement.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\n/**\n * Utility methods for mathematical operations.\n */\n/**\n * The signum function.\n *\n * @return 1 if num > 0, -1 if num < 0, and 0 if num = 0\n */\nexport function signum(num) {\n if (num < 0) {\n return -1;\n }\n else if (num === 0) {\n return 0;\n }\n else {\n return 1;\n }\n}\n/**\n * The linear interpolation function.\n *\n * @return start if amount = 0 and stop if amount = 1\n */\nexport function lerp(start, stop, amount) {\n return (1.0 - amount) * start + amount * stop;\n}\n/**\n * Clamps an integer between two integers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampInt(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Clamps an integer between two floating-point numbers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampDouble(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Sanitizes a degree measure as an integer.\n *\n * @return a degree measure between 0 (inclusive) and 360\n * (exclusive).\n */\nexport function sanitizeDegreesInt(degrees) {\n degrees = degrees % 360;\n if (degrees < 0) {\n degrees = degrees + 360;\n }\n return degrees;\n}\n/**\n * Sanitizes a degree measure as a floating-point number.\n *\n * @return a degree measure between 0.0 (inclusive) and 360.0\n * (exclusive).\n */\nexport function sanitizeDegreesDouble(degrees) {\n degrees = degrees % 360.0;\n if (degrees < 0) {\n degrees = degrees + 360.0;\n }\n return degrees;\n}\n/**\n * Sign of direction change needed to travel from one angle to\n * another.\n *\n * For angles that are 180 degrees apart from each other, both\n * directions have the same travel distance, so either direction is\n * shortest. The value 1.0 is returned in this case.\n *\n * @param from The angle travel starts from, in degrees.\n * @param to The angle travel ends at, in degrees.\n * @return -1 if decreasing from leads to the shortest travel\n * distance, 1 if increasing from leads to the shortest travel\n * distance.\n */\nexport function rotationDirection(from, to) {\n const increasingDifference = sanitizeDegreesDouble(to - from);\n return increasingDifference <= 180.0 ? 1.0 : -1.0;\n}\n/**\n * Distance of two points on a circle, represented using degrees.\n */\nexport function differenceDegrees(a, b) {\n return 180.0 - Math.abs(Math.abs(a - b) - 180.0);\n}\n/**\n * Multiplies a 1x3 row vector with a 3x3 matrix.\n */\nexport function matrixMultiply(row, matrix) {\n const a = row[0] * matrix[0][0] + row[1] * matrix[0][1] + row[2] * matrix[0][2];\n const b = row[0] * matrix[1][0] + row[1] * matrix[1][1] + row[2] * matrix[1][2];\n const c = row[0] * matrix[2][0] + row[1] * matrix[2][1] + row[2] * matrix[2][2];\n return [a, b, c];\n}\n//# sourceMappingURL=math_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as mathUtils from './math_utils.js';\n/**\n * Color science utilities.\n *\n * Utility methods for color science constants and color space\n * conversions that aren't HCT or CAM16.\n */\nconst SRGB_TO_XYZ = [\n [0.41233895, 0.35762064, 0.18051042],\n [0.2126, 0.7152, 0.0722],\n [0.01932141, 0.11916382, 0.95034478],\n];\nconst XYZ_TO_SRGB = [\n [\n 3.2413774792388685,\n -1.5376652402851851,\n -0.49885366846268053,\n ],\n [\n -0.9691452513005321,\n 1.8758853451067872,\n 0.04156585616912061,\n ],\n [\n 0.05562093689691305,\n -0.20395524564742123,\n 1.0571799111220335,\n ],\n];\nconst WHITE_POINT_D65 = [95.047, 100.0, 108.883];\n/**\n * Converts a color from RGB components to ARGB format.\n */\nexport function argbFromRgb(red, green, blue) {\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>>\n 0;\n}\n/**\n * Converts a color from linear RGB components to ARGB format.\n */\nexport function argbFromLinrgb(linrgb) {\n const r = delinearized(linrgb[0]);\n const g = delinearized(linrgb[1]);\n const b = delinearized(linrgb[2]);\n return argbFromRgb(r, g, b);\n}\n/**\n * Returns the alpha component of a color in ARGB format.\n */\nexport function alphaFromArgb(argb) {\n return argb >> 24 & 255;\n}\n/**\n * Returns the red component of a color in ARGB format.\n */\nexport function redFromArgb(argb) {\n return argb >> 16 & 255;\n}\n/**\n * Returns the green component of a color in ARGB format.\n */\nexport function greenFromArgb(argb) {\n return argb >> 8 & 255;\n}\n/**\n * Returns the blue component of a color in ARGB format.\n */\nexport function blueFromArgb(argb) {\n return argb & 255;\n}\n/**\n * Returns whether a color in ARGB format is opaque.\n */\nexport function isOpaque(argb) {\n return alphaFromArgb(argb) >= 255;\n}\n/**\n * Converts a color from ARGB to XYZ.\n */\nexport function argbFromXyz(x, y, z) {\n const matrix = XYZ_TO_SRGB;\n const linearR = matrix[0][0] * x + matrix[0][1] * y + matrix[0][2] * z;\n const linearG = matrix[1][0] * x + matrix[1][1] * y + matrix[1][2] * z;\n const linearB = matrix[2][0] * x + matrix[2][1] * y + matrix[2][2] * z;\n const r = delinearized(linearR);\n const g = delinearized(linearG);\n const b = delinearized(linearB);\n return argbFromRgb(r, g, b);\n}\n/**\n * Converts a color from XYZ to ARGB.\n */\nexport function xyzFromArgb(argb) {\n const r = linearized(redFromArgb(argb));\n const g = linearized(greenFromArgb(argb));\n const b = linearized(blueFromArgb(argb));\n return mathUtils.matrixMultiply([r, g, b], SRGB_TO_XYZ);\n}\n/**\n * Converts a color represented in Lab color space into an ARGB\n * integer.\n */\nexport function argbFromLab(l, a, b) {\n const whitePoint = WHITE_POINT_D65;\n const fy = (l + 16.0) / 116.0;\n const fx = a / 500.0 + fy;\n const fz = fy - b / 200.0;\n const xNormalized = labInvf(fx);\n const yNormalized = labInvf(fy);\n const zNormalized = labInvf(fz);\n const x = xNormalized * whitePoint[0];\n const y = yNormalized * whitePoint[1];\n const z = zNormalized * whitePoint[2];\n return argbFromXyz(x, y, z);\n}\n/**\n * Converts a color from ARGB representation to L*a*b*\n * representation.\n *\n * @param argb the ARGB representation of a color\n * @return a Lab object representing the color\n */\nexport function labFromArgb(argb) {\n const linearR = linearized(redFromArgb(argb));\n const linearG = linearized(greenFromArgb(argb));\n const linearB = linearized(blueFromArgb(argb));\n const matrix = SRGB_TO_XYZ;\n const x = matrix[0][0] * linearR + matrix[0][1] * linearG + matrix[0][2] * linearB;\n const y = matrix[1][0] * linearR + matrix[1][1] * linearG + matrix[1][2] * linearB;\n const z = matrix[2][0] * linearR + matrix[2][1] * linearG + matrix[2][2] * linearB;\n const whitePoint = WHITE_POINT_D65;\n const xNormalized = x / whitePoint[0];\n const yNormalized = y / whitePoint[1];\n const zNormalized = z / whitePoint[2];\n const fx = labF(xNormalized);\n const fy = labF(yNormalized);\n const fz = labF(zNormalized);\n const l = 116.0 * fy - 16;\n const a = 500.0 * (fx - fy);\n const b = 200.0 * (fy - fz);\n return [l, a, b];\n}\n/**\n * Converts an L* value to an ARGB representation.\n *\n * @param lstar L* in L*a*b*\n * @return ARGB representation of grayscale color with lightness\n * matching L*\n */\nexport function argbFromLstar(lstar) {\n const y = yFromLstar(lstar);\n const component = delinearized(y);\n return argbFromRgb(component, component, component);\n}\n/**\n * Computes the L* value of a color in ARGB representation.\n *\n * @param argb ARGB representation of a color\n * @return L*, from L*a*b*, coordinate of the color\n */\nexport function lstarFromArgb(argb) {\n const y = xyzFromArgb(argb)[1];\n return 116.0 * labF(y / 100.0) - 16.0;\n}\n/**\n * Converts an L* value to a Y value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param lstar L* in L*a*b*\n * @return Y in XYZ\n */\nexport function yFromLstar(lstar) {\n return 100.0 * labInvf((lstar + 16.0) / 116.0);\n}\n/**\n * Converts a Y value to an L* value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param y Y in XYZ\n * @return L* in L*a*b*\n */\nexport function lstarFromY(y) {\n return labF(y / 100.0) * 116.0 - 16.0;\n}\n/**\n * Linearizes an RGB component.\n *\n * @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B\n * channel\n * @return 0.0 <= output <= 100.0, color channel converted to\n * linear RGB space\n */\nexport function linearized(rgbComponent) {\n const normalized = rgbComponent / 255.0;\n if (normalized <= 0.040449936) {\n return normalized / 12.92 * 100.0;\n }\n else {\n return Math.pow((normalized + 0.055) / 1.055, 2.4) * 100.0;\n }\n}\n/**\n * Delinearizes an RGB component.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0 <= output <= 255, color channel converted to regular\n * RGB space\n */\nexport function delinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return mathUtils.clampInt(0, 255, Math.round(delinearized * 255.0));\n}\n/**\n * Returns the standard white point; white on a sunny day.\n *\n * @return The white point\n */\nexport function whitePointD65() {\n return WHITE_POINT_D65;\n}\n/**\n * Return RGBA from a given int32 color\n *\n * @param argb ARGB representation of a int32 color.\n * @return RGBA representation of a int32 color.\n */\nexport function rgbaFromArgb(argb) {\n const r = redFromArgb(argb);\n const g = greenFromArgb(argb);\n const b = blueFromArgb(argb);\n const a = alphaFromArgb(argb);\n return { r, g, b, a };\n}\n/**\n * Return int32 color from a given RGBA component\n *\n * @param rgba RGBA representation of a int32 color.\n * @returns ARGB representation of a int32 color.\n */\nexport function argbFromRgba({ r, g, b, a }) {\n const rValue = clampComponent(r);\n const gValue = clampComponent(g);\n const bValue = clampComponent(b);\n const aValue = clampComponent(a);\n return (aValue << 24) | (rValue << 16) | (gValue << 8) | bValue;\n}\nfunction clampComponent(value) {\n if (value < 0)\n return 0;\n if (value > 255)\n return 255;\n return value;\n}\nfunction labF(t) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n if (t > e) {\n return Math.pow(t, 1.0 / 3.0);\n }\n else {\n return (kappa * t + 16) / 116;\n }\n}\nfunction labInvf(ft) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n const ft3 = ft * ft * ft;\n if (ft3 > e) {\n return ft3;\n }\n else {\n return (116 * ft - 16) / kappa;\n }\n}\n//# sourceMappingURL=color_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(whitePoint = utils.whitePointD65(), adaptingLuminance = (200.0 / Math.PI) * utils.yFromLstar(50.0) / 100.0, backgroundLstar = 50.0, surround = 2.0, discountingIlluminant = false) {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c = f >= 0.9 ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0) :\n math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant ?\n 1.0 :\n f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl = k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = utils.yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, 0.25), z);\n }\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n constructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {\n this.n = n;\n this.aw = aw;\n this.nbb = nbb;\n this.ncb = ncb;\n this.c = c;\n this.nc = nc;\n this.rgbD = rgbD;\n this.fl = fl;\n this.fLRoot = fLRoot;\n this.z = z;\n }\n}\n/** sRGB-like viewing conditions. */\nViewingConditions.DEFAULT = ViewingConditions.make();\n//# sourceMappingURL=viewing_conditions.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * CAM16, a color appearance model. Colors are not just defined by their hex\n * code, but rather, a hex code and viewing conditions.\n *\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,\n * b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and should be used when measuring distances between colors.\n *\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n */\nexport class Cam16 {\n /**\n * All of the CAM16 dimensions can be calculated from 3 of the dimensions, in\n * the following combinations:\n * - {j or q} and {c, m, or s} and hue\n * - jstar, astar, bstar\n * Prefer using a static method that constructs from 3 of those dimensions.\n * This constructor is intended for those methods to use to return all\n * possible dimensions.\n *\n * @param hue\n * @param chroma informally, colorfulness / color intensity. like saturation\n * in HSL, except perceptually accurate.\n * @param j lightness\n * @param q brightness; ratio of lightness to white point's lightness\n * @param m colorfulness\n * @param s saturation; ratio of chroma to white point's chroma\n * @param jstar CAM16-UCS J coordinate\n * @param astar CAM16-UCS a coordinate\n * @param bstar CAM16-UCS b coordinate\n */\n constructor(hue, chroma, j, q, m, s, jstar, astar, bstar) {\n this.hue = hue;\n this.chroma = chroma;\n this.j = j;\n this.q = q;\n this.m = m;\n this.s = s;\n this.jstar = jstar;\n this.astar = astar;\n this.bstar = bstar;\n }\n /**\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*,\n * a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and is used to measure distances between colors.\n */\n distance(other) {\n const dJ = this.jstar - other.jstar;\n const dA = this.astar - other.astar;\n const dB = this.bstar - other.bstar;\n const dEPrime = Math.sqrt(dJ * dJ + dA * dA + dB * dB);\n const dE = 1.41 * Math.pow(dEPrime, 0.63);\n return dE;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return CAM16 color, assuming the color was viewed in default viewing\n * conditions.\n */\n static fromInt(argb) {\n return Cam16.fromIntInViewingConditions(argb, ViewingConditions.DEFAULT);\n }\n /**\n * @param argb ARGB representation of a color.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n * @return CAM16 color.\n */\n static fromIntInViewingConditions(argb, viewingConditions) {\n const red = (argb & 0x00ff0000) >> 16;\n const green = (argb & 0x0000ff00) >> 8;\n const blue = (argb & 0x000000ff);\n const redL = utils.linearized(red);\n const greenL = utils.linearized(green);\n const blueL = utils.linearized(blue);\n const x = 0.41233895 * redL + 0.35762064 * greenL + 0.18051042 * blueL;\n const y = 0.2126 * redL + 0.7152 * greenL + 0.0722 * blueL;\n const z = 0.01932141 * redL + 0.11916382 * greenL + 0.95034478 * blueL;\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n const rAF = Math.pow((viewingConditions.fl * Math.abs(rD)) / 100.0, 0.42);\n const gAF = Math.pow((viewingConditions.fl * Math.abs(gD)) / 100.0, 0.42);\n const bAF = Math.pow((viewingConditions.fl * Math.abs(bD)) / 100.0, 0.42);\n const rA = (math.signum(rD) * 400.0 * rAF) / (rAF + 27.13);\n const gA = (math.signum(gD) * 400.0 * gAF) / (gAF + 27.13);\n const bA = (math.signum(bD) * 400.0 * bAF) / (bAF + 27.13);\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n const b = (rA + gA - 2.0 * bA) / 9.0;\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n const atan2 = Math.atan2(b, a);\n const atanDegrees = (atan2 * 180.0) / Math.PI;\n const hue = atanDegrees < 0 ? atanDegrees + 360.0 :\n atanDegrees >= 360 ? atanDegrees - 360.0 :\n atanDegrees;\n const hueRadians = (hue * Math.PI) / 180.0;\n const ac = p2 * viewingConditions.nbb;\n const j = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const huePrime = hue < 20.14 ? hue + 360 : hue;\n const eHue = 0.25 * (Math.cos((huePrime * Math.PI) / 180.0 + 2.0) + 3.8);\n const p1 = (50000.0 / 13.0) * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = (p1 * Math.sqrt(a * a + b * b)) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const c = alpha * Math.sqrt(j / 100.0);\n const m = c * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n */\n static fromJch(j, c, h) {\n return Cam16.fromJchInViewingConditions(j, c, h, ViewingConditions.DEFAULT);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromJchInViewingConditions(j, c, h, viewingConditions) {\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const m = c * viewingConditions.fLRoot;\n const alpha = c / Math.sqrt(j / 100.0);\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const hueRadians = (h * Math.PI) / 180.0;\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(h, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n */\n static fromUcs(jstar, astar, bstar) {\n return Cam16.fromUcsInViewingConditions(jstar, astar, bstar, ViewingConditions.DEFAULT);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromUcsInViewingConditions(jstar, astar, bstar, viewingConditions) {\n const a = astar;\n const b = bstar;\n const m = Math.sqrt(a * a + b * b);\n const M = (Math.exp(m * 0.0228) - 1.0) / 0.0228;\n const c = M / viewingConditions.fLRoot;\n let h = Math.atan2(b, a) * (180.0 / Math.PI);\n if (h < 0.0) {\n h += 360.0;\n }\n const j = jstar / (1 - (jstar - 100) * 0.007);\n return Cam16.fromJchInViewingConditions(j, c, h, viewingConditions);\n }\n /**\n * @return ARGB representation of color, assuming the color was viewed in\n * default viewing conditions, which are near-identical to the default\n * viewing conditions for sRGB.\n */\n toInt() {\n return this.viewed(ViewingConditions.DEFAULT);\n }\n /**\n * @param viewingConditions Information about the environment where the color\n * will be viewed.\n * @return ARGB representation of color\n */\n viewed(viewingConditions) {\n const alpha = this.chroma === 0.0 || this.j === 0.0 ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = (this.hue * Math.PI) / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = ac / viewingConditions.nbb;\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = (23.0 * (p2 + 0.305) * t) /\n (23.0 * p1 + 11.0 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n const argb = utils.argbFromXyz(x, y, z);\n return argb;\n }\n /// Given color expressed in XYZ and viewed in [viewingConditions], convert to\n /// CAM16.\n static fromXyzInViewingConditions(x, y, z, viewingConditions) {\n // Transform XYZ to 'cone'/'rgb' responses\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n // Discount illuminant\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n // chromatic adaptation\n const rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100.0, 0.42);\n const gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100.0, 0.42);\n const bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100.0, 0.42);\n const rA = math.signum(rD) * 400.0 * rAF / (rAF + 27.13);\n const gA = math.signum(gD) * 400.0 * gAF / (gAF + 27.13);\n const bA = math.signum(bD) * 400.0 * bAF / (bAF + 27.13);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n // auxiliary components\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n // hue\n const atan2 = Math.atan2(b, a);\n const atanDegrees = atan2 * 180.0 / Math.PI;\n const hue = atanDegrees < 0 ? atanDegrees + 360.0 :\n atanDegrees >= 360 ? atanDegrees - 360 :\n atanDegrees;\n const hueRadians = hue * Math.PI / 180.0;\n // achromatic response to color\n const ac = p2 * viewingConditions.nbb;\n // CAM16 lightness and brightness\n const J = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const Q = (4.0 / viewingConditions.c) * Math.sqrt(J / 100.0) *\n (viewingConditions.aw + 4.0) * (viewingConditions.fLRoot);\n const huePrime = (hue < 20.14) ? hue + 360 : hue;\n const eHue = (1.0 / 4.0) * (Math.cos(huePrime * Math.PI / 180.0 + 2.0) + 3.8);\n const p1 = 50000.0 / 13.0 * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = p1 * Math.sqrt(a * a + b * b) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n // CAM16 chroma, colorfulness, chroma\n const C = alpha * Math.sqrt(J / 100.0);\n const M = C * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n // CAM16-UCS components\n const jstar = (1.0 + 100.0 * 0.007) * J / (1.0 + 0.007 * J);\n const mstar = Math.log(1.0 + 0.0228 * M) / 0.0228;\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, C, J, Q, M, s, jstar, astar, bstar);\n }\n /// XYZ representation of CAM16 seen in [viewingConditions].\n xyzInViewingConditions(viewingConditions) {\n const alpha = (this.chroma === 0.0 || this.j === 0.0) ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = this.hue * Math.PI / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = (ac / viewingConditions.nbb);\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n return [x, y, z];\n }\n}\n//# sourceMappingURL=cam16.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * A class that solves the HCT equation.\n */\nexport class HctSolver {\n /**\n * Sanitizes a small enough angle in radians.\n *\n * @param angle An angle in radians; must not deviate too much\n * from 0.\n * @return A coterminal angle between 0 and 2pi.\n */\n static sanitizeRadians(angle) {\n return (angle + Math.PI * 8) % (Math.PI * 2);\n }\n /**\n * Delinearizes an RGB component, returning a floating-point\n * number.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0.0 <= output <= 255.0, color channel converted to\n * regular RGB space\n */\n static trueDelinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return delinearized * 255.0;\n }\n static chromaticAdaptation(component) {\n const af = Math.pow(Math.abs(component), 0.42);\n return mathUtils.signum(component) * 400.0 * af / (af + 27.13);\n }\n /**\n * Returns the hue of a linear RGB color in CAM16.\n *\n * @param linrgb The linear RGB coordinates of a color.\n * @return The hue of the color in CAM16, in radians.\n */\n static hueOf(linrgb) {\n const scaledDiscount = mathUtils.matrixMultiply(linrgb, HctSolver.SCALED_DISCOUNT_FROM_LINRGB);\n const rA = HctSolver.chromaticAdaptation(scaledDiscount[0]);\n const gA = HctSolver.chromaticAdaptation(scaledDiscount[1]);\n const bA = HctSolver.chromaticAdaptation(scaledDiscount[2]);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n return Math.atan2(b, a);\n }\n static areInCyclicOrder(a, b, c) {\n const deltaAB = HctSolver.sanitizeRadians(b - a);\n const deltaAC = HctSolver.sanitizeRadians(c - a);\n return deltaAB < deltaAC;\n }\n /**\n * Solves the lerp equation.\n *\n * @param source The starting number.\n * @param mid The number in the middle.\n * @param target The ending number.\n * @return A number t such that lerp(source, target, t) = mid.\n */\n static intercept(source, mid, target) {\n return (mid - source) / (target - source);\n }\n static lerpPoint(source, t, target) {\n return [\n source[0] + (target[0] - source[0]) * t,\n source[1] + (target[1] - source[1]) * t,\n source[2] + (target[2] - source[2]) * t,\n ];\n }\n /**\n * Intersects a segment with a plane.\n *\n * @param source The coordinates of point A.\n * @param coordinate The R-, G-, or B-coordinate of the plane.\n * @param target The coordinates of point B.\n * @param axis The axis the plane is perpendicular with. (0: R, 1:\n * G, 2: B)\n * @return The intersection point of the segment AB with the plane\n * R=coordinate, G=coordinate, or B=coordinate\n */\n static setCoordinate(source, coordinate, target, axis) {\n const t = HctSolver.intercept(source[axis], coordinate, target[axis]);\n return HctSolver.lerpPoint(source, t, target);\n }\n static isBounded(x) {\n return 0.0 <= x && x <= 100.0;\n }\n /**\n * Returns the nth possible vertex of the polygonal intersection.\n *\n * @param y The Y value of the plane.\n * @param n The zero-based index of the point. 0 <= n <= 11.\n * @return The nth possible vertex of the polygonal intersection\n * of the y plane and the RGB cube, in linear RGB coordinates, if\n * it exists. If this possible vertex lies outside of the cube,\n * [-1.0, -1.0, -1.0] is returned.\n */\n static nthVertex(y, n) {\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const coordA = n % 4 <= 1 ? 0.0 : 100.0;\n const coordB = n % 2 === 0 ? 0.0 : 100.0;\n if (n < 4) {\n const g = coordA;\n const b = coordB;\n const r = (y - g * kG - b * kB) / kR;\n if (HctSolver.isBounded(r)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else if (n < 8) {\n const b = coordA;\n const r = coordB;\n const g = (y - r * kR - b * kB) / kG;\n if (HctSolver.isBounded(g)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else {\n const r = coordA;\n const g = coordB;\n const b = (y - r * kR - g * kG) / kB;\n if (HctSolver.isBounded(b)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n }\n /**\n * Finds the segment containing the desired color.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return A list of two sets of linear RGB coordinates, each\n * corresponding to an endpoint of the segment containing the\n * desired color.\n */\n static bisectToSegment(y, targetHue) {\n let left = [-1.0, -1.0, -1.0];\n let right = left;\n let leftHue = 0.0;\n let rightHue = 0.0;\n let initialized = false;\n let uncut = true;\n for (let n = 0; n < 12; n++) {\n const mid = HctSolver.nthVertex(y, n);\n if (mid[0] < 0) {\n continue;\n }\n const midHue = HctSolver.hueOf(mid);\n if (!initialized) {\n left = mid;\n right = mid;\n leftHue = midHue;\n rightHue = midHue;\n initialized = true;\n continue;\n }\n if (uncut || HctSolver.areInCyclicOrder(leftHue, midHue, rightHue)) {\n uncut = false;\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rightHue = midHue;\n }\n else {\n left = mid;\n leftHue = midHue;\n }\n }\n }\n return [left, right];\n }\n static midpoint(a, b) {\n return [\n (a[0] + b[0]) / 2,\n (a[1] + b[1]) / 2,\n (a[2] + b[2]) / 2,\n ];\n }\n static criticalPlaneBelow(x) {\n return Math.floor(x - 0.5);\n }\n static criticalPlaneAbove(x) {\n return Math.ceil(x - 0.5);\n }\n /**\n * Finds a color with the given Y and hue on the boundary of the\n * cube.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return The desired color, in linear RGB coordinates.\n */\n static bisectToLimit(y, targetHue) {\n const segment = HctSolver.bisectToSegment(y, targetHue);\n let left = segment[0];\n let leftHue = HctSolver.hueOf(left);\n let right = segment[1];\n for (let axis = 0; axis < 3; axis++) {\n if (left[axis] !== right[axis]) {\n let lPlane = -1;\n let rPlane = 255;\n if (left[axis] < right[axis]) {\n lPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(right[axis]));\n }\n else {\n lPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(right[axis]));\n }\n for (let i = 0; i < 8; i++) {\n if (Math.abs(rPlane - lPlane) <= 1) {\n break;\n }\n else {\n const mPlane = Math.floor((lPlane + rPlane) / 2.0);\n const midPlaneCoordinate = HctSolver.CRITICAL_PLANES[mPlane];\n const mid = HctSolver.setCoordinate(left, midPlaneCoordinate, right, axis);\n const midHue = HctSolver.hueOf(mid);\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rPlane = mPlane;\n }\n else {\n left = mid;\n leftHue = midHue;\n lPlane = mPlane;\n }\n }\n }\n }\n }\n return HctSolver.midpoint(left, right);\n }\n static inverseChromaticAdaptation(adapted) {\n const adaptedAbs = Math.abs(adapted);\n const base = Math.max(0, 27.13 * adaptedAbs / (400.0 - adaptedAbs));\n return mathUtils.signum(adapted) * Math.pow(base, 1.0 / 0.42);\n }\n /**\n * Finds a color with the given hue, chroma, and Y.\n *\n * @param hueRadians The desired hue in radians.\n * @param chroma The desired chroma.\n * @param y The desired Y.\n * @return The desired color as a hexadecimal integer, if found; 0\n * otherwise.\n */\n static findResultByJ(hueRadians, chroma, y) {\n // Initial estimate of j.\n let j = Math.sqrt(y) * 11.0;\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const viewingConditions = ViewingConditions.DEFAULT;\n const tInnerCoeff = 1 / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const eHue = 0.25 * (Math.cos(hueRadians + 2.0) + 3.8);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const hSin = Math.sin(hueRadians);\n const hCos = Math.cos(hueRadians);\n for (let iterationRound = 0; iterationRound < 5; iterationRound++) {\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const jNormalized = j / 100.0;\n const alpha = chroma === 0.0 || j === 0.0 ? 0.0 : chroma / Math.sqrt(jNormalized);\n const t = Math.pow(alpha * tInnerCoeff, 1.0 / 0.9);\n const ac = viewingConditions.aw *\n Math.pow(jNormalized, 1.0 / viewingConditions.c / viewingConditions.z);\n const p2 = ac / viewingConditions.nbb;\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCScaled = HctSolver.inverseChromaticAdaptation(rA);\n const gCScaled = HctSolver.inverseChromaticAdaptation(gA);\n const bCScaled = HctSolver.inverseChromaticAdaptation(bA);\n const linrgb = mathUtils.matrixMultiply([rCScaled, gCScaled, bCScaled], HctSolver.LINRGB_FROM_SCALED_DISCOUNT);\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n if (linrgb[0] < 0 || linrgb[1] < 0 || linrgb[2] < 0) {\n return 0;\n }\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const fnj = kR * linrgb[0] + kG * linrgb[1] + kB * linrgb[2];\n if (fnj <= 0) {\n return 0;\n }\n if (iterationRound === 4 || Math.abs(fnj - y) < 0.002) {\n if (linrgb[0] > 100.01 || linrgb[1] > 100.01 || linrgb[2] > 100.01) {\n return 0;\n }\n return colorUtils.argbFromLinrgb(linrgb);\n }\n // Iterates with Newton method,\n // Using 2 * fn(j) / j as the approximation of fn'(j)\n j = j - (fnj - y) * j / (2 * fnj);\n }\n return 0;\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return A hexadecimal representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToInt(hueDegrees, chroma, lstar) {\n if (chroma < 0.0001 || lstar < 0.0001 || lstar > 99.9999) {\n return colorUtils.argbFromLstar(lstar);\n }\n hueDegrees = mathUtils.sanitizeDegreesDouble(hueDegrees);\n const hueRadians = hueDegrees / 180 * Math.PI;\n const y = colorUtils.yFromLstar(lstar);\n const exactAnswer = HctSolver.findResultByJ(hueRadians, chroma, y);\n if (exactAnswer !== 0) {\n return exactAnswer;\n }\n const linrgb = HctSolver.bisectToLimit(y, hueRadians);\n return colorUtils.argbFromLinrgb(linrgb);\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return An CAM16 object representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToCam(hueDegrees, chroma, lstar) {\n return Cam16.fromInt(HctSolver.solveToInt(hueDegrees, chroma, lstar));\n }\n}\nHctSolver.SCALED_DISCOUNT_FROM_LINRGB = [\n [\n 0.001200833568784504,\n 0.002389694492170889,\n 0.0002795742885861124,\n ],\n [\n 0.0005891086651375999,\n 0.0029785502573438758,\n 0.0003270666104008398,\n ],\n [\n 0.00010146692491640572,\n 0.0005364214359186694,\n 0.0032979401770712076,\n ],\n];\nHctSolver.LINRGB_FROM_SCALED_DISCOUNT = [\n [\n 1373.2198709594231,\n -1100.4251190754821,\n -7.278681089101213,\n ],\n [\n -271.815969077903,\n 559.6580465940733,\n -32.46047482791194,\n ],\n [\n 1.9622899599665666,\n -57.173814538844006,\n 308.7233197812385,\n ],\n];\nHctSolver.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722];\nHctSolver.CRITICAL_PLANES = [\n 0.015176349177441876, 0.045529047532325624, 0.07588174588720938,\n 0.10623444424209313, 0.13658714259697685, 0.16693984095186062,\n 0.19729253930674434, 0.2276452376616281, 0.2579979360165119,\n 0.28835063437139563, 0.3188300904430532, 0.350925934958123,\n 0.3848314933096426, 0.42057480301049466, 0.458183274052838,\n 0.4976837250274023, 0.5391024159806381, 0.5824650784040898,\n 0.6277969426914107, 0.6751227633498623, 0.7244668422128921,\n 0.775853049866786, 0.829304845476233, 0.8848452951698498,\n 0.942497089126609, 1.0022825574869039, 1.0642236851973577,\n 1.1283421258858297, 1.1946592148522128, 1.2631959812511864,\n 1.3339731595349034, 1.407011200216447, 1.4823302800086415,\n 1.5599503113873272, 1.6398909516233677, 1.7221716113234105,\n 1.8068114625156377, 1.8938294463134073, 1.9832442801866852,\n 2.075074464868551, 2.1693382909216234, 2.2660538449872063,\n 2.36523901573795, 2.4669114995532007, 2.5710888059345764,\n 2.6777882626779785, 2.7870270208169257, 2.898822059350997,\n 3.0131901897720907, 3.1301480604002863, 3.2497121605402226,\n 3.3718988244681087, 3.4967242352587946, 3.624204428461639,\n 3.754355295633311, 3.887192587735158, 4.022731918402185,\n 4.160988767090289, 4.301978482107941, 4.445716283538092,\n 4.592217266055746, 4.741496401646282, 4.893568542229298,\n 5.048448422192488, 5.20615066083972, 5.3666897647573375,\n 5.5300801301023865, 5.696336044816294, 5.865471690767354,\n 6.037501145825082, 6.212438385869475, 6.390297286737924,\n 6.571091626112461, 6.7548350853498045, 6.941541251256611,\n 7.131223617812143, 7.323895587840543, 7.5195704746346665,\n 7.7182615035334345, 7.919981813454504, 8.124744458384042,\n 8.332562408825165, 8.543448553206703, 8.757415699253682,\n 8.974476575321063, 9.194643831691977, 9.417930041841839,\n 9.644347703669503, 9.873909240696694, 10.106627003236781,\n 10.342513269534024, 10.58158024687427, 10.8238400726681,\n 11.069304815507364, 11.317986476196008, 11.569896988756009,\n 11.825048221409341, 12.083451977536606, 12.345119996613247,\n 12.610063955123938, 12.878295467455942, 13.149826086772048,\n 13.42466730586372, 13.702830557985108, 13.984327217668513,\n 14.269168601521828, 14.55736596900856, 14.848930523210871,\n 15.143873411576273, 15.44220572664832, 15.743938506781891,\n 16.04908273684337, 16.35764934889634, 16.66964922287304,\n 16.985093187232053, 17.30399201960269, 17.62635644741625,\n 17.95219714852476, 18.281524751807332, 18.614349837764564,\n 18.95068293910138, 19.290534541298456, 19.633915083172692,\n 19.98083495742689, 20.331304511189067, 20.685334046541502,\n 21.042933821039977, 21.404114048223256, 21.76888489811322,\n 22.137256497705877, 22.50923893145328, 22.884842241736916,\n 23.264076429332462, 23.6469514538663, 24.033477234264016,\n 24.42366364919083, 24.817520537484558, 25.21505769858089,\n 25.61628489293138, 26.021211842414342, 26.429848230738664,\n 26.842203703840827, 27.258287870275353, 27.678110301598522,\n 28.10168053274597, 28.529008062403893, 28.96010235337422,\n 29.39497283293396, 29.83362889318845, 30.276079891419332,\n 30.722335150426627, 31.172403958865512, 31.62629557157785,\n 32.08401920991837, 32.54558406207592, 33.010999283389665,\n 33.4802739966603, 33.953417292456834, 34.430438229418264,\n 34.911345834551085, 35.39614910352207, 35.88485700094671,\n 36.37747846067349, 36.87402238606382, 37.37449765026789,\n 37.87891309649659, 38.38727753828926, 38.89959975977785,\n 39.41588851594697, 39.93615253289054, 40.460400508064545,\n 40.98864111053629, 41.520882981230194, 42.05713473317016,\n 42.597404951718396, 43.141702194811224, 43.6900349931913,\n 44.24241185063697, 44.798841244188324, 45.35933162437017,\n 45.92389141541209, 46.49252901546552, 47.065252796817916,\n 47.64207110610409, 48.22299226451468, 48.808024568002054,\n 49.3971762874833, 49.9904556690408, 50.587870934119984,\n 51.189430279724725, 51.79514187861014, 52.40501387947288,\n 53.0190544071392, 53.637271562750364, 54.259673423945976,\n 54.88626804504493, 55.517063457223934, 56.15206766869424,\n 56.79128866487574, 57.43473440856916, 58.08241284012621,\n 58.734331877617365, 59.39049941699807, 60.05092333227251,\n 60.715611475655585, 61.38457167773311, 62.057811747619894,\n 62.7353394731159, 63.417162620860914, 64.10328893648692,\n 64.79372614476921, 65.48848194977529, 66.18756403501224,\n 66.89098006357258, 67.59873767827808, 68.31084450182222,\n 69.02730813691093, 69.74813616640164, 70.47333615344107,\n 71.20291564160104, 71.93688215501312, 72.67524319850172,\n 73.41800625771542, 74.16517879925733, 74.9167682708136,\n 75.67278210128072, 76.43322770089146, 77.1981124613393,\n 77.96744375590167, 78.74122893956174, 79.51947534912904,\n 80.30219030335869, 81.08938110306934, 81.88105503125999,\n 82.67721935322541, 83.4778813166706, 84.28304815182372,\n 85.09272707154808, 85.90692527145302, 86.72564993000343,\n 87.54890820862819, 88.3767072518277, 89.2090541872801,\n 90.04595612594655, 90.88742016217518, 91.73345337380438,\n 92.58406282226491, 93.43925555268066, 94.29903859396902,\n 95.16341895893969, 96.03240364439274, 96.9059996312159,\n 97.78421388448044, 98.6670533535366, 99.55452497210776,\n];\n//# sourceMappingURL=hct_solver.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A color system built using CAM16 hue and chroma, and L* from\n * L*a*b*.\n *\n * Using L* creates a link between the color system, contrast, and thus\n * accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ\n * color space. L*, or perceptual luminance can be calculated from Y.\n *\n * Unlike Y, L* is linear to human perception, allowing trivial creation of\n * accurate color tones.\n *\n * Unlike contrast ratio, measuring contrast in L* is linear, and simple to\n * calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,\n * and a difference of 50 guarantees a contrast ratio >= 4.5.\n */\nimport * as utils from '../utils/color_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { HctSolver } from './hct_solver.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * HCT, hue, chroma, and tone. A color system that provides a perceptually\n * accurate color measurement system that can also accurately render what colors\n * will appear as in different lighting environments.\n */\nexport class Hct {\n static from(hue, chroma, tone) {\n return new Hct(HctSolver.solveToInt(hue, chroma, tone));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return HCT representation of a color in default viewing conditions\n */\n static fromInt(argb) {\n return new Hct(argb);\n }\n toInt() {\n return this.argb;\n }\n /**\n * A number, in degrees, representing ex. red, orange, yellow, etc.\n * Ranges from 0 <= hue < 360.\n */\n get hue() {\n return this.internalHue;\n }\n /**\n * @param newHue 0 <= newHue < 360; invalid values are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set hue(newHue) {\n this.setInternalState(HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone));\n }\n get chroma() {\n return this.internalChroma;\n }\n /**\n * @param newChroma 0 <= newChroma < ?\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set chroma(newChroma) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone));\n }\n /** Lightness. Ranges from 0 to 100. */\n get tone() {\n return this.internalTone;\n }\n /**\n * @param newTone 0 <= newTone <= 100; invalid valids are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set tone(newTone) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone));\n }\n constructor(argb) {\n this.argb = argb;\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n setInternalState(argb) {\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n /**\n * Translates a color into different [ViewingConditions].\n *\n * Colors change appearance. They look different with lights on versus off,\n * the same color, as in hex code, on white looks different when on black.\n * This is called color relativity, most famously explicated by Josef Albers\n * in Interaction of Color.\n *\n * In color science, color appearance models can account for this and\n * calculate the appearance of a color in different settings. HCT is based on\n * CAM16, a color appearance model, and uses it to make these calculations.\n *\n * See [ViewingConditions.make] for parameters affecting color appearance.\n */\n inViewingConditions(vc) {\n // 1. Use CAM16 to find XYZ coordinates of color in specified VC.\n const cam = Cam16.fromInt(this.toInt());\n const viewedInVc = cam.xyzInViewingConditions(vc);\n // 2. Create CAM16 of those XYZ coordinates in default VC.\n const recastInVc = Cam16.fromXyzInViewingConditions(viewedInVc[0], viewedInVc[1], viewedInVc[2], ViewingConditions.make());\n // 3. Create HCT from:\n // - CAM16 using default VC with XYZ coordinates in specified VC.\n // - L* converted from Y in XYZ coordinates in specified VC.\n const recastHct = Hct.from(recastInVc.hue, recastInVc.chroma, utils.lstarFromY(viewedInVc[1]));\n return recastHct;\n }\n}\n//# sourceMappingURL=hct.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * Utility methods for calculating contrast given two colors, or calculating a\n * color given one color and a contrast ratio.\n *\n * Contrast ratio is calculated using XYZ's Y. When linearized to match human\n * perception, Y becomes HCT's tone and L*a*b*'s' L*. Informally, this is the\n * lightness of a color.\n *\n * Methods refer to tone, T in the the HCT color space.\n * Tone is equivalent to L* in the L*a*b* color space, or L in the LCH color\n * space.\n */\nexport class Contrast {\n /**\n * Returns a contrast ratio, which ranges from 1 to 21.\n *\n * @param toneA Tone between 0 and 100. Values outside will be clamped.\n * @param toneB Tone between 0 and 100. Values outside will be clamped.\n */\n static ratioOfTones(toneA, toneB) {\n toneA = math.clampDouble(0.0, 100.0, toneA);\n toneB = math.clampDouble(0.0, 100.0, toneB);\n return Contrast.ratioOfYs(utils.yFromLstar(toneA), utils.yFromLstar(toneB));\n }\n static ratioOfYs(y1, y2) {\n const lighter = y1 > y2 ? y1 : y2;\n const darker = (lighter === y2) ? y1 : y2;\n return (lighter + 5.0) / (darker + 5.0);\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighter(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const darkY = utils.yFromLstar(tone);\n const lightY = ratio * (darkY + 5.0) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(lightY) + 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone <= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darker(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const lightY = utils.yFromLstar(tone);\n const darkY = ((lightY + 5.0) / ratio) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(darkY) - 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the ratio with tone. For example, there is no color lighter than T100.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 100 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighterUnsafe(tone, ratio) {\n const lighterSafe = Contrast.lighter(tone, ratio);\n return (lighterSafe < 0.0) ? 100.0 : lighterSafe;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the [ratio with [tone]. For example, there is no color darker than T0.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 0 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darkerUnsafe(tone, ratio) {\n const darkerSafe = Contrast.darker(tone, ratio);\n return (darkerSafe < 0.0) ? 0.0 : darkerSafe;\n }\n}\n//# sourceMappingURL=contrast.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * Check and/or fix universally disliked colors.\n * Color science studies of color preference indicate universal distaste for\n * dark yellow-greens, and also show this is correlated to distate for\n * biological waste and rotting food.\n *\n * See Palmer and Schloss, 2010 or Schloss and Palmer's Chapter 21 in Handbook\n * of Color Psychology (2015).\n */\nexport class DislikeAnalyzer {\n /**\n * Returns true if a color is disliked.\n *\n * @param hct A color to be judged.\n * @return Whether the color is disliked.\n *\n * Disliked is defined as a dark yellow-green that is not neutral.\n */\n static isDisliked(hct) {\n const huePasses = Math.round(hct.hue) >= 90.0 && Math.round(hct.hue) <= 111.0;\n const chromaPasses = Math.round(hct.chroma) > 16.0;\n const tonePasses = Math.round(hct.tone) < 65.0;\n return huePasses && chromaPasses && tonePasses;\n }\n /**\n * If a color is disliked, lighten it to make it likable.\n *\n * @param hct A color to be judged.\n * @return A new color if the original color is disliked, or the original\n * color if it is acceptable.\n */\n static fixIfDisliked(hct) {\n if (DislikeAnalyzer.isDisliked(hct)) {\n return Hct.from(hct.hue, hct.chroma, 70.0);\n }\n return hct;\n }\n}\n//# sourceMappingURL=dislike_analyzer.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Contrast } from '../contrast/contrast.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * A color that adjusts itself based on UI state provided by DynamicScheme.\n *\n * Colors without backgrounds do not change tone when contrast changes. Colors\n * with backgrounds become closer to their background as contrast lowers, and\n * further when contrast increases.\n *\n * Prefer static constructors. They require either a hexcode, a palette and\n * tone, or a hue and chroma. Optionally, they can provide a background\n * DynamicColor.\n */\nexport class DynamicColor {\n /**\n * Create a DynamicColor defined by a TonalPalette and HCT tone.\n *\n * @param args Functions with DynamicScheme as input. Must provide a palette\n * and tone. May provide a background DynamicColor and ToneDeltaConstraint.\n */\n static fromPalette(args) {\n return new DynamicColor(args.name ?? '', args.palette, args.tone, args.isBackground ?? false, args.background, args.secondBackground, args.contrastCurve, args.toneDeltaPair);\n }\n /**\n * The base constructor for DynamicColor.\n *\n * _Strongly_ prefer using one of the convenience constructors. This class is\n * arguably too flexible to ensure it can support any scenario. Functional\n * arguments allow overriding without risks that come with subclasses.\n *\n * For example, the default behavior of adjust tone at max contrast\n * to be at a 7.0 ratio with its background is principled and\n * matches accessibility guidance. That does not mean it's the desired\n * approach for _every_ design system, and every color pairing,\n * always, in every case.\n *\n * @param name The name of the dynamic color. Defaults to empty.\n * @param palette Function that provides a TonalPalette given\n * DynamicScheme. A TonalPalette is defined by a hue and chroma, so this\n * replaces the need to specify hue/chroma. By providing a tonal palette, when\n * contrast adjustments are made, intended chroma can be preserved.\n * @param tone Function that provides a tone, given a DynamicScheme.\n * @param isBackground Whether this dynamic color is a background, with\n * some other color as the foreground. Defaults to false.\n * @param background The background of the dynamic color (as a function of a\n * `DynamicScheme`), if it exists.\n * @param secondBackground A second background of the dynamic color (as a\n * function of a `DynamicScheme`), if it\n * exists.\n * @param contrastCurve A `ContrastCurve` object specifying how its contrast\n * against its background should behave in various contrast levels options.\n * @param toneDeltaPair A `ToneDeltaPair` object specifying a tone delta\n * constraint between two colors. One of them must be the color being\n * constructed.\n */\n constructor(name, palette, tone, isBackground, background, secondBackground, contrastCurve, toneDeltaPair) {\n this.name = name;\n this.palette = palette;\n this.tone = tone;\n this.isBackground = isBackground;\n this.background = background;\n this.secondBackground = secondBackground;\n this.contrastCurve = contrastCurve;\n this.toneDeltaPair = toneDeltaPair;\n this.hctCache = new Map();\n if ((!background) && secondBackground) {\n throw new Error(`Color ${name} has secondBackground` +\n `defined, but background is not defined.`);\n }\n if ((!background) && contrastCurve) {\n throw new Error(`Color ${name} has contrastCurve` +\n `defined, but background is not defined.`);\n }\n if (background && !contrastCurve) {\n throw new Error(`Color ${name} has background` +\n `defined, but contrastCurve is not defined.`);\n }\n }\n /**\n * Return a ARGB integer (i.e. a hex code).\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getArgb(scheme) {\n return this.getHct(scheme).toInt();\n }\n /**\n * Return a color, expressed in the HCT color space, that this\n * DynamicColor is under the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getHct(scheme) {\n const cachedAnswer = this.hctCache.get(scheme);\n if (cachedAnswer != null) {\n return cachedAnswer;\n }\n const tone = this.getTone(scheme);\n const answer = this.palette(scheme).getHct(tone);\n if (this.hctCache.size > 4) {\n this.hctCache.clear();\n }\n this.hctCache.set(scheme, answer);\n return answer;\n }\n /**\n * Return a tone, T in the HCT color space, that this DynamicColor is under\n * the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getTone(scheme) {\n const decreasingContrast = scheme.contrastLevel < 0;\n // Case 1: dual foreground, pair of colors with delta constraint.\n if (this.toneDeltaPair) {\n const toneDeltaPair = this.toneDeltaPair(scheme);\n const roleA = toneDeltaPair.roleA;\n const roleB = toneDeltaPair.roleB;\n const delta = toneDeltaPair.delta;\n const polarity = toneDeltaPair.polarity;\n const stayTogether = toneDeltaPair.stayTogether;\n const bg = this.background(scheme);\n const bgTone = bg.getTone(scheme);\n const aIsNearer = (polarity === 'nearer' ||\n (polarity === 'lighter' && !scheme.isDark) ||\n (polarity === 'darker' && scheme.isDark));\n const nearer = aIsNearer ? roleA : roleB;\n const farther = aIsNearer ? roleB : roleA;\n const amNearer = this.name === nearer.name;\n const expansionDir = scheme.isDark ? 1 : -1;\n // 1st round: solve to min, each\n const nContrast = nearer.contrastCurve.get(scheme.contrastLevel);\n const fContrast = farther.contrastCurve.get(scheme.contrastLevel);\n // If a color is good enough, it is not adjusted.\n // Initial and adjusted tones for `nearer`\n const nInitialTone = nearer.tone(scheme);\n let nTone = Contrast.ratioOfTones(bgTone, nInitialTone) >= nContrast ?\n nInitialTone :\n DynamicColor.foregroundTone(bgTone, nContrast);\n // Initial and adjusted tones for `farther`\n const fInitialTone = farther.tone(scheme);\n let fTone = Contrast.ratioOfTones(bgTone, fInitialTone) >= fContrast ?\n fInitialTone :\n DynamicColor.foregroundTone(bgTone, fContrast);\n if (decreasingContrast) {\n // If decreasing contrast, adjust color to the \"bare minimum\"\n // that satisfies contrast.\n nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n }\n if ((fTone - nTone) * expansionDir >= delta) {\n // Good! Tones satisfy the constraint; no change needed.\n }\n else {\n // 2nd round: expand farther to match delta.\n fTone = math.clampDouble(0, 100, nTone + delta * expansionDir);\n if ((fTone - nTone) * expansionDir >= delta) {\n // Good! Tones now satisfy the constraint; no change needed.\n }\n else {\n // 3rd round: contract nearer to match delta.\n nTone = math.clampDouble(0, 100, fTone - delta * expansionDir);\n }\n }\n // Avoids the 50-59 awkward zone.\n if (50 <= nTone && nTone < 60) {\n // If `nearer` is in the awkward zone, move it away, together with\n // `farther`.\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else if (50 <= fTone && fTone < 60) {\n if (stayTogether) {\n // Fixes both, to avoid two colors on opposite sides of the \"awkward\n // zone\".\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else {\n // Not required to stay together; fixes just one.\n if (expansionDir > 0) {\n fTone = 60;\n }\n else {\n fTone = 49;\n }\n }\n }\n // Returns `nTone` if this color is `nearer`, otherwise `fTone`.\n return amNearer ? nTone : fTone;\n }\n else {\n // Case 2: No contrast pair; just solve for itself.\n let answer = this.tone(scheme);\n if (this.background == null) {\n return answer; // No adjustment for colors with no background.\n }\n const bgTone = this.background(scheme).getTone(scheme);\n const desiredRatio = this.contrastCurve.get(scheme.contrastLevel);\n if (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio) {\n // Don't \"improve\" what's good enough.\n }\n else {\n // Rough improvement.\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (decreasingContrast) {\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (this.isBackground && 50 <= answer && answer < 60) {\n // Must adjust\n if (Contrast.ratioOfTones(49, bgTone) >= desiredRatio) {\n answer = 49;\n }\n else {\n answer = 60;\n }\n }\n if (this.secondBackground) {\n // Case 3: Adjust for dual backgrounds.\n const [bg1, bg2] = [this.background, this.secondBackground];\n const [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n const [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n if (Contrast.ratioOfTones(upper, answer) >= desiredRatio &&\n Contrast.ratioOfTones(lower, answer) >= desiredRatio) {\n return answer;\n }\n // The darkest light tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const lightOption = Contrast.lighter(upper, desiredRatio);\n // The lightest dark tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const darkOption = Contrast.darker(lower, desiredRatio);\n // Tones suitable for the foreground.\n const availables = [];\n if (lightOption !== -1)\n availables.push(lightOption);\n if (darkOption !== -1)\n availables.push(darkOption);\n const prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) ||\n DynamicColor.tonePrefersLightForeground(bgTone2);\n if (prefersLight) {\n return (lightOption < 0) ? 100 : lightOption;\n }\n if (availables.length === 1) {\n return availables[0];\n }\n return (darkOption < 0) ? 0 : darkOption;\n }\n return answer;\n }\n }\n /**\n * Given a background tone, find a foreground tone, while ensuring they reach\n * a contrast ratio that is as close to [ratio] as possible.\n *\n * @param bgTone Tone in HCT. Range is 0 to 100, undefined behavior when it\n * falls outside that range.\n * @param ratio The contrast ratio desired between bgTone and the return\n * value.\n */\n static foregroundTone(bgTone, ratio) {\n const lighterTone = Contrast.lighterUnsafe(bgTone, ratio);\n const darkerTone = Contrast.darkerUnsafe(bgTone, ratio);\n const lighterRatio = Contrast.ratioOfTones(lighterTone, bgTone);\n const darkerRatio = Contrast.ratioOfTones(darkerTone, bgTone);\n const preferLighter = DynamicColor.tonePrefersLightForeground(bgTone);\n if (preferLighter) {\n // This handles an edge case where the initial contrast ratio is high\n // (ex. 13.0), and the ratio passed to the function is that high\n // ratio, and both the lighter and darker ratio fails to pass that\n // ratio.\n //\n // This was observed with Tonal Spot's On Primary Container turning\n // black momentarily between high and max contrast in light mode. PC's\n // standard tone was T90, OPC's was T10, it was light mode, and the\n // contrast value was 0.6568521221032331.\n const negligibleDifference = Math.abs(lighterRatio - darkerRatio) < 0.1 &&\n lighterRatio < ratio && darkerRatio < ratio;\n return lighterRatio >= ratio || lighterRatio >= darkerRatio ||\n negligibleDifference ?\n lighterTone :\n darkerTone;\n }\n else {\n return darkerRatio >= ratio || darkerRatio >= lighterRatio ? darkerTone :\n lighterTone;\n }\n }\n /**\n * Returns whether [tone] prefers a light foreground.\n *\n * People prefer white foregrounds on ~T60-70. Observed over time, and also\n * by Andrew Somers during research for APCA.\n *\n * T60 used as to create the smallest discontinuity possible when skipping\n * down to T49 in order to ensure light foregrounds.\n * Since `tertiaryContainer` in dark monochrome scheme requires a tone of\n * 60, it should not be adjusted. Therefore, 60 is excluded here.\n */\n static tonePrefersLightForeground(tone) {\n return Math.round(tone) < 60.0;\n }\n /**\n * Returns whether [tone] can reach a contrast ratio of 4.5 with a lighter\n * color.\n */\n static toneAllowsLightForeground(tone) {\n return Math.round(tone) <= 49.0;\n }\n /**\n * Adjust a tone such that white has 4.5 contrast, if the tone is\n * reasonably close to supporting it.\n */\n static enableLightForeground(tone) {\n if (DynamicColor.tonePrefersLightForeground(tone) &&\n !DynamicColor.toneAllowsLightForeground(tone)) {\n return 49.0;\n }\n return tone;\n }\n}\n//# sourceMappingURL=dynamic_color.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb) {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue, chroma) {\n const keyColor = new KeyColor(hue, chroma).create();\n return new TonalPalette(hue, chroma, keyColor);\n }\n constructor(hue, chroma, keyColor) {\n this.hue = hue;\n this.chroma = chroma;\n this.keyColor = keyColor;\n this.cache = new Map();\n }\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone) {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n this.cache.set(tone, argb);\n }\n return argb;\n }\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone) {\n return Hct.fromInt(this.tone(tone));\n }\n}\n/**\n * Key color is a color that represents the hue and chroma of a tonal palette\n */\nclass KeyColor {\n constructor(hue, requestedChroma) {\n this.hue = hue;\n this.requestedChroma = requestedChroma;\n // Cache that maps tone to max chroma to avoid duplicated HCT calculation.\n this.chromaCache = new Map();\n this.maxChromaValue = 200.0;\n }\n /**\n * Creates a key color from a [hue] and a [chroma].\n * The key color is the first tone, starting from T50, matching the given hue\n * and chroma.\n *\n * @return Key color [Hct]\n */\n create() {\n // Pivot around T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer.\n const pivotTone = 50;\n const toneStepSize = 1;\n // Epsilon to accept values slightly higher than the requested chroma.\n const epsilon = 0.01;\n // Binary search to find the tone that can provide a chroma that is closest\n // to the requested chroma.\n let lowerTone = 0;\n let upperTone = 100;\n while (lowerTone < upperTone) {\n const midTone = Math.floor((lowerTone + upperTone) / 2);\n const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);\n const sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;\n if (sufficientChroma) {\n // Either range [lowerTone, midTone] or [midTone, upperTone] has\n // the answer, so search in the range that is closer the pivot tone.\n if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) {\n upperTone = midTone;\n }\n else {\n if (lowerTone === midTone) {\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n lowerTone = midTone;\n }\n }\n else {\n // As there is no sufficient chroma in the midTone, follow the direction\n // to the chroma peak.\n if (isAscending) {\n lowerTone = midTone + toneStepSize;\n }\n else {\n // Keep midTone for potential chroma peak.\n upperTone = midTone;\n }\n }\n }\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n // Find the maximum chroma for a given tone\n maxChroma(tone) {\n if (this.chromaCache.has(tone)) {\n return this.chromaCache.get(tone);\n }\n const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;\n this.chromaCache.set(tone, chroma);\n return chroma;\n }\n}\n//# sourceMappingURL=tonal_palette.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as math from '../utils/math_utils.js';\n/**\n * A class containing a value that changes with the contrast level.\n *\n * Usually represents the contrast requirements for a dynamic color on its\n * background. The four values correspond to values for contrast levels -1.0,\n * 0.0, 0.5, and 1.0, respectively.\n */\nexport class ContrastCurve {\n /**\n * Creates a `ContrastCurve` object.\n *\n * @param low Value for contrast level -1.0\n * @param normal Value for contrast level 0.0\n * @param medium Value for contrast level 0.5\n * @param high Value for contrast level 1.0\n */\n constructor(low, normal, medium, high) {\n this.low = low;\n this.normal = normal;\n this.medium = medium;\n this.high = high;\n }\n /**\n * Returns the value at a given contrast level.\n *\n * @param contrastLevel The contrast level. 0.0 is the default (normal); -1.0\n * is the lowest; 1.0 is the highest.\n * @return The value. For contrast ratios, a number between 1.0 and 21.0.\n */\n get(contrastLevel) {\n if (contrastLevel <= -1.0) {\n return this.low;\n }\n else if (contrastLevel < 0.0) {\n return math.lerp(this.low, this.normal, (contrastLevel - (-1)) / 1);\n }\n else if (contrastLevel < 0.5) {\n return math.lerp(this.normal, this.medium, (contrastLevel - 0) / 0.5);\n }\n else if (contrastLevel < 1.0) {\n return math.lerp(this.medium, this.high, (contrastLevel - 0.5) / 0.5);\n }\n else {\n return this.high;\n }\n }\n}\n//# sourceMappingURL=contrast_curve.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Documents a constraint between two DynamicColors, in which their tones must\n * have a certain distance from each other.\n *\n * Prefer a DynamicColor with a background, this is for special cases when\n * designers want tonal distance, literally contrast, between two colors that\n * don't have a background / foreground relationship or a contrast guarantee.\n */\nexport class ToneDeltaPair {\n /**\n * Documents a constraint in tone distance between two DynamicColors.\n *\n * The polarity is an adjective that describes \"A\", compared to \"B\".\n *\n * For instance, ToneDeltaPair(A, B, 15, 'darker', stayTogether) states that\n * A's tone should be at least 15 darker than B's.\n *\n * 'nearer' and 'farther' describes closeness to the surface roles. For\n * instance, ToneDeltaPair(A, B, 10, 'nearer', stayTogether) states that A\n * should be 10 lighter than B in light mode, and 10 darker than B in dark\n * mode.\n *\n * @param roleA The first role in a pair.\n * @param roleB The second role in a pair.\n * @param delta Required difference between tones. Absolute value, negative\n * values have undefined behavior.\n * @param polarity The relative relation between tones of roleA and roleB,\n * as described above.\n * @param stayTogether Whether these two roles should stay on the same side of\n * the \"awkward zone\" (T50-59). This is necessary for certain cases where\n * one role has two backgrounds.\n */\n constructor(roleA, roleB, delta, polarity, stayTogether) {\n this.roleA = roleA;\n this.roleB = roleB;\n this.delta = delta;\n this.polarity = polarity;\n this.stayTogether = stayTogether;\n }\n}\n//# sourceMappingURL=tone_delta_pair.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Set of themes supported by Dynamic Color.\n * Instantiate the corresponding subclass, ex. SchemeTonalSpot, to create\n * colors corresponding to the theme.\n */\nexport var Variant;\n(function (Variant) {\n Variant[Variant[\"MONOCHROME\"] = 0] = \"MONOCHROME\";\n Variant[Variant[\"NEUTRAL\"] = 1] = \"NEUTRAL\";\n Variant[Variant[\"TONAL_SPOT\"] = 2] = \"TONAL_SPOT\";\n Variant[Variant[\"VIBRANT\"] = 3] = \"VIBRANT\";\n Variant[Variant[\"EXPRESSIVE\"] = 4] = \"EXPRESSIVE\";\n Variant[Variant[\"FIDELITY\"] = 5] = \"FIDELITY\";\n Variant[Variant[\"CONTENT\"] = 6] = \"CONTENT\";\n Variant[Variant[\"RAINBOW\"] = 7] = \"RAINBOW\";\n Variant[Variant[\"FRUIT_SALAD\"] = 8] = \"FRUIT_SALAD\";\n})(Variant || (Variant = {}));\n//# sourceMappingURL=variant.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DislikeAnalyzer } from '../dislike/dislike_analyzer.js';\nimport { Hct } from '../hct/hct.js';\nimport { ContrastCurve } from './contrast_curve.js';\nimport { DynamicColor } from './dynamic_color.js';\nimport { ToneDeltaPair } from './tone_delta_pair.js';\nimport { Variant } from './variant.js';\nfunction isFidelity(scheme) {\n return scheme.variant === Variant.FIDELITY ||\n scheme.variant === Variant.CONTENT;\n}\nfunction isMonochrome(scheme) {\n return scheme.variant === Variant.MONOCHROME;\n}\nfunction findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {\n let answer = tone;\n let closestToChroma = Hct.from(hue, chroma, tone);\n if (closestToChroma.chroma < chroma) {\n let chromaPeak = closestToChroma.chroma;\n while (closestToChroma.chroma < chroma) {\n answer += byDecreasingTone ? -1.0 : 1.0;\n const potentialSolution = Hct.from(hue, chroma, answer);\n if (chromaPeak > potentialSolution.chroma) {\n break;\n }\n if (Math.abs(potentialSolution.chroma - chroma) < 0.4) {\n break;\n }\n const potentialDelta = Math.abs(potentialSolution.chroma - chroma);\n const currentDelta = Math.abs(closestToChroma.chroma - chroma);\n if (potentialDelta < currentDelta) {\n closestToChroma = potentialSolution;\n }\n chromaPeak = Math.max(chromaPeak, potentialSolution.chroma);\n }\n }\n return answer;\n}\n/**\n * DynamicColors for the colors in the Material Design system.\n */\n// Material Color Utilities namespaces the various utilities it provides.\n// tslint:disable-next-line:class-as-namespace\nexport class MaterialDynamicColors {\n static highestSurface(s) {\n return s.isDark ? MaterialDynamicColors.surfaceBright :\n MaterialDynamicColors.surfaceDim;\n }\n}\nMaterialDynamicColors.contentAccentToneDelta = 15.0;\nMaterialDynamicColors.primaryPaletteKeyColor = DynamicColor.fromPalette({\n name: 'primary_palette_key_color',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.primaryPalette.keyColor.tone,\n});\nMaterialDynamicColors.secondaryPaletteKeyColor = DynamicColor.fromPalette({\n name: 'secondary_palette_key_color',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.secondaryPalette.keyColor.tone,\n});\nMaterialDynamicColors.tertiaryPaletteKeyColor = DynamicColor.fromPalette({\n name: 'tertiary_palette_key_color',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => s.tertiaryPalette.keyColor.tone,\n});\nMaterialDynamicColors.neutralPaletteKeyColor = DynamicColor.fromPalette({\n name: 'neutral_palette_key_color',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.neutralPalette.keyColor.tone,\n});\nMaterialDynamicColors.neutralVariantPaletteKeyColor = DynamicColor.fromPalette({\n name: 'neutral_variant_palette_key_color',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.neutralVariantPalette.keyColor.tone,\n});\nMaterialDynamicColors.background = DynamicColor.fromPalette({\n name: 'background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n});\nMaterialDynamicColors.onBackground = DynamicColor.fromPalette({\n name: 'on_background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => MaterialDynamicColors.background,\n contrastCurve: new ContrastCurve(3, 3, 4.5, 7),\n});\nMaterialDynamicColors.surface = DynamicColor.fromPalette({\n name: 'surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n});\nMaterialDynamicColors.surfaceDim = DynamicColor.fromPalette({\n name: 'surface_dim',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : new ContrastCurve(87, 87, 80, 75).get(s.contrastLevel),\n isBackground: true,\n});\nMaterialDynamicColors.surfaceBright = DynamicColor.fromPalette({\n name: 'surface_bright',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? new ContrastCurve(24, 24, 29, 34).get(s.contrastLevel) : 98,\n isBackground: true,\n});\nMaterialDynamicColors.surfaceContainerLowest = DynamicColor.fromPalette({\n name: 'surface_container_lowest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? new ContrastCurve(4, 4, 2, 0).get(s.contrastLevel) : 100,\n isBackground: true,\n});\nMaterialDynamicColors.surfaceContainerLow = DynamicColor.fromPalette({\n name: 'surface_container_low',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(10, 10, 11, 12).get(s.contrastLevel) :\n new ContrastCurve(96, 96, 96, 95).get(s.contrastLevel),\n isBackground: true,\n});\nMaterialDynamicColors.surfaceContainer = DynamicColor.fromPalette({\n name: 'surface_container',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(12, 12, 16, 20).get(s.contrastLevel) :\n new ContrastCurve(94, 94, 92, 90).get(s.contrastLevel),\n isBackground: true,\n});\nMaterialDynamicColors.surfaceContainerHigh = DynamicColor.fromPalette({\n name: 'surface_container_high',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(17, 17, 21, 25).get(s.contrastLevel) :\n new ContrastCurve(92, 92, 88, 85).get(s.contrastLevel),\n isBackground: true,\n});\nMaterialDynamicColors.surfaceContainerHighest = DynamicColor.fromPalette({\n name: 'surface_container_highest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(22, 22, 26, 30).get(s.contrastLevel) :\n new ContrastCurve(90, 90, 84, 80).get(s.contrastLevel),\n isBackground: true,\n});\nMaterialDynamicColors.onSurface = DynamicColor.fromPalette({\n name: 'on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.surfaceVariant = DynamicColor.fromPalette({\n name: 'surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n});\nMaterialDynamicColors.onSurfaceVariant = DynamicColor.fromPalette({\n name: 'on_surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 80 : 30,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.inverseSurface = DynamicColor.fromPalette({\n name: 'inverse_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 20,\n});\nMaterialDynamicColors.inverseOnSurface = DynamicColor.fromPalette({\n name: 'inverse_on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 20 : 95,\n background: (s) => MaterialDynamicColors.inverseSurface,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.outline = DynamicColor.fromPalette({\n name: 'outline',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 60 : 50,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1.5, 3, 4.5, 7),\n});\nMaterialDynamicColors.outlineVariant = DynamicColor.fromPalette({\n name: 'outline_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 80,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n});\nMaterialDynamicColors.shadow = DynamicColor.fromPalette({\n name: 'shadow',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n});\nMaterialDynamicColors.scrim = DynamicColor.fromPalette({\n name: 'scrim',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n});\nMaterialDynamicColors.surfaceTint = DynamicColor.fromPalette({\n name: 'surface_tint',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n});\nMaterialDynamicColors.primary = DynamicColor.fromPalette({\n name: 'primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 100 : 0;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onPrimary = DynamicColor.fromPalette({\n name: 'on_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => MaterialDynamicColors.primary,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.primaryContainer = DynamicColor.fromPalette({\n name: 'primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return s.sourceColorHct.tone;\n }\n if (isMonochrome(s)) {\n return s.isDark ? 85 : 25;\n }\n return s.isDark ? 30 : 90;\n },\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onPrimaryContainer = DynamicColor.fromPalette({\n name: 'on_primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return DynamicColor.foregroundTone(MaterialDynamicColors.primaryContainer.tone(s), 4.5);\n }\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => MaterialDynamicColors.primaryContainer,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.inversePrimary = DynamicColor.fromPalette({\n name: 'inverse_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 40 : 80,\n background: (s) => MaterialDynamicColors.inverseSurface,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 7),\n});\nMaterialDynamicColors.secondary = DynamicColor.fromPalette({\n name: 'secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onSecondary = DynamicColor.fromPalette({\n name: 'on_secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 100;\n }\n else {\n return s.isDark ? 20 : 100;\n }\n },\n background: (s) => MaterialDynamicColors.secondary,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.secondaryContainer = DynamicColor.fromPalette({\n name: 'secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n const initialTone = s.isDark ? 30 : 90;\n if (isMonochrome(s)) {\n return s.isDark ? 30 : 85;\n }\n if (!isFidelity(s)) {\n return initialTone;\n }\n return findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);\n },\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onSecondaryContainer = DynamicColor.fromPalette({\n name: 'on_secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(MaterialDynamicColors.secondaryContainer.tone(s), 4.5);\n },\n background: (s) => MaterialDynamicColors.secondaryContainer,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.tertiary = DynamicColor.fromPalette({\n name: 'tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 25;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onTertiary = DynamicColor.fromPalette({\n name: 'on_tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => MaterialDynamicColors.tertiary,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.tertiaryContainer = DynamicColor.fromPalette({\n name: 'tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 60 : 49;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 30 : 90;\n }\n const proposedHct = s.tertiaryPalette.getHct(s.sourceColorHct.tone);\n return DislikeAnalyzer.fixIfDisliked(proposedHct).tone;\n },\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 10, 'nearer', false),\n});\nMaterialDynamicColors.onTertiaryContainer = DynamicColor.fromPalette({\n name: 'on_tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(MaterialDynamicColors.tertiaryContainer.tone(s), 4.5);\n },\n background: (s) => MaterialDynamicColors.tertiaryContainer,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.error = DynamicColor.fromPalette({\n name: 'error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 10, 'nearer', false),\n});\nMaterialDynamicColors.onError = DynamicColor.fromPalette({\n name: 'on_error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 20 : 100,\n background: (s) => MaterialDynamicColors.error,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.errorContainer = DynamicColor.fromPalette({\n name: 'error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 10, 'nearer', false),\n});\nMaterialDynamicColors.onErrorContainer = DynamicColor.fromPalette({\n name: 'on_error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => MaterialDynamicColors.errorContainer,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.primaryFixed = DynamicColor.fromPalette({\n name: 'primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.primaryFixedDim = DynamicColor.fromPalette({\n name: 'primary_fixed_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.onPrimaryFixed = DynamicColor.fromPalette({\n name: 'on_primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => MaterialDynamicColors.primaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.primaryFixed,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.onPrimaryFixedVariant = DynamicColor.fromPalette({\n name: 'on_primary_fixed_variant',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => MaterialDynamicColors.primaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.primaryFixed,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.secondaryFixed = DynamicColor.fromPalette({\n name: 'secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 80.0 : 90.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.secondaryFixedDim = DynamicColor.fromPalette({\n name: 'secondary_fixed_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 70.0 : 80.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.onSecondaryFixed = DynamicColor.fromPalette({\n name: 'on_secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => 10.0,\n background: (s) => MaterialDynamicColors.secondaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.secondaryFixed,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.onSecondaryFixedVariant = DynamicColor.fromPalette({\n name: 'on_secondary_fixed_variant',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 25.0 : 30.0,\n background: (s) => MaterialDynamicColors.secondaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.secondaryFixed,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\nMaterialDynamicColors.tertiaryFixed = DynamicColor.fromPalette({\n name: 'tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.tertiaryFixedDim = DynamicColor.fromPalette({\n name: 'tertiary_fixed_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => MaterialDynamicColors.highestSurface(s),\n contrastCurve: new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, 'lighter', true),\n});\nMaterialDynamicColors.onTertiaryFixed = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => MaterialDynamicColors.tertiaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.tertiaryFixed,\n contrastCurve: new ContrastCurve(4.5, 7, 11, 21),\n});\nMaterialDynamicColors.onTertiaryFixedVariant = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed_variant',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => MaterialDynamicColors.tertiaryFixedDim,\n secondBackground: (s) => MaterialDynamicColors.tertiaryFixed,\n contrastCurve: new ContrastCurve(3, 4.5, 7, 11),\n});\n//# sourceMappingURL=material_dynamic_colors.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from '../palettes/tonal_palette.js';\nimport * as math from '../utils/math_utils.js';\nimport { MaterialDynamicColors } from './material_dynamic_colors.js';\n/**\n * Constructed by a set of values representing the current UI state (such as\n * whether or not its dark theme, what the theme style is, etc.), and\n * provides a set of TonalPalettes that can create colors that fit in\n * with the theme style. Used by DynamicColor to resolve into a color.\n */\nexport class DynamicScheme {\n constructor(args) {\n this.sourceColorArgb = args.sourceColorArgb;\n this.variant = args.variant;\n this.contrastLevel = args.contrastLevel;\n this.isDark = args.isDark;\n this.sourceColorHct = Hct.fromInt(args.sourceColorArgb);\n this.primaryPalette = args.primaryPalette;\n this.secondaryPalette = args.secondaryPalette;\n this.tertiaryPalette = args.tertiaryPalette;\n this.neutralPalette = args.neutralPalette;\n this.neutralVariantPalette = args.neutralVariantPalette;\n this.errorPalette = TonalPalette.fromHueAndChroma(25.0, 84.0);\n }\n /**\n * Support design spec'ing Dynamic Color by schemes that specify hue\n * rotations that should be applied at certain breakpoints.\n * @param sourceColor the source color of the theme, in HCT.\n * @param hues The \"breakpoints\", i.e. the hues at which a rotation should\n * be apply.\n * @param rotations The rotation that should be applied when source color's\n * hue is >= the same index in hues array, and <= the hue at the next index\n * in hues array.\n */\n static getRotatedHue(sourceColor, hues, rotations) {\n const sourceHue = sourceColor.hue;\n if (hues.length !== rotations.length) {\n throw new Error(`mismatch between hue length ${hues.length} & rotations ${rotations.length}`);\n }\n if (rotations.length === 1) {\n return math.sanitizeDegreesDouble(sourceColor.hue + rotations[0]);\n }\n const size = hues.length;\n for (let i = 0; i <= size - 2; i++) {\n const thisHue = hues[i];\n const nextHue = hues[i + 1];\n if (thisHue < sourceHue && sourceHue < nextHue) {\n return math.sanitizeDegreesDouble(sourceHue + rotations[i]);\n }\n }\n // If this statement executes, something is wrong, there should have been a\n // rotation found using the arrays.\n return sourceHue;\n }\n getArgb(dynamicColor) {\n return dynamicColor.getArgb(this);\n }\n getHct(dynamicColor) {\n return dynamicColor.getHct(this);\n }\n get primaryPaletteKeyColor() {\n return this.getArgb(MaterialDynamicColors.primaryPaletteKeyColor);\n }\n get secondaryPaletteKeyColor() {\n return this.getArgb(MaterialDynamicColors.secondaryPaletteKeyColor);\n }\n get tertiaryPaletteKeyColor() {\n return this.getArgb(MaterialDynamicColors.tertiaryPaletteKeyColor);\n }\n get neutralPaletteKeyColor() {\n return this.getArgb(MaterialDynamicColors.neutralPaletteKeyColor);\n }\n get neutralVariantPaletteKeyColor() {\n return this.getArgb(MaterialDynamicColors.neutralVariantPaletteKeyColor);\n }\n get background() {\n return this.getArgb(MaterialDynamicColors.background);\n }\n get onBackground() {\n return this.getArgb(MaterialDynamicColors.onBackground);\n }\n get surface() {\n return this.getArgb(MaterialDynamicColors.surface);\n }\n get surfaceDim() {\n return this.getArgb(MaterialDynamicColors.surfaceDim);\n }\n get surfaceBright() {\n return this.getArgb(MaterialDynamicColors.surfaceBright);\n }\n get surfaceContainerLowest() {\n return this.getArgb(MaterialDynamicColors.surfaceContainerLowest);\n }\n get surfaceContainerLow() {\n return this.getArgb(MaterialDynamicColors.surfaceContainerLow);\n }\n get surfaceContainer() {\n return this.getArgb(MaterialDynamicColors.surfaceContainer);\n }\n get surfaceContainerHigh() {\n return this.getArgb(MaterialDynamicColors.surfaceContainerHigh);\n }\n get surfaceContainerHighest() {\n return this.getArgb(MaterialDynamicColors.surfaceContainerHighest);\n }\n get onSurface() {\n return this.getArgb(MaterialDynamicColors.onSurface);\n }\n get surfaceVariant() {\n return this.getArgb(MaterialDynamicColors.surfaceVariant);\n }\n get onSurfaceVariant() {\n return this.getArgb(MaterialDynamicColors.onSurfaceVariant);\n }\n get inverseSurface() {\n return this.getArgb(MaterialDynamicColors.inverseSurface);\n }\n get inverseOnSurface() {\n return this.getArgb(MaterialDynamicColors.inverseOnSurface);\n }\n get outline() {\n return this.getArgb(MaterialDynamicColors.outline);\n }\n get outlineVariant() {\n return this.getArgb(MaterialDynamicColors.outlineVariant);\n }\n get shadow() {\n return this.getArgb(MaterialDynamicColors.shadow);\n }\n get scrim() {\n return this.getArgb(MaterialDynamicColors.scrim);\n }\n get surfaceTint() {\n return this.getArgb(MaterialDynamicColors.surfaceTint);\n }\n get primary() {\n return this.getArgb(MaterialDynamicColors.primary);\n }\n get onPrimary() {\n return this.getArgb(MaterialDynamicColors.onPrimary);\n }\n get primaryContainer() {\n return this.getArgb(MaterialDynamicColors.primaryContainer);\n }\n get onPrimaryContainer() {\n return this.getArgb(MaterialDynamicColors.onPrimaryContainer);\n }\n get inversePrimary() {\n return this.getArgb(MaterialDynamicColors.inversePrimary);\n }\n get secondary() {\n return this.getArgb(MaterialDynamicColors.secondary);\n }\n get onSecondary() {\n return this.getArgb(MaterialDynamicColors.onSecondary);\n }\n get secondaryContainer() {\n return this.getArgb(MaterialDynamicColors.secondaryContainer);\n }\n get onSecondaryContainer() {\n return this.getArgb(MaterialDynamicColors.onSecondaryContainer);\n }\n get tertiary() {\n return this.getArgb(MaterialDynamicColors.tertiary);\n }\n get onTertiary() {\n return this.getArgb(MaterialDynamicColors.onTertiary);\n }\n get tertiaryContainer() {\n return this.getArgb(MaterialDynamicColors.tertiaryContainer);\n }\n get onTertiaryContainer() {\n return this.getArgb(MaterialDynamicColors.onTertiaryContainer);\n }\n get error() {\n return this.getArgb(MaterialDynamicColors.error);\n }\n get onError() {\n return this.getArgb(MaterialDynamicColors.onError);\n }\n get errorContainer() {\n return this.getArgb(MaterialDynamicColors.errorContainer);\n }\n get onErrorContainer() {\n return this.getArgb(MaterialDynamicColors.onErrorContainer);\n }\n get primaryFixed() {\n return this.getArgb(MaterialDynamicColors.primaryFixed);\n }\n get primaryFixedDim() {\n return this.getArgb(MaterialDynamicColors.primaryFixedDim);\n }\n get onPrimaryFixed() {\n return this.getArgb(MaterialDynamicColors.onPrimaryFixed);\n }\n get onPrimaryFixedVariant() {\n return this.getArgb(MaterialDynamicColors.onPrimaryFixedVariant);\n }\n get secondaryFixed() {\n return this.getArgb(MaterialDynamicColors.secondaryFixed);\n }\n get secondaryFixedDim() {\n return this.getArgb(MaterialDynamicColors.secondaryFixedDim);\n }\n get onSecondaryFixed() {\n return this.getArgb(MaterialDynamicColors.onSecondaryFixed);\n }\n get onSecondaryFixedVariant() {\n return this.getArgb(MaterialDynamicColors.onSecondaryFixedVariant);\n }\n get tertiaryFixed() {\n return this.getArgb(MaterialDynamicColors.tertiaryFixed);\n }\n get tertiaryFixedDim() {\n return this.getArgb(MaterialDynamicColors.tertiaryFixedDim);\n }\n get onTertiaryFixed() {\n return this.getArgb(MaterialDynamicColors.onTertiaryFixed);\n }\n get onTertiaryFixedVariant() {\n return this.getArgb(MaterialDynamicColors.onTertiaryFixedVariant);\n }\n}\n//# sourceMappingURL=dynamic_scheme.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from './tonal_palette.js';\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n */\nexport class CorePalette {\n /**\n * @param argb ARGB representation of a color\n */\n static of(argb) {\n return new CorePalette(argb, false);\n }\n /**\n * @param argb ARGB representation of a color\n */\n static contentOf(argb) {\n return new CorePalette(argb, true);\n }\n /**\n * Create a [CorePalette] from a set of colors\n */\n static fromColors(colors) {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n /**\n * Create a content [CorePalette] from a set of colors\n */\n static contentFromColors(colors) {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n static createPaletteFromColors(content, colors) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n constructor(argb, isContent) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n }\n else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n//# sourceMappingURL=core_palette.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';\nimport { Variant } from '../dynamiccolor/variant.js';\nimport { TonalPalette } from '../palettes/tonal_palette.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * A Dynamic Color theme that is intentionally detached from the source color.\n */\nexport class SchemeExpressive extends DynamicScheme {\n constructor(sourceColorHct, isDark, contrastLevel) {\n super({\n sourceColorArgb: sourceColorHct.toInt(),\n variant: Variant.EXPRESSIVE,\n contrastLevel,\n isDark,\n primaryPalette: TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 240.0), 40.0),\n secondaryPalette: TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, SchemeExpressive.hues, SchemeExpressive.secondaryRotations), 24.0),\n tertiaryPalette: TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, SchemeExpressive.hues, SchemeExpressive.tertiaryRotations), 32.0),\n neutralPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue + 15, 8.0),\n neutralVariantPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue + 15, 12.0),\n });\n }\n}\n/**\n * Hues (in degrees) used at breakpoints such that designers can specify a\n * hue rotation that occurs at a given break point.\n */\nSchemeExpressive.hues = [\n 0.0,\n 21.0,\n 51.0,\n 121.0,\n 151.0,\n 191.0,\n 271.0,\n 321.0,\n 360.0,\n];\n/**\n * Hue rotations (in degrees) of the Secondary [TonalPalette],\n * corresponding to the breakpoints in [hues].\n */\nSchemeExpressive.secondaryRotations = [\n 45.0,\n 95.0,\n 45.0,\n 20.0,\n 45.0,\n 90.0,\n 45.0,\n 45.0,\n 45.0,\n];\n/**\n * Hue rotations (in degrees) of the Tertiary [TonalPalette],\n * corresponding to the breakpoints in [hues].\n */\nSchemeExpressive.tertiaryRotations = [\n 120.0,\n 120.0,\n 20.0,\n 45.0,\n 20.0,\n 15.0,\n 20.0,\n 120.0,\n 120.0,\n];\n//# sourceMappingURL=scheme_expressive.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';\nimport { Variant } from '../dynamiccolor/variant.js';\nimport { TonalPalette } from '../palettes/tonal_palette.js';\n/**\n * A Dynamic Color theme that maxes out colorfulness at each position in the\n * Primary Tonal Palette.\n */\nexport class SchemeVibrant extends DynamicScheme {\n constructor(sourceColorHct, isDark, contrastLevel) {\n super({\n sourceColorArgb: sourceColorHct.toInt(),\n variant: Variant.VIBRANT,\n contrastLevel,\n isDark,\n primaryPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, 200.0),\n secondaryPalette: TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, SchemeVibrant.hues, SchemeVibrant.secondaryRotations), 24.0),\n tertiaryPalette: TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, SchemeVibrant.hues, SchemeVibrant.tertiaryRotations), 32.0),\n neutralPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10.0),\n neutralVariantPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12.0),\n });\n }\n}\n/**\n * Hues (in degrees) used at breakpoints such that designers can specify a\n * hue rotation that occurs at a given break point.\n */\nSchemeVibrant.hues = [\n 0.0,\n 41.0,\n 61.0,\n 101.0,\n 131.0,\n 181.0,\n 251.0,\n 301.0,\n 360.0,\n];\n/**\n * Hue rotations (in degrees) of the Secondary [TonalPalette],\n * corresponding to the breakpoints in [hues].\n */\nSchemeVibrant.secondaryRotations = [\n 18.0,\n 15.0,\n 10.0,\n 12.0,\n 15.0,\n 18.0,\n 15.0,\n 12.0,\n 12.0,\n];\n/**\n * Hue rotations (in degrees) of the Tertiary [TonalPalette],\n * corresponding to the breakpoints in [hues].\n */\nSchemeVibrant.tertiaryRotations = [\n 35.0,\n 30.0,\n 20.0,\n 25.0,\n 30.0,\n 35.0,\n 30.0,\n 25.0,\n 25.0,\n];\n//# sourceMappingURL=scheme_vibrant.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as colorUtils from './color_utils.js';\n/**\n * Utility methods for hexadecimal representations of colors.\n */\n/**\n * @param argb ARGB representation of a color.\n * @return Hex string representing color, ex. #ff0000 for red.\n */\nexport function hexFromArgb(argb) {\n const r = colorUtils.redFromArgb(argb);\n const g = colorUtils.greenFromArgb(argb);\n const b = colorUtils.blueFromArgb(argb);\n const outParts = [r.toString(16), g.toString(16), b.toString(16)];\n // Pad single-digit output values\n for (const [i, part] of outParts.entries()) {\n if (part.length === 1) {\n outParts[i] = '0' + part;\n }\n }\n return '#' + outParts.join('');\n}\n/**\n * @param hex String representing color as hex code. Accepts strings with or\n * without leading #, and string representing the color using 3, 6, or 8\n * hex characters.\n * @return ARGB representation of color.\n */\nexport function argbFromHex(hex) {\n hex = hex.replace('#', '');\n const isThree = hex.length === 3;\n const isSix = hex.length === 6;\n const isEight = hex.length === 8;\n if (!isThree && !isSix && !isEight) {\n throw new Error('unexpected hex ' + hex);\n }\n let r = 0;\n let g = 0;\n let b = 0;\n if (isThree) {\n r = parseIntHex(hex.slice(0, 1).repeat(2));\n g = parseIntHex(hex.slice(1, 2).repeat(2));\n b = parseIntHex(hex.slice(2, 3).repeat(2));\n }\n else if (isSix) {\n r = parseIntHex(hex.slice(0, 2));\n g = parseIntHex(hex.slice(2, 4));\n b = parseIntHex(hex.slice(4, 6));\n }\n else if (isEight) {\n r = parseIntHex(hex.slice(2, 4));\n g = parseIntHex(hex.slice(4, 6));\n b = parseIntHex(hex.slice(6, 8));\n }\n return (((255 << 24) | ((r & 0x0ff) << 16) | ((g & 0x0ff) << 8) | (b & 0x0ff)) >>>\n 0);\n}\nfunction parseIntHex(value) {\n // tslint:disable-next-line:ban\n return parseInt(value, 16);\n}\n//# sourceMappingURL=string_utils.js.map","import { css, CSSResultGroup, html, LitElement, PropertyValues } from \"lit\";\r\nimport { customElement, property } from \"lit/decorators.js\";\r\n\r\nimport {\r\n argbFromHex,\r\n CorePalette,\r\n DynamicColor,\r\n DynamicScheme,\r\n hexFromArgb,\r\n MaterialDynamicColors,\r\n} from \"@material/material-color-utilities\";\r\n\r\nimport { DesignToken } from \"@m3e/core\";\r\n\r\nimport { ColorScheme } from \"./ColorScheme\";\r\nimport { ContrastLevel } from \"./ContrastLevel\";\r\nimport { MotionScheme } from \"./MotionScheme\";\r\n\r\n/**\r\n * A non-visual element responsible for application-level theming.\r\n *\r\n * @description\r\n * The `m3e-theme` component is a non-visual element used to apply dynamic color, expressive motion, density, and strong focus indicators\r\n * to nested, theme-aware elements.\r\n *\r\n * When `m3e-theme` is nested directly beneath the `<body>` of a document, the `<body>`'s `background-color` is set to the computed\r\n * value of `--md-sys-color-background` and `color` is set to the computed value of `--md-sys-color-on-background`. In addition,\r\n * the document's `scrollbar-color` is set to the computed values of `--m3e-scrollbar-thumb-color` and `--m3e-scrollbar-track-color` which,\r\n * when supported, cascades to all viewport scrollbars.\r\n *\r\n * @example\r\n * The following example adds a top-level `m3e-theme` directly beneath a document's `<body>` element to\r\n * apply application-level theming. In this example, `color` and `scheme` are used to create a dynamic color\r\n * palette which automatically adjusts to a user's light or dark color preference. In addition, expressive motion\r\n * and strong focus indicators are enabled.\r\n *\r\n * ```html\r\n * <body>\r\n * <m3e-theme color=\"#6750A4\" scheme=\"auto\" motion=\"expressive\" strong-focus>\r\n * <!-- Normal body content here. -->\r\n * </m3e-theme>\r\n * <body/>\r\n * ```\r\n * @tag m3e-theme\r\n *\r\n * @attr color - The hex color from which to derive dynamic color palettes.\r\n * @attr contrast - The contrast level of the theme.\r\n * @attr density - The density scale (0, -1, -2).\r\n * @attr scheme - The color scheme of the theme.\r\n * @attr strong-focus - Whether to enable strong focus indicators.\r\n *\r\n * @fires change - Dispatched when the theme changes.\r\n */\r\n@customElement(\"m3e-theme\")\r\nexport class M3eThemeElement extends LitElement {\r\n /** The styles of the element. */\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n display: contents;\r\n font-size: ${DesignToken.typescale.standard.body.large.fontSize};\r\n font-weight: ${DesignToken.typescale.standard.body.large.fontWeight};\r\n line-height: ${DesignToken.typescale.standard.body.large.lineHeight};\r\n letter-spacing: ${DesignToken.typescale.standard.body.large.tracking};\r\n }\r\n `;\r\n\r\n /** @private */ #styleSheet = new CSSStyleSheet();\r\n /** @private */ #firstUpdated = false;\r\n /** @private */ #light?: MediaQueryList;\r\n /** @private */ #dark?: MediaQueryList;\r\n /** @private */ #forcedColor?: MediaQueryList;\r\n\r\n /** @private */ readonly #colorSchemeChangeHandler = () => this.#apply();\r\n\r\n /**\r\n * The hex color from which to derive dynamic color palettes.\r\n * @default \"#6750A4\"\r\n */\r\n @property() color = \"#6750A4\";\r\n\r\n /**\r\n * The color scheme of the theme.\r\n * @default \"auto\"\r\n */\r\n @property() scheme: ColorScheme = \"auto\";\r\n\r\n /**\r\n * The contrast level of the theme.\r\n * @default \"standard\"\r\n */\r\n @property() contrast: ContrastLevel = \"standard\";\r\n\r\n /**\r\n * Whether to enable strong focus indicators.\r\n * @default false\r\n */\r\n @property({ attribute: \"strong-focus\", type: Boolean }) strongFocus = false;\r\n\r\n /**\r\n * The density scale (0, -1, -2).\r\n * @default 0\r\n */\r\n @property({ type: Number }) density = 0;\r\n\r\n /** The motion scheme.\r\n * @default \"standard\"\r\n */\r\n @property() motion: MotionScheme = \"standard\";\r\n\r\n /** Whether a dark theme is applied. */\r\n get isDark(): boolean {\r\n switch (this.scheme) {\r\n case \"light\":\r\n return false;\r\n case \"dark\":\r\n return true;\r\n default: // auto\r\n return this.#dark?.matches ?? false;\r\n }\r\n }\r\n\r\n /** @inheritdoc */\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n if (this.shadowRoot && !this.shadowRoot.adoptedStyleSheets.includes(this.#styleSheet)) {\r\n this.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets, this.#styleSheet];\r\n }\r\n\r\n this.#light = matchMedia(\"(prefers-color-scheme: light)\");\r\n this.#dark = matchMedia(\"(prefers-color-scheme: dark)\");\r\n this.#forcedColor = matchMedia(\"(forced-colors: active)\");\r\n\r\n [this.#light, this.#dark, this.#forcedColor].forEach((x) =>\r\n x.addEventListener(\"change\", this.#colorSchemeChangeHandler)\r\n );\r\n }\r\n\r\n /** @inheritdoc */\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n [this.#light, this.#dark, this.#forcedColor].forEach((x) =>\r\n x?.removeEventListener(\"change\", this.#colorSchemeChangeHandler)\r\n );\r\n this.#light = this.#dark = this.#forcedColor = undefined;\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override updated(_changedProperties: PropertyValues<this>): void {\r\n super.updated(_changedProperties);\r\n this.#apply();\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override firstUpdated(_changedProperties: PropertyValues): void {\r\n super.firstUpdated(_changedProperties);\r\n this.#firstUpdated = true;\r\n }\r\n\r\n /** @inheritdoc */\r\n protected override render(): unknown {\r\n return html`<slot></slot>`;\r\n }\r\n\r\n /** @private */\r\n #apply(): void {\r\n const color = argbFromHex(this.color);\r\n const palette = CorePalette.of(color);\r\n const scheme = new DynamicScheme({\r\n sourceColorArgb: color,\r\n variant: 1,\r\n contrastLevel: this.#getContrastLevel(),\r\n isDark: this.isDark,\r\n primaryPalette: palette.a1,\r\n secondaryPalette: palette.a2,\r\n tertiaryPalette: palette.a3,\r\n neutralPalette: palette.n1,\r\n neutralVariantPalette: palette.n2,\r\n });\r\n\r\n let css = \"\";\r\n\r\n for (const key in MaterialDynamicColors) {\r\n if (!key.endsWith(\"PaletteKeyColor\")) {\r\n const dynamicColor: unknown = MaterialDynamicColors[key as keyof MaterialDynamicColors];\r\n if (dynamicColor instanceof DynamicColor) {\r\n css += `--md-sys-color-${key.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase()}: ${hexFromArgb(\r\n dynamicColor.getArgb(scheme)\r\n )};`;\r\n }\r\n }\r\n }\r\n\r\n if (this.motion === \"expressive\") {\r\n css += \"--md-sys-motion-spring-fast-spatial: 350ms cubic-bezier(0.42, 1.67, 0.21, 0.90);\";\r\n css += \"--md-sys-motion-spring-default-spatial: 500ms cubic-bezier(0.38, 1.21, 0.22, 1.00);\";\r\n css += \"--md-sys-motion-spring-slow-spatial: 650ms cubic-bezier(0.39, 1.29, 0.35, 0.98);\";\r\n css += \"--md-sys-motion-spring-fast-effects: 150ms cubic-bezier(0.31, 0.94, 0.34, 1.00);\";\r\n css += \"--md-sys-motion-spring-default-effects: 200ms cubic-bezier(0.34, 0.80, 0.34, 1.00);\";\r\n css += \"--md-sys-motion-spring-slow-effects: 300ms cubic-bezier(0.34, 0.88, 0.34, 1.00);\";\r\n }\r\n\r\n css += `--md-sys-density-scale: ${this.density};`;\r\n css += `--m3e-scrollbar-thumb-color: ${hexFromArgb(scheme.neutralPalette.tone(60))};`;\r\n css += `--m3e-focus-ring-visibility: ${this.strongFocus ? \"visible\" : \"hidden\"};`;\r\n\r\n this.#styleSheet.replaceSync(`:host { ${css} }`);\r\n\r\n if (this.parentElement instanceof HTMLBodyElement) {\r\n const computedStyle = getComputedStyle(this);\r\n\r\n if (this.#forcedColor?.matches) {\r\n this.parentElement.style.backgroundColor =\r\n this.parentElement.style.color =\r\n this.parentElement.ownerDocument.documentElement.style.scrollbarColor =\r\n this.parentElement.style.scrollbarColor =\r\n \"\";\r\n } else {\r\n this.parentElement.style.backgroundColor = computedStyle.getPropertyValue(\"--md-sys-color-background\");\r\n this.parentElement.style.color = computedStyle.getPropertyValue(\"--md-sys-color-on-background\");\r\n\r\n this.parentElement.ownerDocument.documentElement.style.scrollbarColor =\r\n this.parentElement.style.scrollbarColor = `${computedStyle.getPropertyValue(\r\n \"--m3e-scrollbar-thumb-color\"\r\n )} ${computedStyle.getPropertyValue(\"--m3e-scrollbar-track-color\")}`;\r\n }\r\n }\r\n\r\n if (this.#firstUpdated) {\r\n this.dispatchEvent(new Event(\"change\", { bubbles: true }));\r\n }\r\n }\r\n\r\n /** @private */\r\n #getContrastLevel(): number {\r\n switch (this.contrast) {\r\n case \"high\":\r\n return 1;\r\n case \"medium\":\r\n return 0.5;\r\n default: // standard\r\n return 0;\r\n }\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"m3e-theme\": M3eThemeElement;\r\n }\r\n}\r\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__classPrivateFieldGet","receiver","state","kind","f","TypeError","has","call","value","get","__classPrivateFieldSet","set","SuppressedError","t","globalThis","e","ShadowRoot","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","s","Symbol","o","WeakMap","n$2","constructor","this","_$cssResult$","Error","cssText","styleSheet","replaceSync","toString","S","adoptedStyleSheets","map","document","createElement","n","litNonce","setAttribute","textContent","appendChild","cssRules","is","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","b","attribute","type","String","converter","reflect","useDefault","hasChanged","metadata","litPropertyMetadata","y","HTMLElement","addInitializer","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","hasOwnProperty","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","name","init","signum","num","lerp","start","stop","amount","clampDouble","min","max","input","sanitizeDegreesDouble","degrees","matrixMultiply","row","matrix","SRGB_TO_XYZ","XYZ_TO_SRGB","WHITE_POINT_D65","argbFromRgb","red","green","blue","argbFromLinrgb","linrgb","delinearized","redFromArgb","argb","greenFromArgb","blueFromArgb","lstarFromArgb","mathUtils.matrixMultiply","linearized","xyzFromArgb","labF","yFromLstar","lstar","ft","kappa","ft3","labInvf","lstarFromY","rgbComponent","normalized","Math","pow","round","ViewingConditions","make","whitePoint","utils.whitePointD65","adaptingLuminance","PI","utils.yFromLstar","backgroundLstar","surround","discountingIlluminant","xyz","rW","gW","bW","math.lerp","exp","nc","rgbD","k","k4","k4F","fl","cbrt","z","sqrt","nbb","ncb","rgbAFactors","rgbA","aw","fLRoot","DEFAULT","Cam16","hue","chroma","j","q","m","jstar","astar","bstar","distance","other","dJ","dA","dB","dEPrime","fromInt","fromIntInViewingConditions","viewingConditions","redL","utils.linearized","greenL","blueL","x","rC","gC","bC","rD","gD","bD","rAF","abs","gAF","bAF","rA","math.signum","gA","bA","p2","atanDegrees","atan2","hueRadians","ac","huePrime","cos","alpha","mstar","log","sin","fromJch","fromJchInViewingConditions","fromUcs","fromUcsInViewingConditions","toInt","viewed","hRad","eHue","p1","hSin","hCos","gamma","rCBase","gCBase","bCBase","rF","gF","bF","linearR","linearG","linearB","utils.argbFromXyz","fromXyzInViewingConditions","J","Q","M","xyzInViewingConditions","HctSolver","sanitizeRadians","angle","trueDelinearized","chromaticAdaptation","component","af","mathUtils.signum","hueOf","scaledDiscount","SCALED_DISCOUNT_FROM_LINRGB","areInCyclicOrder","intercept","source","mid","lerpPoint","setCoordinate","coordinate","axis","isBounded","nthVertex","kR","Y_FROM_LINRGB","kG","kB","coordA","coordB","g","bisectToSegment","targetHue","left","right","leftHue","rightHue","initialized","uncut","midHue","midpoint","criticalPlaneBelow","floor","criticalPlaneAbove","ceil","bisectToLimit","segment","lPlane","rPlane","mPlane","midPlaneCoordinate","CRITICAL_PLANES","inverseChromaticAdaptation","adapted","adaptedAbs","base","findResultByJ","tInnerCoeff","iterationRound","jNormalized","LINRGB_FROM_SCALED_DISCOUNT","fnj","colorUtils.argbFromLinrgb","solveToInt","hueDegrees","colorUtils.argbFromLstar","mathUtils.sanitizeDegreesDouble","colorUtils.yFromLstar","exactAnswer","solveToCam","Hct","from","tone","internalHue","newHue","setInternalState","internalChroma","internalTone","newChroma","newTone","cam","utils.lstarFromArgb","inViewingConditions","vc","viewedInVc","recastInVc","utils.lstarFromY","Contrast","ratioOfTones","toneA","toneB","math.clampDouble","ratioOfYs","y1","y2","lighter","ratio","darkY","lightY","realContrast","delta","returnValue","darker","lighterUnsafe","lighterSafe","darkerUnsafe","darkerSafe","DislikeAnalyzer","isDisliked","hct","huePasses","chromaPasses","tonePasses","fixIfDisliked","DynamicColor","fromPalette","args","palette","isBackground","background","secondBackground","contrastCurve","toneDeltaPair","hctCache","getArgb","scheme","getHct","cachedAnswer","getTone","answer","clear","decreasingContrast","contrastLevel","roleA","roleB","polarity","stayTogether","bgTone","aIsNearer","isDark","nearer","farther","amNearer","expansionDir","nContrast","fContrast","nInitialTone","nTone","foregroundTone","fInitialTone","fTone","desiredRatio","bg1","bg2","bgTone1","bgTone2","upper","lower","lightOption","darkOption","availables","tonePrefersLightForeground","lighterTone","darkerTone","lighterRatio","darkerRatio","negligibleDifference","toneAllowsLightForeground","enableLightForeground","TonalPalette","fromHct","fromHueAndChroma","keyColor","KeyColor","cache","undefined","requestedChroma","chromaCache","maxChromaValue","lowerTone","upperTone","midTone","isAscending","maxChroma","ContrastCurve","low","normal","medium","high","ToneDeltaPair","Variant","isFidelity","variant","FIDELITY","CONTENT","isMonochrome","MONOCHROME","MaterialDynamicColors","highestSurface","surfaceBright","surfaceDim","contentAccentToneDelta","primaryPaletteKeyColor","primaryPalette","secondaryPaletteKeyColor","secondaryPalette","tertiaryPaletteKeyColor","tertiaryPalette","neutralPaletteKeyColor","neutralPalette","neutralVariantPaletteKeyColor","neutralVariantPalette","onBackground","surface","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest","onSurface","surfaceVariant","onSurfaceVariant","inverseSurface","inverseOnSurface","outline","outlineVariant","shadow","scrim","surfaceTint","primary","primaryContainer","onPrimary","sourceColorHct","onPrimaryContainer","inversePrimary","secondary","secondaryContainer","onSecondary","initialTone","byDecreasingTone","closestToChroma","chromaPeak","potentialSolution","findDesiredChromaByTone","onSecondaryContainer","tertiary","tertiaryContainer","onTertiary","proposedHct","onTertiaryContainer","error","errorPalette","errorContainer","onError","onErrorContainer","primaryFixed","primaryFixedDim","onPrimaryFixed","onPrimaryFixedVariant","secondaryFixed","secondaryFixedDim","onSecondaryFixed","onSecondaryFixedVariant","tertiaryFixed","tertiaryFixedDim","onTertiaryFixed","onTertiaryFixedVariant","DynamicScheme","sourceColorArgb","getRotatedHue","sourceColor","hues","rotations","sourceHue","math.sanitizeDegreesDouble","thisHue","nextHue","dynamicColor","CorePalette","of","contentOf","fromColors","colors","createPaletteFromColors","contentFromColors","content","a2","a1","a3","neutral","n1","neutralVariant","n2","isContent","SchemeExpressive","EXPRESSIVE","secondaryRotations","tertiaryRotations","SchemeVibrant","VIBRANT","hexFromArgb","colorUtils.redFromArgb","colorUtils.greenFromArgb","colorUtils.blueFromArgb","outParts","part","entries","join","parseIntHex","parseInt","M3eThemeElement","LitElement","_M3eThemeElement_styleSheet","_M3eThemeElement_firstUpdated","_M3eThemeElement_light","_M3eThemeElement_dark","_M3eThemeElement_forcedColor","_M3eThemeElement_colorSchemeChangeHandler","_M3eThemeElement_instances","_M3eThemeElement_apply","color","contrast","strongFocus","density","motion","matches","includes","matchMedia","addEventListener","removeEventListener","_changedProperties","render","html","hex","isThree","replace","isSix","isEight","slice","repeat","argbFromHex","_M3eThemeElement_getContrastLevel","css","endsWith","parentElement","HTMLBodyElement","computedStyle","getComputedStyle","style","backgroundColor","ownerDocument","documentElement","scrollbarColor","getPropertyValue","dispatchEvent","Event","bubbles","DesignToken","typescale","standard","body","large","fontSize","fontWeight","lineHeight","tracking","property","customElements","define","customElement"],"mappings":";;;;;4FAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAA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