{"version":3,"file":"index.esm.mjs","sources":["../node_modules/styled-components/node_modules/tslib/tslib.es6.mjs","../node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../node_modules/stylis/src/Enum.js","../node_modules/stylis/src/Utility.js","../node_modules/stylis/src/Tokenizer.js","../node_modules/stylis/src/Parser.js","../node_modules/stylis/src/Prefixer.js","../node_modules/stylis/src/Serializer.js","../node_modules/stylis/src/Middleware.js","../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../node_modules/styled-components/dist/styled-components.esm.js","../src/styles.ts","../src/components/inputs/Identifier.tsx","../node_modules/sanity-plugin-utils/lib/index.js","../src/queries.ts","../src/context.ts","../src/hooks/useCreateConcept.tsx","../src/hooks/useOpenNewConceptPane.tsx","../src/hooks/useRemoveConcept.tsx","../src/hooks/useLinkColorScheme.tsx","../src/components/interactions/ConceptDetailLink.tsx","../src/components/interactions/ConceptDetailDialogue.tsx","../src/components/interactions/ConceptSelectLink.tsx","../src/components/Children.tsx","../src/components/ChildConcepts.tsx","../src/components/TopConcepts.tsx","../src/components/Orphans.tsx","../src/components/guides/NewScheme.tsx","../src/hooks/useAddTitle.tsx","../src/components/guides/NoConcepts.tsx","../src/components/TreeStructure.tsx","../src/components/inputs/InputHierarchy.tsx","../src/components/Hierarchy.tsx","../src/components/TreeView.tsx","../src/components/inputs/HierarchyInput.tsx","../src/components/inputs/ArrayHierarchyInput.tsx","../src/components/inputs/ManagementControls.tsx","../src/modules/baseIriField.tsx","../src/components/inputs/RdfUri.tsx","../src/skosConcept.tsx","../src/components/NodeTree.tsx","../src/skosConceptScheme.tsx","../src/helpers/schemeFilter.ts","../src/helpers/branchFilter.ts","../src/structure.ts","../src/index.ts"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n  __assign = Object.assign || function __assign(t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n          s = arguments[i];\n          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n  }\n  return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n              t[p[i]] = s[p[i]];\n      }\n  return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n  return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n  function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n  var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n  var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n  var _, done = false;\n  for (var i = decorators.length - 1; i >= 0; i--) {\n      var context = {};\n      for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n      for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n      context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n      var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n      if (kind === \"accessor\") {\n          if (result === void 0) continue;\n          if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n          if (_ = accept(result.get)) descriptor.get = _;\n          if (_ = accept(result.set)) descriptor.set = _;\n          if (_ = accept(result.init)) initializers.unshift(_);\n      }\n      else if (_ = accept(result)) {\n          if (kind === \"field\") initializers.unshift(_);\n          else descriptor[key] = _;\n      }\n  }\n  if (target) Object.defineProperty(target, contextIn.name, descriptor);\n  done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n  var useValue = arguments.length > 2;\n  for (var i = 0; i < initializers.length; i++) {\n      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n  }\n  return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n  return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n  if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n  return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n  if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n  return new (P || (P = Promise))(function (resolve, reject) {\n      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n      function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n      step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n}\n\nexport function __generator(thisArg, body) {\n  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n  return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n  function verb(n) { return function (v) { return step([n, v]); }; }\n  function step(op) {\n      if (f) throw new TypeError(\"Generator is already executing.\");\n      while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n          if (y = 0, t) op = [op[0] & 2, t.value];\n          switch (op[0]) {\n              case 0: case 1: t = op; break;\n              case 4: _.label++; return { value: op[1], done: false };\n              case 5: _.label++; y = op[1]; op = [0]; continue;\n              case 7: op = _.ops.pop(); _.trys.pop(); continue;\n              default:\n                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                  if (t[2]) _.ops.pop();\n                  _.trys.pop(); continue;\n          }\n          op = body.call(thisArg, _);\n      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n  }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  var desc = Object.getOwnPropertyDescriptor(m, k);\n  if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n  }\n  Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n  for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n  var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n  if (m) return m.call(o);\n  if (o && typeof o.length === \"number\") return {\n      next: function () {\n          if (o && i >= o.length) o = void 0;\n          return { value: o && o[i++], done: !o };\n      }\n  };\n  throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o), r, ar = [], e;\n  try {\n      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  }\n  catch (error) { e = { error: error }; }\n  finally {\n      try {\n          if (r && !r.done && (m = i[\"return\"])) m.call(i);\n      }\n      finally { if (e) throw e.error; }\n  }\n  return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n  for (var ar = [], i = 0; i < arguments.length; i++)\n      ar = ar.concat(__read(arguments[i]));\n  return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n  for (var r = Array(s), k = 0, i = 0; i < il; i++)\n      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n          r[k] = a[j];\n  return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n          if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n          ar[i] = from[i];\n      }\n  }\n  return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n  return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var g = generator.apply(thisArg, _arguments || []), i, q = [];\n  return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n  function fulfill(value) { resume(\"next\", value); }\n  function reject(value) { resume(\"throw\", value); }\n  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n  var i, p;\n  return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\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; }\n}\n\nexport function __asyncValues(o) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var m = o[Symbol.asyncIterator], i;\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);\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); }); }; }\n  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n  if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n  return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n  Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n  o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n  __setModuleDefault(result, mod);\n  return result;\n}\n\nexport function __importDefault(mod) {\n  return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\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\");\n  return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n  if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\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\");\n  return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n  if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n  return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n  if (value !== null && value !== void 0) {\n    if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n    var dispose;\n    if (async) {\n        if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n        dispose = value[Symbol.asyncDispose];\n    }\n    if (dispose === void 0) {\n        if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n        dispose = value[Symbol.dispose];\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    env.stack.push({ value: value, dispose: dispose, async: async });\n  }\n  else if (async) {\n    env.stack.push({ async: true });\n  }\n  return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n  var e = new Error(message);\n  return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n  function fail(e) {\n    env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n    env.hasError = true;\n  }\n  function next() {\n    while (env.stack.length) {\n      var rec = env.stack.pop();\n      try {\n        var result = rec.dispose && rec.dispose.call(rec.value);\n        if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n      }\n      catch (e) {\n          fail(e);\n      }\n    }\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __metadata,\n  __awaiter,\n  __generator,\n  __createBinding,\n  __exportStar,\n  __values,\n  __read,\n  __spread,\n  __spreadArrays,\n  __spreadArray,\n  __await,\n  __asyncGenerator,\n  __asyncDelegator,\n  __asyncValues,\n  __makeTemplateObject,\n  __importStar,\n  __importDefault,\n  __classPrivateFieldGet,\n  __classPrivateFieldSet,\n  __classPrivateFieldIn,\n  __addDisposableResource,\n  __disposeResources,\n};\n","function memoize(fn) {\n  var cache = Object.create(null);\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span', 0) ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var unitlessKeys = {\n  animationIterationCount: 1,\n  aspectRatio: 1,\n  borderImageOutset: 1,\n  borderImageSlice: 1,\n  borderImageWidth: 1,\n  boxFlex: 1,\n  boxFlexGroup: 1,\n  boxOrdinalGroup: 1,\n  columnCount: 1,\n  columns: 1,\n  flex: 1,\n  flexGrow: 1,\n  flexPositive: 1,\n  flexShrink: 1,\n  flexNegative: 1,\n  flexOrder: 1,\n  gridRow: 1,\n  gridRowEnd: 1,\n  gridRowSpan: 1,\n  gridRowStart: 1,\n  gridColumn: 1,\n  gridColumnEnd: 1,\n  gridColumnSpan: 1,\n  gridColumnStart: 1,\n  msGridRow: 1,\n  msGridRowSpan: 1,\n  msGridColumn: 1,\n  msGridColumnSpan: 1,\n  fontWeight: 1,\n  lineHeight: 1,\n  opacity: 1,\n  order: 1,\n  orphans: 1,\n  tabSize: 1,\n  widows: 1,\n  zIndex: 1,\n  zoom: 1,\n  WebkitLineClamp: 1,\n  // SVG-related properties\n  fillOpacity: 1,\n  floodOpacity: 1,\n  stopOpacity: 1,\n  strokeDasharray: 1,\n  strokeDashoffset: 1,\n  strokeMiterlimit: 1,\n  strokeOpacity: 1,\n  strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import{__spreadArray as e,__assign as t}from\"tslib\";import n from\"@emotion/is-prop-valid\";import r,{useRef as o,useState as s,useMemo as i,useEffect as a,useContext as c,useDebugValue as l,createElement as u}from\"react\";import p from\"shallowequal\";import*as d from\"stylis\";import h from\"@emotion/unitless\";var f=\"undefined\"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||\"data-styled\",m=\"active\",y=\"data-styled-version\",v=\"6.1.12\",g=\"/*!sc*/\\n\",S=\"undefined\"!=typeof window&&\"HTMLElement\"in window,w=Boolean(\"boolean\"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&\"\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY?\"false\"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:\"undefined\"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&\"\"!==process.env.SC_DISABLE_SPEEDY?\"false\"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:\"production\"!==process.env.NODE_ENV),b={},E=/invalid hook call/i,N=new Set,P=function(t,n){if(\"production\"!==process.env.NODE_ENV){var r=n?' with the id of \"'.concat(n,'\"'):\"\",s=\"The component \".concat(t).concat(r,\" has been created dynamically.\\n\")+\"You may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,e([t],n,!1))},o(),a&&!N.has(s)&&(console.warn(s),N.add(s))}catch(e){E.test(e.message)&&N.delete(s)}finally{console.error=i}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set([\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"u\",\"ul\",\"use\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"tspan\"]),O=/[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,\"-\").replace(D,\"\")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n=\"\";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return(j(t%k)+n).replace(T,\"$1-$2\")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return\"production\"!==process.env.NODE_ENV&&\"string\"==typeof e&&e||e.displayName||e.name||\"Component\"}function L(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G=\"function\"==typeof Symbol&&Symbol.for,Y=G?Symbol.for(\"react.memo\"):60115,q=G?Symbol.for(\"react.forward_ref\"):60112,W={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[q]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return(\"type\"in(t=e)&&t.type.$$typeof)===Y?U:\"$$typeof\"in e?J[e.$$typeof]:W;var t}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function re(e,t,n){if(\"string\"!=typeof t){if(ne){var r=te(t);r&&r!==ne&&re(e,r,n)}var o=K(t);Q&&(o=o.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<o.length;++a){var c=o[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l)}catch(e){}}}}return e}function oe(e){return\"function\"==typeof e}function se(e){return\"object\"==typeof e&&\"styledComponentId\"in e}function ie(e,t){return e&&t?\"\".concat(e,\" \").concat(t):e||t||\"\"}function ae(e,t){if(0===e.length)return\"\";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function ce(e){return null!==e&&\"object\"==typeof e&&e.constructor.name===Object.name&&!(\"props\"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=le(e[r],t[r]);else if(ce(t))for(var r in t)e[r]=le(e[r],t[r]);return e}function ue(e,t){Object.defineProperty(e,\"toString\",{value:t})}var pe=\"production\"!==process.env.NODE_ENV?{1:\"Cannot create styled-component for component: %s.\\n\\n\",2:\"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",3:\"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",4:\"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",5:\"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",6:\"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",7:'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document `<head>`\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",18:\"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`\"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function he(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return\"production\"===process.env.NODE_ENV?new Error(\"An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#\".concat(t,\" for more information.\").concat(n.length>0?\" Args: \".concat(n.join(\", \")):\"\")):new Error(de.apply(void 0,e([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw he(16,\"\".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t=\"\";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=\"\".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if(\"production\"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,\"\".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e)},be=\"style[\".concat(f,\"][\").concat(y,'=\"').concat(v,'\"]'),Ee=new RegExp(\"^\".concat(f,'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)')),Ne=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},Pe=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:\"\").split(g),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(f)!==m&&(Pe(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Ce(){return\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ie=function(e){var t=document.head,n=e||t,r=document.createElement(\"style\"),o=function(e){var t=Array.from(e.querySelectorAll(\"style[\".concat(f,\"]\")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(f,m),r.setAttribute(y,v);var i=Ce();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw he(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:\"\"},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:\"\"},e}(),De=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:\"\"},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,r){void 0===e&&(e=C),void 0===n&&(n={});var o=this;this.options=t(t({},Te),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=!1,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r=\"\",o=function(n){var o=function(e){return ve.get(e)}(n);if(void 0===o)return\"continue\";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return\"continue\";var a=\"\".concat(f,\".g\").concat(n,'[id=\"').concat(o,'\"]'),c=\"\";void 0!==s&&s.forEach(function(e){e.length>0&&(c+=\"\".concat(e,\",\"))}),r+=\"\".concat(i).concat(a,'{content:\"').concat(c,'\"}').concat(g)},s=0;s<n;s++)o(s);return r}(o)})}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this)},e.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new e(t(t({},this.options),n),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),je=/&/g,xe=/^\\s*\\/\\/.*$/gm;function Ve(e,t){return e.map(function(e){return\"rule\"===e.type&&(e.value=\"\".concat(t,\" \").concat(e.value),e.value=e.value.replaceAll(\",\",\",\".concat(t,\" \")),e.props=e.props.map(function(e){return\"\".concat(t,\" \").concat(e)})),Array.isArray(e.children)&&\"@keyframes\"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,r,o=void 0===e?C:e,s=o.options,i=void 0===s?C:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,\"\").length>0?\".\".concat(t):e},u=c.slice();u.push(function(e){e.type===d.RULESET&&e.value.includes(\"&\")&&(e.props[0]=e.props[0].replace(je,n).replace(r,l))}),i.prefix&&u.push(d.prefixer),u.push(d.stringify);var p=function(e,o,s,a){void 0===o&&(o=\"\"),void 0===s&&(s=\"\"),void 0===a&&(a=\"&\"),t=a,n=o,r=new RegExp(\"\\\\\".concat(n,\"\\\\b\"),\"g\");var c=e.replace(xe,\"\"),l=d.compile(s||o?\"\".concat(s,\" \").concat(o,\" { \").concat(c,\" }\"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return d.serialize(l,d.middleware(u.concat(d.rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():\"\",p}var Me=new ke,ze=Fe(),$e=r.createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze}),Be=$e.Consumer,Le=r.createContext(void 0);function Ge(){return c($e)}function Ye(e){var t=s(e.stylisPlugins),n=t[0],o=t[1],c=Ge().styleSheet,l=i(function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,c]),u=i(function(){return Fe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);a(function(){p(n,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]);var d=i(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:u}},[e.shouldForwardProp,l,u]);return r.createElement($e.Provider,{value:d},r.createElement(Le.Provider,{value:u},e.children))}var qe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.name=e,this.id=\"sc-keyframes-\".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),We=function(e){return e>=\"A\"&&e<=\"Z\"};function He(e){for(var t=\"\",n=0;n<e.length;n++){var r=e[n];if(1===n&&\"-\"===r&&\"-\"===e[0])return e;We(r)?t+=\"-\"+r.toLowerCase():t+=r}return t.startsWith(\"ms-\")?\"-\"+t:t}var Ue=function(e){return null==e||!1===e||\"\"===e},Je=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||oe(i)?o.push(\"\".concat(He(s),\":\"),i,\";\"):ce(i)?o.push.apply(o,e(e([\"\".concat(s,\" {\")],Je(i),!1),[\"}\"],!1)):o.push(\"\".concat(He(s),\": \").concat((n=s,null==(r=i)||\"boolean\"==typeof r||\"\"===r?\"\":\"number\"!=typeof r||0===r||n in h||n.startsWith(\"--\")?String(r).trim():\"\".concat(r,\"px\")),\";\")))}return o};function Xe(e,t,n,r){if(Ue(e))return[];if(se(e))return[\".\".concat(e.styledComponentId)];if(oe(e)){if(!oe(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return\"production\"===process.env.NODE_ENV||\"object\"!=typeof o||Array.isArray(o)||o instanceof qe||ce(o)||null===o||console.error(\"\".concat(B(e),\" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\")),Xe(o,t,n,r)}var s;return e instanceof qe?n?(e.inject(n,r),[e.getName(r)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,r)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!se(n))return!1}return!0}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId=\"\",this.isStatic=\"production\"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):\"\";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ie(r,this.staticRulesId);else{var o=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,\".\".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=ie(r,s),this.staticRulesId=s}else{for(var a=M(this.baseHash,n.hash),c=\"\",l=0;l<this.rules.length;l++){var u=this.rules[l];if(\"string\"==typeof u)c+=u,\"production\"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,\".\".concat(d),void 0,this.componentId)),r=ie(r,d)}}return r},e}(),et=r.createContext(void 0),tt=et.Consumer;function nt(){var e=c(et);if(!e)throw he(18);return e}function rt(e){var n=r.useContext(et),o=i(function(){return function(e,n){if(!e)throw he(14);if(oe(e)){var r=e(n);if(\"production\"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||\"object\"!=typeof r))throw he(7);return r}if(Array.isArray(e)||\"object\"!=typeof e)throw he(8);return n?t(t({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?r.createElement(et.Provider,{value:o},e.children):null}var ot={},st=new Set;function it(e,o,s){var i=se(e),a=e,c=!L(e),p=o.attrs,d=void 0===p?_:p,h=o.componentId,f=void 0===h?function(e,t){var n=\"string\"!=typeof e?\"sc\":R(e);ot[n]=(ot[n]||0)+1;var r=\"\".concat(n,\"-\").concat($(v+n+ot[n]));return t?\"\".concat(t,\"-\").concat(r):r}(o.displayName,o.parentComponentId):h,m=o.displayName,y=void 0===m?function(e){return L(e)?\"styled.\".concat(e):\"Styled(\".concat(B(e),\")\")}(e):m,g=o.displayName&&o.componentId?\"\".concat(R(o.displayName),\"-\").concat(o.componentId):o.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=o.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(o.shouldForwardProp){var E=o.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)}}else w=b}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,o){return function(e,o,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=r.useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;\"production\"!==process.env.NODE_ENV&&l(d);var v=I(o,f,c)||C,g=function(e,n,r){for(var o,s=t(t({},n),{className:void 0,theme:r}),i=0;i<e.length;i+=1){var a=oe(o=e[i])?o(s):o;for(var c in a)s[c]=\"className\"===c?ie(s[c],a[c]):\"style\"===c?t(t({},s[c]),a[c]):a[c]}return n.className&&(s.className=ie(s.className,n.className)),s}(i,o,v),S=g.as||h,w={};for(var b in g)void 0===g[b]||\"$\"===b[0]||\"as\"===b||\"theme\"===b&&g.theme===v||(\"forwardedAs\"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||\"development\"!==process.env.NODE_ENV||n(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop \"'.concat(b,'\" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return\"production\"!==process.env.NODE_ENV&&l(r),r}(a,g);\"production\"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=\" \"+E),g.className&&(N+=\" \"+g.className),w[L(S)&&!A.has(S)?\"class\":\"className\"]=N,w.ref=s,u(S,w)}(D,e,o)}O.displayName=y;var D=r.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):\"\",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)le(e,o[r],!0);return e}({},a.defaultProps,e):e}}),\"production\"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'.concat(t,'\"'):\"\";console.warn(\"Over \".concat(200,\" classes were generated for component \").concat(e).concat(s,\".\\n\")+\"Consider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n  const Component = styled.div.attrs(props => ({\\n    style: {\\n      background: props.background,\\n    },\\n  }))`width: 100%;`\\n\\n  <Component />\"),r=!0,n={}}}}(y,g)),ue(D,function(){return\".\".concat(D.styledComponentId)}),c&&re(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function lt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(oe(t)||ce(t))return ct(Xe(at(_,e([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&\"string\"==typeof o[0]?Xe(o):ct(Xe(at(o,n)))}function ut(n,r,o){if(void 0===o&&(o=C),!r)throw he(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,lt.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return ut(n,r,t(t({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,r,t(t({},o),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e)});var ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ze(e),ke.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(ae(Xe(this.rules,t,n,r)),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&ke.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function ft(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var i=lt.apply(void 0,e([n],o,!1)),a=\"sc-global-\".concat($(JSON.stringify(i))),c=new ht(i,a);\"production\"!==process.env.NODE_ENV&&P(a);var l=function(e){var n=Ge(),o=r.useContext(et),s=r.useRef(n.styleSheet.allocateGSInstance(a)).current;return\"production\"!==process.env.NODE_ENV&&r.Children.count(e.children)&&console.warn(\"The global style component \".concat(a,\" was given child JSX. createGlobalStyle does not render children.\")),\"production\"!==process.env.NODE_ENV&&i.some(function(e){return\"string\"==typeof e&&-1!==e.indexOf(\"@import\")})&&console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app.\"),n.styleSheet.server&&function(e,n,r,o,s){if(c.isStatic)c.renderStyles(e,b,r,s);else{var i=t(t({},n),{theme:I(n,o,l.defaultProps)});c.renderStyles(e,i,r,s)}}(s,e,n.styleSheet,o,n.stylis),null};return r.memo(l)}function mt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");var o=ae(lt.apply(void 0,e([t],n,!1))),s=$(o);return new qe(s,o)}function yt(e){var n=r.forwardRef(function(n,o){var s=I(n,r.useContext(et),e.defaultProps);return\"production\"!==process.env.NODE_ENV&&void 0===s&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'.concat(B(e),'\"')),r.createElement(e,t({},n,{theme:s,ref:o}))});return n.displayName=\"WithTheme(\".concat(B(e),\")\"),re(n,e)}var vt=/^\\s*<\\/[a-z]/i,gt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return\"\";var n=Ce(),r=ae([n&&'nonce=\"'.concat(n,'\"'),\"\".concat(f,'=\"true\"'),\"\".concat(y,'=\"').concat(v,'\"')].filter(Boolean),\" \");return\"<style \".concat(r,\">\").concat(t,\"</style>\")},this.getStyleTags=function(){if(e.sealed)throw he(2);return e._emitSheetCSS()},this.getStyleElement=function(){var n;if(e.sealed)throw he(2);var o=e.instance.toString();if(!o)return[];var s=((n={})[f]=\"\",n[y]=v,n.dangerouslySetInnerHTML={__html:o},n),i=Ce();return i&&(s.nonce=i),[r.createElement(\"style\",t({},s,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new ke({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw he(2);return r.createElement(Ye,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){if(S)throw he(3);if(this.sealed)throw he(2);this.seal();var t=require(\"stream\").Transform,n=e,r=this.instance,o=this._emitSheetCSS,s=new t({transform:function(e,t,n){var s=e.toString(),i=o();if(r.clearTag(),vt.test(s)){var a=s.indexOf(\">\")+1,c=s.slice(0,a),l=s.slice(a);this.push(c+i+l)}else this.push(i+s);n()}});return n.on(\"error\",function(e){s.emit(\"error\",e)}),n.pipe(s)},e}(),St={StyleSheet:ke,mainSheet:Me};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\");var wt=\"__sc-\".concat(f,\"__\");\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[wt]||(window[wt]=0),1===window[wt]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[wt]+=1);export{gt as ServerStyleSheet,Be as StyleSheetConsumer,$e as StyleSheetContext,Ye as StyleSheetManager,tt as ThemeConsumer,et as ThemeContext,rt as ThemeProvider,St as __PRIVATE__,ft as createGlobalStyle,lt as css,dt as default,se as isStyledComponent,mt as keyframes,dt as styled,nt as useTheme,v as version,yt as withTheme};\n//# sourceMappingURL=styled-components.esm.js.map\n","import styled from 'styled-components'\nimport {hues} from '@sanity/color'\n\nexport const StyledDescription = styled.details`\n  summary {\n    cursor: pointer;\n  }\n  div {\n    margin-top: 0.5rem;\n    margin-left: 0.75rem;\n    svg {\n      padding-right: 0.25rem;\n    }\n  }\n`\nexport const InlineHelp = styled.div`\n  margin-top: 2rem;\n`\n\nexport const StyledTree = styled.ul`\n  list-style: none;\n  padding-left: 0;\n  margin-block-start: 0;\n  li svg.info {\n    height: 1.2rem;\n    width: 1.2rem;\n    color: ${hues.gray[800].hex};\n    border-radius: 3px;\n    transition: all 0.1s ease-in-out;\n    &.warning:hover {\n      color: ${hues.gray[100].hex};\n      background-color: ${hues.yellow[500].hex};\n    }\n    &.error {\n      color: ${hues.red[500].hex};\n      &:hover {\n        color: ${hues.gray[100].hex};\n        background-color: ${hues.red[500].hex};\n      }\n    }\n  }\n  li svg.spacer {\n    height: 1.5rem;\n    width: 1.5rem;\n    visibility: hidden;\n  }\n`\nexport const HierarchyButton = styled.button`\n  background: none;\n  border: none;\n  padding: 0.5rem;\n  border-radius: 3px;\n  cursor: pointer;\n  svg {\n    padding-right: 0.25rem;\n  }\n  &:hover {\n    background-color: ${hues.gray[50].hex};\n  }\n  &.add:hover {\n    background-color: ${hues.green[500].hex};\n    span,\n    svg {\n      color: white;\n    }\n  }\n`\nexport const StyledTreeButton = styled.button`\n  background: none;\n  border: none;\n  padding: 0.2rem 0 0;\n  cursor: pointer;\n  svg {\n    border-radius: 3px;\n    transition: all 0.1s ease-in-out;\n  }\n  &.toggle svg {\n    height: 1.5rem;\n    width: 1.5rem;\n  }\n  &.action svg {\n    height: 1.2rem;\n    height: 1.2rem;\n    width: 1.2rem;\n    &:hover {\n      color: ${hues.gray[100].hex} !important;\n    }\n    &.info:hover {\n      background-color: ${hues.blue[500].hex};\n    }\n    &.add:hover {\n      background-color: ${hues.green[500].hex};\n    }\n    &.remove:hover {\n      background-color: ${hues.red[500].hex};\n    }\n  }\n`\nexport const StyledTreeToggle = styled.button`\n  background: none;\n  border: none;\n  padding: 0.2rem 0 0;\n  cursor: pointer;\n  svg {\n    height: 1.5rem;\n    width: 1.5rem;\n  }\n`\n\nexport const StyledTopConcept = styled.li`\n  font-weight: bold;\n  margin-top: 1rem;\n  .untitled {\n    color: ${hues.gray[400].hex};\n    font-weight: normal;\n  }\n  button[aria-expanded='true'] svg {\n    rotate: 90deg;\n  }\n  &.closed ul {\n    display: none;\n  }\n`\nexport const StyledOrphan = styled.li`\n  padding-top: 0.5rem;\n  font-weight: normal;\n  margin-top: 1rem;\n  .untitled {\n    color: ${hues.gray[400].hex};\n  }\n  button[aria-expanded='true'] svg {\n    rotate: 90deg;\n  }\n  &.closed ul {\n    display: none;\n  }\n`\nexport const StyledChildConcepts = styled.ul`\n  list-style: none;\n`\nexport const StyledChildConcept = styled.li`\n  font-weight: normal;\n  margin-top: 1rem;\n  button[aria-expanded='true'] svg {\n    rotate: 90deg;\n  }\n  &.closed ul {\n    display: none;\n  }\n`\nexport const StyledConceptLink = styled.a`\n  text-decoration: none;\n  &:hover {\n    text-decoration: underline;\n  }\n`\nexport const StyledConceptTitle = styled.p``\n","import {useCallback} from 'react'\nimport {set} from 'sanity'\nimport {Button, Inline, Stack, useToast} from '@sanity/ui'\nimport {randomKey} from '@sanity/util/content'\n\n/**\n * #### Create Unique Identifier\n * For schemes and concepts created in previous versions of the\n * plugin.\n * - Input is only visible if no identifier has been assigned\n * - Input disappears once an ID is generated\n */\nexport const Identifier = (props: any) => {\n  const {onChange} = props\n  const toast = useToast()\n\n  const handleChange = useCallback(() => {\n    onChange(set(randomKey(6)))\n    toast.push({\n      status: 'success',\n      title: 'Identifier created.',\n      closable: true,\n    })\n  }, [onChange, toast])\n\n  return (\n    <Stack space={2}>\n      <Inline space={[3, 3, 4]}>\n        <Button tone=\"primary\" fontSize={2} onClick={handleChange} text=\"Generate Identifier\" />\n      </Inline>\n    </Stack>\n  )\n}\n","import React, { useMemo, useState, useRef, useEffect } from 'react';\nimport { useClient, useDocumentStore, useWorkspace, UserAvatar } from 'sanity';\nimport isEqual from 'react-fast-compare';\nimport { distinctUntilChanged, catchError } from 'rxjs/operators';\nimport { usePaneRouter } from 'sanity/structure';\nimport { RouterContext } from 'sanity/router';\nimport { jsx, jsxs } from 'react/jsx-runtime';\nimport { Card, Flex, Box, Stack, Text, Menu, MenuItem, TextInput, Badge } from '@sanity/ui';\nimport styled, { css } from 'styled-components';\nimport { RemoveCircleIcon, AddCircleIcon, RestoreIcon } from '@sanity/icons';\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nfunction getDefaultExportFromCjs(x) {\n  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\nvar builder = {};\nvar urlForImage = {};\nvar parseAssetId$1 = {};\nObject.defineProperty(parseAssetId$1, \"__esModule\", {\n  value: true\n});\nvar example = 'image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg';\nfunction parseAssetId(ref) {\n  var _a = ref.split('-'),\n    id = _a[1],\n    dimensionString = _a[2],\n    format = _a[3];\n  if (!id || !dimensionString || !format) {\n    throw new Error(\"Malformed asset _ref '\".concat(ref, \"'. Expected an id like \\\"\").concat(example, \"\\\".\"));\n  }\n  var _b = dimensionString.split('x'),\n    imgWidthStr = _b[0],\n    imgHeightStr = _b[1];\n  var width = +imgWidthStr;\n  var height = +imgHeightStr;\n  var isValidAssetId = isFinite(width) && isFinite(height);\n  if (!isValidAssetId) {\n    throw new Error(\"Malformed asset _ref '\".concat(ref, \"'. Expected an id like \\\"\").concat(example, \"\\\".\"));\n  }\n  return {\n    id: id,\n    width: width,\n    height: height,\n    format: format\n  };\n}\nparseAssetId$1.default = parseAssetId;\nvar parseSource$1 = {};\nvar __assign$1 = commonjsGlobal && commonjsGlobal.__assign || function () {\n  __assign$1 = Object.assign || function (t) {\n    for (var s, i = 1, n = arguments.length; i < n; i++) {\n      s = arguments[i];\n      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n    }\n    return t;\n  };\n  return __assign$1.apply(this, arguments);\n};\nObject.defineProperty(parseSource$1, \"__esModule\", {\n  value: true\n});\nvar isRef = function (src) {\n  var source = src;\n  return source ? typeof source._ref === 'string' : false;\n};\nvar isAsset = function (src) {\n  var source = src;\n  return source ? typeof source._id === 'string' : false;\n};\nvar isAssetStub = function (src) {\n  var source = src;\n  return source && source.asset ? typeof source.asset.url === 'string' : false;\n};\n// Convert an asset-id, asset or image to an image record suitable for processing\n// eslint-disable-next-line complexity\nfunction parseSource(source) {\n  if (!source) {\n    return null;\n  }\n  var image;\n  if (typeof source === 'string' && isUrl(source)) {\n    // Someone passed an existing image url?\n    image = {\n      asset: {\n        _ref: urlToId(source)\n      }\n    };\n  } else if (typeof source === 'string') {\n    // Just an asset id\n    image = {\n      asset: {\n        _ref: source\n      }\n    };\n  } else if (isRef(source)) {\n    // We just got passed an asset directly\n    image = {\n      asset: source\n    };\n  } else if (isAsset(source)) {\n    // If we were passed an image asset document\n    image = {\n      asset: {\n        _ref: source._id || ''\n      }\n    };\n  } else if (isAssetStub(source)) {\n    // If we were passed a partial asset (`url`, but no `_id`)\n    image = {\n      asset: {\n        _ref: urlToId(source.asset.url)\n      }\n    };\n  } else if (typeof source.asset === 'object') {\n    // Probably an actual image with materialized asset\n    image = __assign$1({}, source);\n  } else {\n    // We got something that does not look like an image, or it is an image\n    // that currently isn't sporting an asset.\n    return null;\n  }\n  var img = source;\n  if (img.crop) {\n    image.crop = img.crop;\n  }\n  if (img.hotspot) {\n    image.hotspot = img.hotspot;\n  }\n  return applyDefaults(image);\n}\nparseSource$1.default = parseSource;\nfunction isUrl(url) {\n  return /^https?:\\/\\//.test(\"\".concat(url));\n}\nfunction urlToId(url) {\n  var parts = url.split('/').slice(-1);\n  return \"image-\".concat(parts[0]).replace(/\\.([a-z]+)$/, '-$1');\n}\n// Mock crop and hotspot if image lacks it\nfunction applyDefaults(image) {\n  if (image.crop && image.hotspot) {\n    return image;\n  }\n  // We need to pad in default values for crop or hotspot\n  var result = __assign$1({}, image);\n  if (!result.crop) {\n    result.crop = {\n      left: 0,\n      top: 0,\n      bottom: 0,\n      right: 0\n    };\n  }\n  if (!result.hotspot) {\n    result.hotspot = {\n      x: 0.5,\n      y: 0.5,\n      height: 1.0,\n      width: 1.0\n    };\n  }\n  return result;\n}\n(function (exports) {\n  var __assign = commonjsGlobal && commonjsGlobal.__assign || function () {\n    __assign = Object.assign || function (t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n        s = arguments[i];\n        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n    };\n    return __assign.apply(this, arguments);\n  };\n  var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) {\n    return mod && mod.__esModule ? mod : {\n      \"default\": mod\n    };\n  };\n  Object.defineProperty(exports, \"__esModule\", {\n    value: true\n  });\n  exports.parseSource = exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = void 0;\n  var parseAssetId_1 = __importDefault(parseAssetId$1);\n  var parseSource_1 = __importDefault(parseSource$1);\n  exports.parseSource = parseSource_1.default;\n  exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [['width', 'w'], ['height', 'h'], ['format', 'fm'], ['download', 'dl'], ['blur', 'blur'], ['sharpen', 'sharp'], ['invert', 'invert'], ['orientation', 'or'], ['minHeight', 'min-h'], ['maxHeight', 'max-h'], ['minWidth', 'min-w'], ['maxWidth', 'max-w'], ['quality', 'q'], ['fit', 'fit'], ['crop', 'crop'], ['saturation', 'sat'], ['auto', 'auto'], ['dpr', 'dpr'], ['pad', 'pad']];\n  function urlForImage(options) {\n    var spec = __assign({}, options || {});\n    var source = spec.source;\n    delete spec.source;\n    var image = (0, parseSource_1.default)(source);\n    if (!image) {\n      throw new Error(\"Unable to resolve image URL from source (\".concat(JSON.stringify(source), \")\"));\n    }\n    var id = image.asset._ref || image.asset._id || '';\n    var asset = (0, parseAssetId_1.default)(id);\n    // Compute crop rect in terms of pixel coordinates in the raw source image\n    var cropLeft = Math.round(image.crop.left * asset.width);\n    var cropTop = Math.round(image.crop.top * asset.height);\n    var crop = {\n      left: cropLeft,\n      top: cropTop,\n      width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),\n      height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)\n    };\n    // Compute hot spot rect in terms of pixel coordinates\n    var hotSpotVerticalRadius = image.hotspot.height * asset.height / 2;\n    var hotSpotHorizontalRadius = image.hotspot.width * asset.width / 2;\n    var hotSpotCenterX = image.hotspot.x * asset.width;\n    var hotSpotCenterY = image.hotspot.y * asset.height;\n    var hotspot = {\n      left: hotSpotCenterX - hotSpotHorizontalRadius,\n      top: hotSpotCenterY - hotSpotVerticalRadius,\n      right: hotSpotCenterX + hotSpotHorizontalRadius,\n      bottom: hotSpotCenterY + hotSpotVerticalRadius\n    };\n    // If irrelevant, or if we are requested to: don't perform crop/fit based on\n    // the crop/hotspot.\n    if (!(spec.rect || spec.focalPoint || spec.ignoreImageParams || spec.crop)) {\n      spec = __assign(__assign({}, spec), fit({\n        crop: crop,\n        hotspot: hotspot\n      }, spec));\n    }\n    return specToImageUrl(__assign(__assign({}, spec), {\n      asset: asset\n    }));\n  }\n  exports.default = urlForImage;\n  // eslint-disable-next-line complexity\n  function specToImageUrl(spec) {\n    var cdnUrl = (spec.baseUrl || 'https://cdn.sanity.io').replace(/\\/+$/, '');\n    var filename = \"\".concat(spec.asset.id, \"-\").concat(spec.asset.width, \"x\").concat(spec.asset.height, \".\").concat(spec.asset.format);\n    var baseUrl = \"\".concat(cdnUrl, \"/images/\").concat(spec.projectId, \"/\").concat(spec.dataset, \"/\").concat(filename);\n    var params = [];\n    if (spec.rect) {\n      // Only bother url with a crop if it actually crops anything\n      var _a = spec.rect,\n        left = _a.left,\n        top_1 = _a.top,\n        width = _a.width,\n        height = _a.height;\n      var isEffectiveCrop = left !== 0 || top_1 !== 0 || height !== spec.asset.height || width !== spec.asset.width;\n      if (isEffectiveCrop) {\n        params.push(\"rect=\".concat(left, \",\").concat(top_1, \",\").concat(width, \",\").concat(height));\n      }\n    }\n    if (spec.bg) {\n      params.push(\"bg=\".concat(spec.bg));\n    }\n    if (spec.focalPoint) {\n      params.push(\"fp-x=\".concat(spec.focalPoint.x));\n      params.push(\"fp-y=\".concat(spec.focalPoint.y));\n    }\n    var flip = [spec.flipHorizontal && 'h', spec.flipVertical && 'v'].filter(Boolean).join('');\n    if (flip) {\n      params.push(\"flip=\".concat(flip));\n    }\n    // Map from spec name to url param name, and allow using the actual param name as an alternative\n    exports.SPEC_NAME_TO_URL_NAME_MAPPINGS.forEach(function (mapping) {\n      var specName = mapping[0],\n        param = mapping[1];\n      if (typeof spec[specName] !== 'undefined') {\n        params.push(\"\".concat(param, \"=\").concat(encodeURIComponent(spec[specName])));\n      } else if (typeof spec[param] !== 'undefined') {\n        params.push(\"\".concat(param, \"=\").concat(encodeURIComponent(spec[param])));\n      }\n    });\n    if (params.length === 0) {\n      return baseUrl;\n    }\n    return \"\".concat(baseUrl, \"?\").concat(params.join('&'));\n  }\n  function fit(source, spec) {\n    var cropRect;\n    var imgWidth = spec.width;\n    var imgHeight = spec.height;\n    // If we are not constraining the aspect ratio, we'll just use the whole crop\n    if (!(imgWidth && imgHeight)) {\n      return {\n        width: imgWidth,\n        height: imgHeight,\n        rect: source.crop\n      };\n    }\n    var crop = source.crop;\n    var hotspot = source.hotspot;\n    // If we are here, that means aspect ratio is locked and fitting will be a bit harder\n    var desiredAspectRatio = imgWidth / imgHeight;\n    var cropAspectRatio = crop.width / crop.height;\n    if (cropAspectRatio > desiredAspectRatio) {\n      // The crop is wider than the desired aspect ratio. That means we are cutting from the sides\n      var height = Math.round(crop.height);\n      var width = Math.round(height * desiredAspectRatio);\n      var top_2 = Math.max(0, Math.round(crop.top));\n      // Center output horizontally over hotspot\n      var hotspotXCenter = Math.round((hotspot.right - hotspot.left) / 2 + hotspot.left);\n      var left = Math.max(0, Math.round(hotspotXCenter - width / 2));\n      // Keep output within crop\n      if (left < crop.left) {\n        left = crop.left;\n      } else if (left + width > crop.left + crop.width) {\n        left = crop.left + crop.width - width;\n      }\n      cropRect = {\n        left: left,\n        top: top_2,\n        width: width,\n        height: height\n      };\n    } else {\n      // The crop is taller than the desired ratio, we are cutting from top and bottom\n      var width = crop.width;\n      var height = Math.round(width / desiredAspectRatio);\n      var left = Math.max(0, Math.round(crop.left));\n      // Center output vertically over hotspot\n      var hotspotYCenter = Math.round((hotspot.bottom - hotspot.top) / 2 + hotspot.top);\n      var top_3 = Math.max(0, Math.round(hotspotYCenter - height / 2));\n      // Keep output rect within crop\n      if (top_3 < crop.top) {\n        top_3 = crop.top;\n      } else if (top_3 + height > crop.top + crop.height) {\n        top_3 = crop.top + crop.height - height;\n      }\n      cropRect = {\n        left: left,\n        top: top_3,\n        width: width,\n        height: height\n      };\n    }\n    return {\n      width: imgWidth,\n      height: imgHeight,\n      rect: cropRect\n    };\n  }\n})(urlForImage);\nvar __assign = commonjsGlobal && commonjsGlobal.__assign || function () {\n  __assign = Object.assign || function (t) {\n    for (var s, i = 1, n = arguments.length; i < n; i++) {\n      s = arguments[i];\n      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n    }\n    return t;\n  };\n  return __assign.apply(this, arguments);\n};\nvar __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  Object.defineProperty(o, k2, {\n    enumerable: true,\n    get: function () {\n      return m[k];\n    }\n  });\n} : function (o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\nvar __setModuleDefault = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function (o, v) {\n  Object.defineProperty(o, \"default\", {\n    enumerable: true,\n    value: v\n  });\n} : function (o, v) {\n  o[\"default\"] = v;\n});\nvar __importStar = commonjsGlobal && commonjsGlobal.__importStar || function (mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n  __setModuleDefault(result, mod);\n  return result;\n};\nObject.defineProperty(builder, \"__esModule\", {\n  value: true\n});\nbuilder.ImageUrlBuilder = void 0;\nvar urlForImage_1 = __importStar(urlForImage);\nvar validFits = ['clip', 'crop', 'fill', 'fillmax', 'max', 'scale', 'min'];\nvar validCrops = ['top', 'bottom', 'left', 'right', 'center', 'focalpoint', 'entropy'];\nvar validAutoModes = ['format'];\nfunction isSanityModernClientLike(client) {\n  return client && 'config' in client ? typeof client.config === 'function' : false;\n}\nfunction isSanityClientLike(client) {\n  return client && 'clientConfig' in client ? typeof client.clientConfig === 'object' : false;\n}\nfunction rewriteSpecName(key) {\n  var specs = urlForImage_1.SPEC_NAME_TO_URL_NAME_MAPPINGS;\n  for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {\n    var entry = specs_1[_i];\n    var specName = entry[0],\n      param = entry[1];\n    if (key === specName || key === param) {\n      return specName;\n    }\n  }\n  return key;\n}\nfunction urlBuilder(options) {\n  // Did we get a modernish client?\n  if (isSanityModernClientLike(options)) {\n    // Inherit config from client\n    var _a = options.config(),\n      apiUrl = _a.apiHost,\n      projectId = _a.projectId,\n      dataset = _a.dataset;\n    var apiHost = apiUrl || 'https://api.sanity.io';\n    return new ImageUrlBuilder(null, {\n      baseUrl: apiHost.replace(/^https:\\/\\/api\\./, 'https://cdn.'),\n      projectId: projectId,\n      dataset: dataset\n    });\n  }\n  // Did we get a SanityClient?\n  var client = options;\n  if (isSanityClientLike(client)) {\n    // Inherit config from client\n    var _b = client.clientConfig,\n      apiUrl = _b.apiHost,\n      projectId = _b.projectId,\n      dataset = _b.dataset;\n    var apiHost = apiUrl || 'https://api.sanity.io';\n    return new ImageUrlBuilder(null, {\n      baseUrl: apiHost.replace(/^https:\\/\\/api\\./, 'https://cdn.'),\n      projectId: projectId,\n      dataset: dataset\n    });\n  }\n  // Or just accept the options as given\n  return new ImageUrlBuilder(null, options);\n}\nbuilder.default = urlBuilder;\nvar ImageUrlBuilder = /** @class */function () {\n  function ImageUrlBuilder(parent, options) {\n    this.options = parent ? __assign(__assign({}, parent.options || {}), options || {}) : __assign({}, options || {}); // Copy options\n  }\n  ImageUrlBuilder.prototype.withOptions = function (options) {\n    var baseUrl = options.baseUrl || this.options.baseUrl;\n    var newOptions = {\n      baseUrl: baseUrl\n    };\n    for (var key in options) {\n      if (options.hasOwnProperty(key)) {\n        var specKey = rewriteSpecName(key);\n        newOptions[specKey] = options[key];\n      }\n    }\n    return new ImageUrlBuilder(this, __assign({\n      baseUrl: baseUrl\n    }, newOptions));\n  };\n  // The image to be represented. Accepts a Sanity 'image'-document, 'asset'-document or\n  // _id of asset. To get the benefit of automatic hot-spot/crop integration with the content\n  // studio, the 'image'-document must be provided.\n  ImageUrlBuilder.prototype.image = function (source) {\n    return this.withOptions({\n      source: source\n    });\n  };\n  // Specify the dataset\n  ImageUrlBuilder.prototype.dataset = function (dataset) {\n    return this.withOptions({\n      dataset: dataset\n    });\n  };\n  // Specify the projectId\n  ImageUrlBuilder.prototype.projectId = function (projectId) {\n    return this.withOptions({\n      projectId: projectId\n    });\n  };\n  // Specify background color\n  ImageUrlBuilder.prototype.bg = function (bg) {\n    return this.withOptions({\n      bg: bg\n    });\n  };\n  // Set DPR scaling factor\n  ImageUrlBuilder.prototype.dpr = function (dpr) {\n    // A DPR of 1 is the default - so only include it if we have a different value\n    return this.withOptions(dpr && dpr !== 1 ? {\n      dpr: dpr\n    } : {});\n  };\n  // Specify the width of the image in pixels\n  ImageUrlBuilder.prototype.width = function (width) {\n    return this.withOptions({\n      width: width\n    });\n  };\n  // Specify the height of the image in pixels\n  ImageUrlBuilder.prototype.height = function (height) {\n    return this.withOptions({\n      height: height\n    });\n  };\n  // Specify focal point in fraction of image dimensions. Each component 0.0-1.0\n  ImageUrlBuilder.prototype.focalPoint = function (x, y) {\n    return this.withOptions({\n      focalPoint: {\n        x: x,\n        y: y\n      }\n    });\n  };\n  ImageUrlBuilder.prototype.maxWidth = function (maxWidth) {\n    return this.withOptions({\n      maxWidth: maxWidth\n    });\n  };\n  ImageUrlBuilder.prototype.minWidth = function (minWidth) {\n    return this.withOptions({\n      minWidth: minWidth\n    });\n  };\n  ImageUrlBuilder.prototype.maxHeight = function (maxHeight) {\n    return this.withOptions({\n      maxHeight: maxHeight\n    });\n  };\n  ImageUrlBuilder.prototype.minHeight = function (minHeight) {\n    return this.withOptions({\n      minHeight: minHeight\n    });\n  };\n  // Specify width and height in pixels\n  ImageUrlBuilder.prototype.size = function (width, height) {\n    return this.withOptions({\n      width: width,\n      height: height\n    });\n  };\n  // Specify blur between 0 and 100\n  ImageUrlBuilder.prototype.blur = function (blur) {\n    return this.withOptions({\n      blur: blur\n    });\n  };\n  ImageUrlBuilder.prototype.sharpen = function (sharpen) {\n    return this.withOptions({\n      sharpen: sharpen\n    });\n  };\n  // Specify the desired rectangle of the image\n  ImageUrlBuilder.prototype.rect = function (left, top, width, height) {\n    return this.withOptions({\n      rect: {\n        left: left,\n        top: top,\n        width: width,\n        height: height\n      }\n    });\n  };\n  // Specify the image format of the image. 'jpg', 'pjpg', 'png', 'webp'\n  ImageUrlBuilder.prototype.format = function (format) {\n    return this.withOptions({\n      format: format\n    });\n  };\n  ImageUrlBuilder.prototype.invert = function (invert) {\n    return this.withOptions({\n      invert: invert\n    });\n  };\n  // Rotation in degrees 0, 90, 180, 270\n  ImageUrlBuilder.prototype.orientation = function (orientation) {\n    return this.withOptions({\n      orientation: orientation\n    });\n  };\n  // Compression quality 0-100\n  ImageUrlBuilder.prototype.quality = function (quality) {\n    return this.withOptions({\n      quality: quality\n    });\n  };\n  // Make it a download link. Parameter is default filename.\n  ImageUrlBuilder.prototype.forceDownload = function (download) {\n    return this.withOptions({\n      download: download\n    });\n  };\n  // Flip image horizontally\n  ImageUrlBuilder.prototype.flipHorizontal = function () {\n    return this.withOptions({\n      flipHorizontal: true\n    });\n  };\n  // Flip image vertically\n  ImageUrlBuilder.prototype.flipVertical = function () {\n    return this.withOptions({\n      flipVertical: true\n    });\n  };\n  // Ignore crop/hotspot from image record, even when present\n  ImageUrlBuilder.prototype.ignoreImageParams = function () {\n    return this.withOptions({\n      ignoreImageParams: true\n    });\n  };\n  ImageUrlBuilder.prototype.fit = function (value) {\n    if (validFits.indexOf(value) === -1) {\n      throw new Error(\"Invalid fit mode \\\"\".concat(value, \"\\\"\"));\n    }\n    return this.withOptions({\n      fit: value\n    });\n  };\n  ImageUrlBuilder.prototype.crop = function (value) {\n    if (validCrops.indexOf(value) === -1) {\n      throw new Error(\"Invalid crop mode \\\"\".concat(value, \"\\\"\"));\n    }\n    return this.withOptions({\n      crop: value\n    });\n  };\n  // Saturation\n  ImageUrlBuilder.prototype.saturation = function (saturation) {\n    return this.withOptions({\n      saturation: saturation\n    });\n  };\n  ImageUrlBuilder.prototype.auto = function (value) {\n    if (validAutoModes.indexOf(value) === -1) {\n      throw new Error(\"Invalid auto mode \\\"\".concat(value, \"\\\"\"));\n    }\n    return this.withOptions({\n      auto: value\n    });\n  };\n  // Specify the number of pixels to pad the image\n  ImageUrlBuilder.prototype.pad = function (pad) {\n    return this.withOptions({\n      pad: pad\n    });\n  };\n  // Gets the url based on the submitted parameters\n  ImageUrlBuilder.prototype.url = function () {\n    return (0, urlForImage_1.default)(this.options);\n  };\n  // Alias for url()\n  ImageUrlBuilder.prototype.toString = function () {\n    return this.url();\n  };\n  return ImageUrlBuilder;\n}();\nbuilder.ImageUrlBuilder = ImageUrlBuilder;\nvar __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) {\n  return mod && mod.__esModule ? mod : {\n    \"default\": mod\n  };\n};\nvar builder_1 = __importDefault(builder);\nvar node = builder_1.default;\nvar createImageUrlBuilder = /*@__PURE__*/getDefaultExportFromCjs(node);\nfunction useImageUrlBuilder(clientOptions) {\n  const client = useClient(clientOptions);\n  const builder = useMemo(() => createImageUrlBuilder(client), [client]);\n  return builder;\n}\nfunction useImageUrlBuilderImage(source, clientOptions) {\n  const builder = useImageUrlBuilder(clientOptions);\n  const image = useMemo(() => source && builder ? builder.image(source) : null, [builder, source]);\n  return image;\n}\nconst DEFAULT_PARAMS = {};\nconst DEFAULT_OPTIONS = {\n  apiVersion: \"v2023-05-01\"\n};\nconst DEFAULT_INITIAL_VALUE = null;\nfunction useParams(params) {\n  const stringifiedParams = useMemo(() => JSON.stringify(params || {}), [params]);\n  return useMemo(() => JSON.parse(stringifiedParams), [stringifiedParams]);\n}\nfunction useListeningQuery(query, _ref) {\n  let {\n    params = DEFAULT_PARAMS,\n    options = DEFAULT_OPTIONS,\n    initialValue = DEFAULT_INITIAL_VALUE\n  } = _ref;\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(false);\n  const [data, setData] = useState(initialValue);\n  const memoParams = useParams(params);\n  const memoOptions = useParams(options);\n  const subscription = useRef(null);\n  const documentStore = useDocumentStore();\n  useEffect(() => {\n    if (query && !error && !subscription.current) {\n      try {\n        subscription.current = documentStore.listenQuery(query, memoParams, memoOptions).pipe(distinctUntilChanged(isEqual), catchError(err => {\n          console.error(err);\n          setError(err);\n          setLoading(false);\n          setData(null);\n          return err;\n        })).subscribe(documents => {\n          setData(current => isEqual(current, documents) ? current : documents);\n          setLoading(false);\n          setError(false);\n        });\n      } catch (err) {\n        console.error(err);\n        setLoading(false);\n        setError(err);\n      }\n    }\n    if (error && subscription.current) {\n      subscription.current.unsubscribe();\n    }\n    return () => {\n      var _a;\n      if (subscription.current) {\n        (_a = subscription == null ? void 0 : subscription.current) == null ? void 0 : _a.unsubscribe();\n        subscription.current = null;\n      }\n    };\n  }, [query, error, memoParams, memoOptions, documentStore]);\n  return {\n    data,\n    loading,\n    error\n  };\n}\nfunction useProjectUsers(_ref2) {\n  let {\n    apiVersion\n  } = _ref2;\n  const {\n    currentUser\n  } = useWorkspace();\n  const client = useClient({\n    apiVersion: apiVersion != null ? apiVersion : \"2023-01-01\"\n  });\n  const [users, setUsers] = useState([]);\n  useEffect(() => {\n    const {\n      projectId\n    } = client.config();\n    async function getUser(id) {\n      const userDetails = await client.request({\n        url: \"/projects/\".concat(projectId, \"/users/\").concat(id)\n      });\n      return userDetails;\n    }\n    async function getUsersWithRoles() {\n      const userRoles = await client.request({\n        url: \"/projects/\".concat(projectId, \"/acl\")\n      }).then(async res => Promise.all(res.map(async user => ({\n        isCurrentUser: user.projectUserId === (currentUser == null ? void 0 : currentUser.id),\n        ...(await getUser(user.projectUserId))\n      })))).catch(err => err);\n      setUsers(userRoles);\n    }\n    if (!users.length) {\n      getUsersWithRoles();\n    }\n  }, [client, currentUser == null ? void 0 : currentUser.id, users.length]);\n  return users;\n}\nfunction useOpenInNewPane(id, type) {\n  const routerContext = React.useContext(RouterContext);\n  const {\n    routerPanesState,\n    groupIndex\n  } = usePaneRouter();\n  const openInNewPane = React.useCallback(() => {\n    if (!routerContext || !id || !type) {\n      return;\n    }\n    const panes = [...routerPanesState];\n    panes.splice(groupIndex + 1, 0, [{\n      id,\n      params: {\n        type\n      }\n    }]);\n    const href = routerContext.resolvePathFromState({\n      panes\n    });\n    routerContext.navigateUrl({\n      path: href\n    });\n  }, [id, type, routerContext, routerPanesState, groupIndex]);\n  return openInNewPane;\n}\nconst DEFAULT_PROPS = {\n  tone: \"primary\"\n};\nfunction Feedback(props) {\n  const {\n    title,\n    description,\n    icon,\n    tone,\n    children\n  } = {\n    ...DEFAULT_PROPS,\n    ...props\n  };\n  return /* @__PURE__ */jsx(Card, {\n    tone,\n    padding: 4,\n    radius: 3,\n    border: true,\n    children: /* @__PURE__ */jsxs(Flex, {\n      children: [icon ? \"display icon\" : null, children ? children : /* @__PURE__ */jsx(Box, {\n        flex: 1,\n        children: /* @__PURE__ */jsxs(Stack, {\n          space: 4,\n          children: [title ? /* @__PURE__ */jsx(Text, {\n            weight: \"semibold\",\n            children: title\n          }) : null, description ? /* @__PURE__ */jsx(Text, {\n            size: 2,\n            children: description\n          }) : null]\n        })\n      })]\n    })\n  });\n}\nvar __freeze = Object.freeze;\nvar __defProp = Object.defineProperty;\nvar __template = (cooked, raw) => __freeze(__defProp(cooked, \"raw\", {\n  value: __freeze(cooked.slice())\n}));\nvar _a, _b, _c;\nconst TableWrapper = function () {\n  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return /* @__PURE__ */jsx(Card, {\n    as: \"table\",\n    ...props\n  });\n};\nconst StyledTable = styled(TableWrapper)(() => css(_a || (_a = __template([\"\\n    display: table;\\n    width: 100%;\\n    border-collapse: collapse;\\n\\n    &:not([hidden]) {\\n      display: table;\\n      border-collapse: collapse;\\n    }\\n  \"]))));\nfunction Table(props) {\n  const {\n    children,\n    ...rest\n  } = props;\n  return /* @__PURE__ */jsx(StyledTable, {\n    ...rest,\n    children\n  });\n}\nconst RowWrapper = function () {\n  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return /* @__PURE__ */jsx(Card, {\n    as: \"tr\",\n    ...props\n  });\n};\nconst StyledRow = styled(RowWrapper)(() => css(_b || (_b = __template([\"\\n    display: table-row;\\n\\n    &:not([hidden]) {\\n      display: table-row;\\n    }\\n  \"]))));\nfunction Row(props) {\n  const {\n    children,\n    ...rest\n  } = props;\n  return /* @__PURE__ */jsx(StyledRow, {\n    ...rest,\n    children\n  });\n}\nconst CellWrapper = function () {\n  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return /* @__PURE__ */jsx(Card, {\n    as: \"td\",\n    ...props\n  });\n};\nconst StyledCell = styled(CellWrapper)(() => css(_c || (_c = __template([\"\\n    display: table-cell;\\n\\n    &:not([hidden]) {\\n      display: table-cell;\\n    }\\n  \"]))));\nfunction Cell(props) {\n  const {\n    children,\n    ...rest\n  } = props;\n  return /* @__PURE__ */jsx(StyledCell, {\n    ...rest,\n    children\n  });\n}\nfunction searchUsers(users, searchString) {\n  return users.filter(user => {\n    const displayName = (user.displayName || \"\").toLowerCase();\n    if (displayName.startsWith(searchString)) return true;\n    const givenName = (user.givenName || \"\").toLowerCase();\n    if (givenName.startsWith(searchString)) return true;\n    const middleName = (user.middleName || \"\").toLowerCase();\n    if (middleName.startsWith(searchString)) return true;\n    const familyName = (user.familyName || \"\").toLowerCase();\n    if (familyName.startsWith(searchString)) return true;\n    return false;\n  });\n}\nconst LABELS = {\n  addMe: \"Assign myself\",\n  removeMe: \"Unassign myself\",\n  clear: \"Clear assignees\",\n  searchPlaceholder: \"Search users\",\n  notFound: \"No users found\"\n};\nfunction UserSelectMenu(props) {\n  const {\n    value = [],\n    userList = [],\n    onAdd,\n    onRemove,\n    onClear,\n    style = {}\n  } = props;\n  const labels = (props == null ? void 0 : props.labels) ? {\n    ...LABELS,\n    ...props.labels\n  } : LABELS;\n  const [searchString, setSearchString] = React.useState(\"\");\n  const searchResults = searchUsers(userList || [], searchString);\n  const me = userList.find(u => u.isCurrentUser);\n  const meAssigned = me && value.includes(me.id);\n  const input = useRef(null);\n  const handleSearchChange = event => {\n    setSearchString(event.target.value);\n  };\n  const handleSelect = (isChecked, user) => {\n    if (!isChecked) {\n      if (onAdd) onAdd(user.id);\n    } else if (onRemove) onRemove(user.id);\n  };\n  const handleAssignMyself = () => {\n    if (me && onAdd) onAdd(me.id);\n  };\n  const handleUnassignMyself = () => {\n    if (me && onRemove) onRemove(me.id);\n  };\n  const handleClearAssigneesClick = () => {\n    if (onClear) onClear();\n  };\n  return /* @__PURE__ */jsxs(Menu, {\n    style,\n    children: [meAssigned ? /* @__PURE__ */jsx(MenuItem, {\n      tone: \"caution\",\n      disabled: !me,\n      onClick: handleUnassignMyself,\n      icon: RemoveCircleIcon,\n      text: labels.removeMe\n    }) : /* @__PURE__ */jsx(MenuItem, {\n      tone: \"positive\",\n      onClick: handleAssignMyself,\n      icon: AddCircleIcon,\n      text: labels.addMe\n    }), /* @__PURE__ */jsx(MenuItem, {\n      tone: \"critical\",\n      disabled: value.length === 0,\n      onClick: handleClearAssigneesClick,\n      icon: RestoreIcon,\n      text: labels.clear\n    }), /* @__PURE__ */jsx(Box, {\n      padding: 1,\n      children: /* @__PURE__ */jsx(TextInput, {\n        ref: input,\n        onChange: handleSearchChange,\n        placeholder: labels.searchPlaceholder,\n        value: searchString\n      })\n    }), searchString && (searchResults == null ? void 0 : searchResults.length) === 0 && /* @__PURE__ */jsx(MenuItem, {\n      disabled: true,\n      text: labels.notFound\n    }), searchResults && searchResults.map(user => /* @__PURE__ */jsx(MenuItem, {\n      pressed: value.includes(user.id),\n      onClick: () => handleSelect(value.indexOf(user.id) > -1, user),\n      children: /* @__PURE__ */jsxs(Flex, {\n        align: \"center\",\n        children: [/* @__PURE__ */jsx(UserAvatar, {\n          user,\n          size: 1\n        }), /* @__PURE__ */jsx(Box, {\n          paddingX: 2,\n          flex: 1,\n          children: /* @__PURE__ */jsx(Text, {\n            children: user.displayName\n          })\n        }), user.isCurrentUser && /* @__PURE__ */jsx(Badge, {\n          fontSize: 1,\n          tone: \"positive\",\n          mode: \"outline\",\n          children: \"Me\"\n        })]\n      })\n    }, user.id))]\n  });\n}\nexport { Cell, Feedback, Row, Table, UserSelectMenu, useImageUrlBuilder, useImageUrlBuilderImage, useListeningQuery, useOpenInNewPane, useProjectUsers };\n//# sourceMappingURL=index.js.map\n","/**\n * ### Tree Builder\n * Recursive function to build out successive branches of the hierarchy up to five levels deep.\n */\n\n/**\n * #### Branch Builder\n * For create-in-place of draft documents, branch builder needs to\n * query and display draft versions of documents that are registered\n * in this array as published. Here's how the query works:\n * - get the any \"published\" document in the .concepts[] array that has\n *   a `drafts.` version, or\n * - get any published document in the .concepts[] array, except those\n *   with a `conceptId` in the \"drafts\" list. This eliminates returning\n *   both the draft and published versions of the same document.\n * - in both cases, returned documents must have the _id of the parent\n *   of this child in their .broader[] array.\n */\nconst branchBuilder = (level = 1): string | void => {\n  if (level > 6) {\n    return ''\n  }\n  return `\"childConcepts\": *[\n    (\n      (\n        _id in $draftConceptIds &&\n        !(conceptId in *[_id in $conceptIds].conceptId)\n      ) \n      ||\n      (\n        _id in $conceptIds &&\n        !(conceptId in $draftConceptIds)\n      )\n    ) && ^._id in broader[]._ref ]|order(prefLabel){\n      \"id\": _id,\n      \"level\": ${level},\n      prefLabel,\n      definition,\n      example,\n      scopeNote,\n      ${branchBuilder(level + 1)}\n    }`\n}\n/**\n * #### Input Branch Builder\n * Displays only published concepts\n */\nconst inputBranchBuilder = (level = 1): string | void => {\n  if (level > 6) {\n    return ''\n  }\n  return `\"childConcepts\": *[_id in *[_id == $id][0].concepts[]._ref && ^._id in broader[]._ref ]|order(prefLabel){\n      \"id\": _id,\n      \"level\": ${level},\n      prefLabel,\n      definition,\n      example,\n      scopeNote,\n      ${inputBranchBuilder(level + 1)}\n    }`\n}\n\n/**\n * #### Trunk Builder\n * Fetch the top concepts and their child concepts and orphans and\n * their child concepts. coalesce() returns the first non-null value\n * in the list of arguments, so either the draft or the published concept.\n *\n * To get orphans:\n * - filter to concepts in this scheme only\n * - filter out concepts that reference a topConcept in this scheme as\n *   a broader term\n * - filter out concepts that reference other concepts in this scheme\n *   as a broader term\n *\n * Used in Hierarchy.tsx\n */\nexport const trunkBuilder = (): string => {\n  return `*[_id == $id][0] {\n    _updatedAt,\n    \"topConcepts\": *[\n      (\n        _id in $draftTopConceptIds &&\n        !(conceptId in *[_id in $topConceptIds].conceptId)\n      )\n      ||\n      (\n        _id in $topConceptIds\n      )\n      ]|order(prefLabel) {\n      \"id\": _id,\n      \"level\": 0,\n      prefLabel,\n      definition,\n      example,\n      scopeNote,\n      ${branchBuilder()}\n    },\n    \"orphans\": *[\n      ((\n        _id in $draftConceptIds &&\n        !(conceptId in *[_id in $conceptIds].conceptId)\n      )\n      ||\n      (\n        _id in $conceptIds\n      )) &&\n      count(\n        (broader[]._ref) [@ in coalesce(\n          *[_id == 'drafts.' + $id][0], \n          *[_id == $id][0]\n        ).topConcepts[]._ref]) < 1 &&\n      count(\n        (broader[]._ref) [@ in coalesce(\n          *[_id == 'drafts.' + $id][0], \n          *[_id == $id][0]\n        ).concepts[]._ref]) < 1\n    ]|order(prefLabel){\n      \"id\": _id,\n      \"level\": 0,\n      prefLabel,\n      definition,\n      example,\n      scopeNote,\n      ${branchBuilder()}\n    }\n  }`\n}\n\n/**\n * #### Input Builder\n * Accept a branchId parameter, and filter to topConcepts and Orphans\n * in that branch only. Then call branchBuilder recursively — it will\n * only build terms in the scheme referenced by that concept.\n * - branchBuilder() and inputBuilder() are called in Hierarchy.tsx\n */\nexport const inputBuilder = (): string => {\n  return `\n  select($branchId != null => \n    *[_id == $id][0] {\n      _updatedAt,\n      \"topConcepts\":*[_type == \"skosConcept\" && conceptId == $branchId]{\n        \"id\": _id,\n        \"level\": 0,\n        prefLabel,\n        definition,\n        example,\n        scopeNote,\n        ${inputBranchBuilder()}\n      }, \n      \"orphans\": []\n    },\n    *[_id == $id][0] {\n      _updatedAt,\n      \"topConcepts\":topConcepts[]->|order(prefLabel){\n        \"id\": _id,\n        \"level\": 0,\n        prefLabel,\n        definition,\n        example,\n        scopeNote,\n        ${inputBranchBuilder()}\n      }, \n      \"orphans\": *[\n        _id in coalesce(*[_id == 'drafts.' + $id][0], *[_id == $id][0]).concepts[]._ref &&\n        count((broader[]._ref) [@ in coalesce(*[_id == 'drafts.' + $id][0], *[_id == $id][0]).topConcepts[]._ref]) < 1 &&\n        count((broader[]._ref) [@ in coalesce(*[_id == 'drafts.' + $id][0], *[_id == $id][0]).concepts[]._ref]) < 1\n      ]|order(prefLabel){\n        \"id\": _id,\n        \"level\": 0,\n        prefLabel,\n        definition,\n        example,\n        scopeNote,\n        ${inputBranchBuilder()}\n      }\n    }\n  )`\n}\n","import {createContext} from 'react'\n\ntype TreeContextType = {\n  globalVisibility?: {treeId: string; treeVisibility: string}\n  editControls?: boolean\n  setEditControls?: (value: boolean) => void\n}\n\nexport const SchemeContext = createContext(null)\nexport const TreeContext = createContext<TreeContextType>({editControls: false})\n","import {useClient} from 'sanity'\nimport {useToast} from '@sanity/ui'\nimport {useCallback} from 'react'\nimport {randomKey} from '@sanity/util/content'\nimport {useOpenNewConceptPane} from './useOpenNewConceptPane'\n\n/**\n * #### Concept Creation Hook\n * Used for creating concepts and top concepts from the Concept Scheme\n * hierarchy view.\n */\nexport function useCreateConcept(document: any) {\n  const toast = useToast()\n  const client = useClient({apiVersion: '2021-10-21'})\n  const openInNewPane = useOpenNewConceptPane()\n\n  const schemaBaseIri = document.displayed.baseIri // schema baseIri\n\n  // conceptId here is the broader term. Re-label this for clarity.\n  const createConcept = useCallback(\n    (conceptType: string, conceptId?: string, prefLabel?: string) => {\n      let skosConcept: any\n      if (conceptId) {\n        skosConcept = {\n          _id: `drafts.${randomKey()}`,\n          _type: 'skosConcept',\n          conceptId: `${randomKey(6)}`,\n          prefLabel: '',\n          baseIri: schemaBaseIri,\n          broader: [\n            conceptId && {\n              _key: randomKey(6),\n              _ref: conceptId,\n              _type: 'reference',\n            },\n          ],\n          related: [],\n        }\n      } else {\n        skosConcept = {\n          _id: `drafts.${randomKey()}`,\n          _type: 'skosConcept',\n          conceptId: `${randomKey(6)}`,\n          prefLabel: '',\n          baseIri: schemaBaseIri,\n          broader: [],\n          related: [],\n        }\n      }\n\n      // Ensure concepts are added to a draft of the concept scheme document\n      const draftConceptScheme = JSON.parse(JSON.stringify(document.displayed))\n\n      if (!draftConceptScheme._id.includes('drafts.')) {\n        draftConceptScheme._id = `drafts.${draftConceptScheme._id}`\n      }\n\n      client\n        .transaction()\n        // use createIfNotExist here to make sure there's a draft conceptScheme\n        .createIfNotExists(draftConceptScheme)\n        .create(skosConcept)\n        // patch concept or top concept as a reference in place:\n        // https://www.sanity.io/blog/obvious-features-aren-t-obviously-made#2c38c9f38060\n        // https://github.com/search?q=repo%3Asanity-io%2Fsanity%20_strengthenOnPublish&type=code\n        .patch(draftConceptScheme._id, (patch) => {\n          if (conceptType == 'topConcept') {\n            return patch.setIfMissing({topConcepts: []}).append('topConcepts', [\n              {\n                _ref: skosConcept._id.replace('drafts.', ''),\n                _type: 'reference',\n                _key: randomKey(6),\n                _weak: true,\n                _strengthenOnPublish: {\n                  _type: 'skosConcept',\n                  weak: true,\n                  template: {id: 'skosConcept', params: 'undefined'},\n                },\n              },\n            ])\n          }\n          return patch.setIfMissing({concepts: []}).insert('after', 'concepts[-1]', [\n            {\n              _ref: skosConcept._id.replace('drafts.', ''),\n              _type: 'reference',\n              _key: randomKey(6),\n              _weak: true,\n              _strengthenOnPublish: {\n                _type: 'skosConcept',\n                weak: undefined,\n                template: {id: 'skosConcept', params: 'undefined'},\n              },\n            },\n          ])\n        })\n        .commit({autoGenerateArrayKeys: true})\n        .then((res) => {\n          toast.push({\n            closable: true,\n            status: 'success',\n            title: 'Created new concept',\n          })\n          openInNewPane(skosConcept._id)\n        })\n        .catch((err) => {\n          toast.push({\n            closable: true,\n            status: 'error',\n            title: 'Error creating concept',\n            description: err.message,\n          })\n        })\n    },\n    [document.displayed, client, schemaBaseIri, toast, openInNewPane]\n  )\n  return createConcept\n}\n","import {useCallback, useContext} from 'react'\nimport {usePaneRouter} from 'sanity/structure'\nimport {RouterContext} from 'sanity/router'\n\n/**\n * Open in New Pane Link for Concepts\n */\nexport function useOpenNewConceptPane() {\n  const routerContext = useContext(RouterContext)\n  const {routerPanesState, groupIndex} = usePaneRouter()\n\n  const openInNewPane = useCallback(\n    (conceptId: string) => {\n      if (!routerContext || !conceptId) {\n        return\n      }\n\n      const panes = [...routerPanesState]\n      panes.splice(groupIndex + 1, groupIndex + 1, [\n        {\n          id: conceptId,\n          params: {type: 'skosConcept'},\n        },\n      ])\n\n      const href = routerContext.resolvePathFromState({panes})\n      routerContext.navigateUrl({path: href})\n    },\n    [routerContext, routerPanesState, groupIndex]\n  )\n\n  return openInNewPane\n}\n","import {useCallback} from 'react'\nimport {useClient} from 'sanity'\nimport {useToast} from '@sanity/ui'\n\n/**\n * #### Concept Removal Hook\n * Used for removing concepts and top concepts from the Concept Scheme\n * hierarchy view.\n */\nexport function useRemoveConcept(document: any) {\n  const toast = useToast()\n  const client = useClient({apiVersion: '2021-10-21'})\n\n  // conceptId is the id of the concept to be removed\n  const removeConcept = useCallback(\n    (conceptId: string, conceptType: string, prefLabel?: string) => {\n      const type = conceptType == 'topConcept' ? 'topConcepts' : 'concepts'\n\n      // Ensure concepts are removed from a draft of the concept scheme document\n      const draftConceptScheme = JSON.parse(JSON.stringify(document.displayed))\n\n      if (!draftConceptScheme._id.includes('drafts.')) {\n        draftConceptScheme._id = `drafts.${draftConceptScheme._id}`\n      }\n\n      client\n        .transaction()\n        .createIfNotExists(draftConceptScheme)\n        .patch(draftConceptScheme._id, (patch) =>\n          patch.unset([`${type}[_ref==\"${conceptId.replace('drafts.', '')}\"]`])\n        )\n        .commit()\n        .then((res) => {\n          toast.push({\n            closable: true,\n            status: 'success',\n            title: `${prefLabel ? `\"${prefLabel}\"` : 'Concept'} removed from scheme`,\n          })\n        })\n        .catch((err) => {\n          toast.push({\n            closable: true,\n            status: 'error',\n            title: 'Error removing concept',\n            description: err.message,\n          })\n        })\n    },\n    [client, document.displayed, toast]\n  )\n  return removeConcept\n}\n","import {useColorSchemeValue} from 'sanity'\nimport {hues} from '@sanity/color'\n\nexport function useLinkColorScheme() {\n  const colorScheme = useColorSchemeValue()\n  if (colorScheme == 'dark') return hues.gray[50].hex\n  return hues.gray[800].hex\n}\n","import {useCallback, useContext} from 'react'\nimport {usePaneRouter} from 'sanity/structure'\nimport {RouterContext} from 'sanity/router'\nimport {ChildConceptTerm} from '../../types'\nimport {StyledConceptLink} from '../../styles'\nimport {useLinkColorScheme} from '../../hooks/useLinkColorScheme'\n\n/**\n * #### Concept Detail Link\n * Renders a link to a concept in the hierarchy tree that opens in a new pane.\n */\nexport function ConceptDetailLink({concept}: {concept: ChildConceptTerm}) {\n  const routerContext = useContext(RouterContext)\n  const {routerPanesState, groupIndex} = usePaneRouter()\n\n  const linkColor = useLinkColorScheme()\n\n  const {id, prefLabel} = concept ?? {}\n\n  const openInNewPane = useCallback(() => {\n    if (!routerContext || !id) {\n      return\n    }\n\n    const panes = [...routerPanesState]\n    panes.splice(groupIndex + 1, groupIndex + 1, [\n      {\n        id: id,\n        params: {type: 'skosConcept'},\n      },\n    ])\n\n    const href = routerContext.resolvePathFromState({panes})\n    routerContext.navigateUrl({path: href})\n  }, [id, routerContext, routerPanesState, groupIndex])\n\n  return (\n    <StyledConceptLink href=\"#\" onClick={openInNewPane} style={{color: linkColor}}>\n      {prefLabel}\n    </StyledConceptLink>\n  )\n}\n","import {useCallback, useState} from 'react'\nimport {Dialog, Box, Text, Stack, Label} from '@sanity/ui'\nimport {InfoOutlineIcon} from '@sanity/icons'\nimport {StyledTreeButton} from '../../styles'\nimport {useLinkColorScheme} from '../../hooks/useLinkColorScheme'\n\n/**\n * #### Information Icon and Dialogue with Concept Details\n * - affords Tree View access to Definition, Examples, and Scope Notes\n * - is rendered only when concept details are present\n */\nexport const ConceptDetailDialogue = ({concept}: {concept: any}) => {\n  const [open, setOpen] = useState(false)\n  const onClose = useCallback(() => setOpen(false), [])\n  const onOpen = useCallback(() => setOpen(true), [])\n\n  const linkColor = useLinkColorScheme()\n\n  if (!concept || (!concept.definition && !concept.example && !concept.scopeNote)) return null\n\n  return (\n    <>\n      <StyledTreeButton className=\"action\" aria-label=\"info\" onClick={onOpen} type=\"button\">\n        <InfoOutlineIcon className=\"info\" style={{color: linkColor}} />\n      </StyledTreeButton>\n\n      {open && (\n        <Dialog\n          header={concept.prefLabel}\n          id=\"dialog-example\"\n          onClose={onClose}\n          zOffset={1000}\n          width={1}\n        >\n          <Box padding={4} paddingBottom={5}>\n            <Stack space={4}>\n              {concept.definition && (\n                <Stack space={2}>\n                  <Label size={1}>Definition</Label>\n                  <Text size={2} muted style={{whiteSpace: 'pre-wrap'}}>\n                    {concept.definition}\n                  </Text>\n                </Stack>\n              )}\n              {concept.example && (\n                <Stack space={2}>\n                  <Label size={1}>Example</Label>\n                  <Text size={2} muted style={{whiteSpace: 'pre-wrap'}}>\n                    {concept.example}\n                  </Text>\n                </Stack>\n              )}\n              {concept.scopeNote && (\n                <Stack space={2}>\n                  <Label size={1}>Scope Note</Label>\n                  <Text size={2} muted style={{whiteSpace: 'pre-wrap'}}>\n                    {concept.scopeNote}\n                  </Text>\n                </Stack>\n              )}\n            </Stack>\n          </Box>\n        </Dialog>\n      )}\n    </>\n  )\n}\n","/* eslint-disable react/require-default-props */\nimport {useCallback} from 'react'\nimport {ChildConceptTerm} from '../../types'\nimport {StyledConceptLink, StyledConceptTitle} from '../../styles'\nimport {useLinkColorScheme} from '../../hooks/useLinkColorScheme'\n\n/**\n * #### Concept Select Link\n * Writes a concept _ref from the hierarchy tree to the current document\n */\nexport function ConceptSelectLink({\n  concept,\n  selectConcept,\n}: {\n  concept: ChildConceptTerm\n  selectConcept?: any\n}) {\n  const {prefLabel, id} = concept ?? {}\n\n  const linkColor = useLinkColorScheme()\n\n  const handleClick = useCallback(() => {\n    const conceptRef = {\n      _ref: id,\n      _type: 'reference',\n    }\n    selectConcept(conceptRef)\n  }, [id, selectConcept])\n\n  return (\n    <>\n      {selectConcept ? (\n        <StyledConceptLink href=\"#\" onClick={handleClick} style={{color: linkColor}}>\n          {prefLabel}\n        </StyledConceptLink>\n      ) : (\n        <StyledConceptTitle>{prefLabel}</StyledConceptTitle>\n      )}\n    </>\n  )\n}\n","import {useCallback, useContext, useState} from 'react'\nimport {Inline, Tooltip, Box, Stack, Text} from '@sanity/ui'\nimport {\n  ErrorOutlineIcon,\n  InfoOutlineIcon,\n  AddCircleIcon,\n  TrashIcon,\n  ToggleArrowRightIcon,\n  SquareIcon,\n} from '@sanity/icons'\nimport {useCreateConcept, useRemoveConcept} from '../hooks'\nimport {ChildConceptTerm} from '../types'\nimport {StyledChildConcept, StyledTreeButton, StyledTreeToggle} from '../styles'\nimport {SchemeContext, TreeContext} from '../context'\nimport {ChildConcepts} from './ChildConcepts'\nimport {ConceptDetailLink} from './interactions/ConceptDetailLink'\nimport {ConceptDetailDialogue} from './interactions/ConceptDetailDialogue'\nimport {ConceptSelectLink} from './interactions/ConceptSelectLink'\n\n/**\n * #### Child Concept Component\n * Renders a list of child concepts for a given concept.\n */\nexport const Children = ({\n  concept,\n  selectConcept,\n  inputComponent = false,\n}: {\n  concept: ChildConceptTerm\n  selectConcept: any\n  inputComponent: Boolean\n}) => {\n  const document: any = useContext(SchemeContext) || {}\n  const {\n    // @ts-expect-error — sort out type\n    globalVisibility: {treeVisibility},\n  } = useContext(TreeContext) || {}\n  const {editControls} = useContext(TreeContext) || {editControls: false}\n  const createConcept = useCreateConcept(document)\n  const removeConcept = useRemoveConcept(document)\n\n  const handleAddChild = useCallback(() => {\n    createConcept('concept', concept?.id, concept?.prefLabel)\n  }, [concept?.id, concept?.prefLabel, createConcept])\n\n  const handleRemoveConcept = useCallback(() => {\n    removeConcept(concept.id, 'concept', concept?.prefLabel)\n  }, [concept.id, concept?.prefLabel, removeConcept])\n\n  const [levelVisibility, setLevelVisibility] = useState(treeVisibility)\n\n  const handleToggle = useCallback(() => {\n    if (levelVisibility == 'open') {\n      setLevelVisibility('closed')\n    } else if (levelVisibility == 'closed') {\n      setLevelVisibility('open')\n    }\n  }, [levelVisibility])\n\n  return (\n    <StyledChildConcept className={levelVisibility}>\n      <Inline space={2}>\n        <Inline space={1}>\n          <Inline space={1}>\n            {concept?.childConcepts && concept.childConcepts.length > 0 && (\n              <StyledTreeToggle\n                onClick={handleToggle}\n                type=\"button\"\n                aria-expanded={levelVisibility == 'open'}\n              >\n                <ToggleArrowRightIcon />\n              </StyledTreeToggle>\n            )}\n            {concept?.childConcepts && concept.childConcepts.length == 0 && (\n              <SquareIcon className=\"spacer\" />\n            )}\n            {!concept?.prefLabel && <span className=\"untitled\">[new concept]</span>}\n            {inputComponent ? (\n              <ConceptSelectLink concept={concept} selectConcept={selectConcept} />\n            ) : (\n              <ConceptDetailLink concept={concept} />\n            )}\n          </Inline>\n          {!editControls && <ConceptDetailDialogue concept={concept} />}\n        </Inline>\n        {editControls && concept?.level && concept.level < 5 && (\n          <Inline space={2}>\n            <StyledTreeButton\n              onClick={handleAddChild}\n              type=\"button\"\n              className=\"action\"\n              aria-label=\"Add child a child concept\"\n            >\n              <AddCircleIcon className=\"add\" />\n            </StyledTreeButton>\n            <StyledTreeButton\n              onClick={handleRemoveConcept}\n              type=\"button\"\n              className=\"action\"\n              aria-label=\"Remove concept from scheme\"\n            >\n              <TrashIcon className=\"remove\" />\n            </StyledTreeButton>\n          </Inline>\n        )}\n\n        {editControls && concept.childConcepts?.length == 0 && concept.level == 5 && (\n          <Inline space={2}>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      This concept is at the maximum Taxonomy Manager hierarchy depth of 5 levels.\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <InfoOutlineIcon className=\"info warning\" />\n            </Tooltip>\n            <StyledTreeButton\n              onClick={handleRemoveConcept}\n              type=\"button\"\n              className=\"action\"\n              aria-label=\"Remove concept from scheme\"\n            >\n              <TrashIcon className=\"remove\" />\n            </StyledTreeButton>\n          </Inline>\n        )}\n\n        {concept?.childConcepts && concept?.childConcepts?.length > 0 && concept.level == 5 && (\n          <Inline space={1}>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      This concept has unlisted child concepts.\n                    </Text>\n                    <Text muted size={1}>\n                      The maximum hierarchy depth is 5 levels.\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <ErrorOutlineIcon className=\"info error\" />\n            </Tooltip>\n            {document.displayed?.controls && (\n              <StyledTreeButton\n                onClick={handleRemoveConcept}\n                type=\"button\"\n                className=\"action\"\n                aria-label=\"Remove concept from scheme\"\n              >\n                <TrashIcon className=\"remove\" />\n              </StyledTreeButton>\n            )}\n          </Inline>\n        )}\n      </Inline>\n      {concept?.childConcepts &&\n        concept.childConcepts.length > 0 &&\n        concept?.level &&\n        concept.level < 5 && (\n          <ChildConcepts\n            concepts={concept.childConcepts}\n            selectConcept={selectConcept}\n            inputComponent={inputComponent}\n          />\n        )}\n    </StyledChildConcept>\n  )\n}\n","import {ChildConceptTerm} from '../types'\nimport {StyledChildConcepts} from '../styles'\nimport {Children} from './Children'\n\n/**\n * #### Child Concepts\n * This component renders a list of child concepts for a given concept.\n * - provides the <ul> wrapper for each level of nesting\n */\nexport const ChildConcepts = ({\n  concepts,\n  inputComponent = false,\n  selectConcept,\n}: {\n  concepts: ChildConceptTerm[]\n  selectConcept: any\n  inputComponent: Boolean\n}) => {\n  return (\n    <StyledChildConcepts>\n      {concepts.map((concept: any) => {\n        return (\n          <Children\n            key={concept.id}\n            concept={concept}\n            selectConcept={selectConcept}\n            inputComponent={inputComponent}\n          />\n        )\n      })}\n    </StyledChildConcepts>\n  )\n}\n","import {useCallback, useContext, useState} from 'react'\nimport {Text, Inline, Tooltip, Box, Stack} from '@sanity/ui'\nimport {AddCircleIcon, TrashIcon, ToggleArrowRightIcon, SquareIcon} from '@sanity/icons'\nimport {useCreateConcept, useRemoveConcept} from '../hooks'\nimport {TopConceptTerm} from '../types'\nimport {StyledTopConcept, StyledTreeToggle, StyledTreeButton} from '../styles'\nimport {SchemeContext, TreeContext} from '../context'\nimport {ChildConcepts} from './ChildConcepts'\nimport {ConceptDetailLink} from './interactions/ConceptDetailLink'\nimport {ConceptDetailDialogue} from './interactions/ConceptDetailDialogue'\nimport {ConceptSelectLink} from './interactions/ConceptSelectLink'\n\ntype TopConceptsProps = {\n  concept: TopConceptTerm\n  treeVisibility: string\n  inputComponent: Boolean\n  selectConcept: any\n}\n\n/**\n * #### Top Concept Component\n * Renders a list of top concepts for a given schema.\n */\nexport const TopConcepts = ({\n  concept,\n  treeVisibility,\n  inputComponent,\n  selectConcept,\n}: TopConceptsProps) => {\n  const document: any = useContext(SchemeContext) || {}\n  const {editControls} = useContext(TreeContext) || {editControls: false}\n\n  const createConcept = useCreateConcept(document)\n  const removeConcept = useRemoveConcept(document)\n\n  const [levelVisibility, setLevelVisibility] = useState(treeVisibility)\n\n  const handleToggle = useCallback(() => {\n    if (levelVisibility == 'open') {\n      setLevelVisibility('closed')\n    } else if (levelVisibility == 'closed') {\n      setLevelVisibility('open')\n    }\n  }, [levelVisibility])\n\n  const handleAddChild = useCallback(() => {\n    createConcept('concept', concept?.id, concept?.prefLabel)\n  }, [concept?.id, concept?.prefLabel, createConcept])\n\n  const handleRemoveConcept = useCallback(() => {\n    removeConcept(concept?.id, 'topConcept', concept?.prefLabel)\n  }, [concept?.id, concept?.prefLabel, removeConcept])\n\n  return (\n    <StyledTopConcept className={levelVisibility}>\n      <Inline space={2}>\n        <Inline space={0}>\n          {concept?.childConcepts && concept.childConcepts.length > 0 && (\n            <StyledTreeToggle\n              onClick={handleToggle}\n              type=\"button\"\n              aria-expanded={levelVisibility == 'open'}\n            >\n              <ToggleArrowRightIcon />\n            </StyledTreeToggle>\n          )}\n          {concept?.childConcepts && concept.childConcepts.length == 0 && (\n            <SquareIcon className=\"spacer\" />\n          )}\n          {!concept?.prefLabel && <span className=\"untitled\">[new concept]</span>}\n          {inputComponent ? (\n            <ConceptSelectLink concept={concept} selectConcept={selectConcept} />\n          ) : (\n            <ConceptDetailLink concept={concept} />\n          )}\n        </Inline>\n        <Text size={1} muted>\n          top concept\n        </Text>\n        {!editControls && <ConceptDetailDialogue concept={concept} />}\n        {editControls && (\n          <Inline space={2}>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      Add a child concept\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <StyledTreeButton\n                onClick={handleAddChild}\n                type=\"button\"\n                className=\"action\"\n                aria-label=\"Add child a child concept\"\n              >\n                <AddCircleIcon className=\"add\" />\n              </StyledTreeButton>\n            </Tooltip>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      Remove concept from scheme\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <StyledTreeButton\n                onClick={handleRemoveConcept}\n                type=\"button\"\n                className=\"action\"\n                aria-label=\"Remove concept from scheme\"\n              >\n                <TrashIcon className=\"remove\" />\n              </StyledTreeButton>\n            </Tooltip>\n          </Inline>\n        )}\n      </Inline>\n\n      {concept?.childConcepts && concept.childConcepts.length > 0 && (\n        <ChildConcepts\n          concepts={concept.childConcepts}\n          selectConcept={selectConcept}\n          inputComponent={inputComponent}\n        />\n      )}\n    </StyledTopConcept>\n  )\n}\n","import {useCallback, useContext, useState} from 'react'\nimport {Text, Inline, Tooltip, Box, Stack} from '@sanity/ui'\nimport {AddCircleIcon, SquareIcon, ToggleArrowRightIcon, TrashIcon} from '@sanity/icons'\nimport {useCreateConcept, useRemoveConcept} from '../hooks'\nimport {ChildConceptTerm} from '../types'\nimport {StyledOrphan, StyledTreeButton, StyledTreeToggle} from '../styles'\nimport {SchemeContext, TreeContext} from '../context'\nimport {ChildConcepts} from './ChildConcepts'\nimport {ConceptDetailLink} from './interactions/ConceptDetailLink'\nimport {ConceptDetailDialogue} from './interactions/ConceptDetailDialogue'\nimport {ConceptSelectLink} from './interactions/ConceptSelectLink'\n\ntype OrphanProps = {\n  concept: ChildConceptTerm\n  treeVisibility: string\n  inputComponent: Boolean\n  selectConcept: any\n}\n\n/**\n * #### Orphan Concept Component\n * Renders a list of orphan concepts for a given schema.\n */\nexport const Orphans = ({concept, treeVisibility, inputComponent, selectConcept}: OrphanProps) => {\n  const document: any = useContext(SchemeContext) || {}\n  const {editControls} = useContext(TreeContext) || {editControls: false}\n\n  const createConcept = useCreateConcept(document)\n  const removeConcept = useRemoveConcept(document)\n\n  const [levelVisibility, setLevelVisibility] = useState(treeVisibility)\n\n  const handleToggle = useCallback(() => {\n    if (levelVisibility == 'open') {\n      setLevelVisibility('closed')\n    } else if (levelVisibility == 'closed') {\n      setLevelVisibility('open')\n    }\n  }, [levelVisibility])\n\n  const handleAddChild = useCallback(() => {\n    createConcept('concept', concept?.id, concept?.prefLabel)\n  }, [concept?.id, concept?.prefLabel, createConcept])\n\n  const handleRemoveConcept = useCallback(() => {\n    removeConcept(concept.id, 'concept', concept?.prefLabel)\n  }, [concept.id, concept?.prefLabel, removeConcept])\n\n  return (\n    <StyledOrphan className={levelVisibility}>\n      <Inline space={2}>\n        {concept?.childConcepts &&\n          concept.childConcepts.length > 0 &&\n          (inputComponent ? (\n            <SquareIcon className=\"spacer\" />\n          ) : (\n            <StyledTreeToggle\n              onClick={handleToggle}\n              type=\"button\"\n              aria-expanded={levelVisibility == 'open'}\n            >\n              <ToggleArrowRightIcon />\n            </StyledTreeToggle>\n          ))}\n        {concept?.childConcepts && concept.childConcepts.length == 0 && (\n          <SquareIcon className=\"spacer\" />\n        )}\n        {!concept?.prefLabel && <span className=\"untitled\">[new concept]</span>}\n        {inputComponent ? (\n          <ConceptSelectLink concept={concept} selectConcept={selectConcept} />\n        ) : (\n          <ConceptDetailLink concept={concept} />\n        )}\n        {document.displayed?.topConcepts?.length > 0 && (\n          <Text size={1} muted>\n            orphan\n          </Text>\n        )}\n        {!editControls && <ConceptDetailDialogue concept={concept} />}\n        {!inputComponent && editControls && (\n          <Inline space={2}>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      Add a child concept\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <StyledTreeButton\n                onClick={handleAddChild}\n                type=\"button\"\n                className=\"action\"\n                aria-label=\"Add child a child concept\"\n              >\n                <AddCircleIcon className=\"add\" />\n              </StyledTreeButton>\n            </Tooltip>\n            <Tooltip\n              content={\n                <Box padding={2} sizing=\"border\">\n                  <Stack padding={1} space={2}>\n                    <Text muted size={1}>\n                      Remove concept from scheme\n                    </Text>\n                  </Stack>\n                </Box>\n              }\n              fallbackPlacements={['right', 'left']}\n              placement=\"top\"\n            >\n              <StyledTreeButton\n                onClick={handleRemoveConcept}\n                type=\"button\"\n                className=\"action\"\n                aria-label=\"Remove concept from scheme\"\n              >\n                <TrashIcon className=\"remove\" />\n              </StyledTreeButton>\n            </Tooltip>\n          </Inline>\n        )}\n      </Inline>\n      {concept?.childConcepts && concept.childConcepts.length > 0 && (\n        <ChildConcepts\n          concepts={concept.childConcepts}\n          selectConcept={selectConcept}\n          inputComponent={inputComponent}\n        />\n      )}\n    </StyledOrphan>\n  )\n}\n","import {useCallback, useState} from 'react'\nimport {Card, Label, Stack, Text, Button, Dialog, Box, TextArea, TextInput} from '@sanity/ui'\nimport {AddIcon} from '@sanity/icons'\nimport {useAddTitle} from '../../hooks'\nimport {InlineHelp} from '../../styles'\nimport {SanityDocument} from 'sanity'\n\n/**\n * #### New Concept Scheme Guide\n * - Prompts adding title and description to new concept scheme.\n * - Data must be saved to newly created Concept Scheme documents before\n *  add top concept / add concept buttons will work.\n */\nexport const NewScheme = ({document}: {document: SanityDocument}) => {\n  const [open, setOpen] = useState(false)\n  const [titleValue, setTitleValue] = useState('')\n  const [descriptionValue, setDescriptionValue] = useState('')\n  const onClose = useCallback(() => setOpen(false), [])\n  const onOpen = useCallback(() => setOpen(true), [])\n\n  const handleTitleChange = useCallback((event: any) => {\n    setTitleValue(event.currentTarget.value)\n  }, [])\n  const handleDescriptionChange = useCallback((event: any) => {\n    setDescriptionValue(event.currentTarget.value)\n  }, [])\n\n  const addTitle = useAddTitle()\n\n  const handleAddTitle = useCallback(() => {\n    addTitle(document, titleValue, descriptionValue)\n  }, [addTitle, descriptionValue, document, titleValue])\n\n  return (\n    <InlineHelp>\n      <Card padding={[3, 3, 4]} radius={2} shadow={1} tone=\"primary\">\n        <Stack space={6}>\n          <Stack space={4}>\n            <Label size={4}>New Concept Scheme</Label>\n            <Text size={2}>\n              To start using hierarchy view taxonomy builder, first give your concept scheme a name\n              and optional description. You can also use the \"Editor\" tab to add concepts to the\n              tree manually.\n            </Text>\n          </Stack>\n          <Button tone=\"primary\" fontSize={2} icon={AddIcon} onClick={onOpen} text=\"Add Title\" />\n        </Stack>\n      </Card>\n      {open && (\n        <Dialog\n          header=\"Title & Description\"\n          id=\"title-description\"\n          onClose={onClose}\n          zOffset={1000}\n          width={1}\n        >\n          <Box padding={4}>\n            <Stack space={4}>\n              <Stack space={2}>\n                <Label size={1}>Title</Label>\n                <Text size={1} muted>\n                  Describe the concept scheme in one or two words.\n                </Text>\n              </Stack>\n              <TextInput\n                fontSize={2}\n                onChange={handleTitleChange}\n                padding={3}\n                placeholder=\"\"\n                value={titleValue}\n              />\n              <Stack space={2}>\n                <Label size={1}>Description (optional)</Label>\n                <Text size={1} muted>\n                  Describe the intended use of this concept scheme.\n                </Text>\n              </Stack>\n              <TextArea\n                fontSize={2}\n                onChange={handleDescriptionChange}\n                padding={3}\n                placeholder=\"\"\n                value={descriptionValue}\n                rows={3}\n              />\n              <Button tone=\"primary\" fontSize={2} onClick={handleAddTitle} text=\"Save\" />\n            </Stack>\n          </Box>\n        </Dialog>\n      )}\n    </InlineHelp>\n  )\n}\n","import {useCallback} from 'react'\nimport {useClient} from 'sanity'\nimport {useToast} from '@sanity/ui'\n\n/**\n * #### Add Title and Description to New Concept Scheme\n * Good for user experience, and also needed to write the\n * new scheme to the content lake, prior to which add top\n * concept / add concept buttons will not work.\n */\nexport function useAddTitle() {\n  const toast = useToast()\n  const client = useClient({apiVersion: '2021-10-21'})\n\n  const addTitle = useCallback(\n    (document: any, titleValue: string, descriptionValue?: string) => {\n      const documentId = document.displayed?._id\n      const schemaBaseIri = document.displayed?.baseIri\n      const schemeId = document.displayed?.schemeId\n\n      const doc = {\n        _id: `drafts.${documentId}`,\n        _type: 'skosConceptScheme',\n        schemeId: schemeId,\n        baseIri: schemaBaseIri,\n        title: titleValue,\n        description: descriptionValue ? descriptionValue : '',\n      }\n\n      client\n        .createIfNotExists(doc)\n        .then((_) => {\n          if (descriptionValue) {\n            return toast.push({\n              closable: true,\n              status: 'success',\n              title: 'Title and Description added.',\n            })\n          }\n          return toast.push({\n            closable: true,\n            status: 'success',\n            title: 'Title added.',\n          })\n        })\n        .catch((err) => {\n          toast.push({\n            closable: true,\n            status: 'error',\n            title: 'There has been an error',\n            description: err.message,\n          })\n        })\n    },\n    [client, toast]\n  )\n\n  return addTitle\n}\n","import {Card, Label, Stack, Text} from '@sanity/ui'\nimport {InlineHelp} from '../../styles'\n\n/**\n * #### No Concepts Guide\n * Prompts adding concepts to an empty scheme.\n */\nexport const NoConcepts = () => {\n  return (\n    <InlineHelp>\n      <Card padding={[3, 3, 4]} radius={2} shadow={1} tone=\"primary\">\n        <Stack space={4}>\n          <Label size={4}>No Concepts</Label>\n          <Text size={2}>\n            There are not yet any concepts assigned to this scheme. To create a multi-level\n            hierarchy with specific entry points, create Top Concepts first, then add children to\n            them. To create a flat list of concepts, create Entry Concepts directly.\n          </Text>\n        </Stack>\n      </Card>\n    </InlineHelp>\n  )\n}\n","import {useContext, useEffect} from 'react'\nimport {DocumentConcepts, TopConceptTerm, ChildConceptTerm} from '../types'\nimport {StyledTree} from '../styles'\nimport {TreeContext} from '../context'\nimport {TopConcepts} from './TopConcepts'\nimport {Orphans} from './Orphans'\nimport {NoConcepts} from './guides'\n\n/**\n * #### Tree View\n * - Fetches the complete tree of concepts in a concept scheme, stemming\n *   from Top Concepts or Orphans\n * - Displays the tree in a nested list.\n */\nexport const TreeStructure = ({\n  concepts,\n  inputComponent,\n  selectConcept,\n}: {\n  concepts: DocumentConcepts\n  inputComponent: Boolean\n  selectConcept: any\n}) => {\n  const {\n    globalVisibility: {treeId, treeVisibility} = {treeId: 123, treeVisibility: 'open'},\n    setEditControls = () => {\n      console.warn('setEditControls not defined')\n    },\n  } = useContext(TreeContext) || {}\n\n  useEffect(() => {\n    if (\n      concepts?.topConcepts &&\n      concepts.topConcepts.length === 0 &&\n      concepts?.orphans &&\n      concepts.orphans.length === 0\n    )\n      setEditControls(true)\n  }, [concepts.topConcepts, concepts.orphans, setEditControls])\n\n  if (\n    concepts?.topConcepts &&\n    concepts.topConcepts.length === 0 &&\n    concepts?.orphans &&\n    concepts.orphans.length === 0\n  ) {\n    return <NoConcepts />\n  }\n\n  return (\n    <StyledTree>\n      {concepts.topConcepts &&\n        concepts.topConcepts.map((concept: TopConceptTerm) => {\n          return (\n            <TopConcepts\n              key={concept?.id + treeId}\n              concept={concept}\n              treeVisibility={treeVisibility}\n              inputComponent={inputComponent}\n              selectConcept={selectConcept}\n            />\n          )\n        })}\n      {concepts.orphans.map((concept: ChildConceptTerm) => {\n        return (\n          <Orphans\n            key={concept.id + treeId}\n            concept={concept}\n            treeVisibility={treeVisibility}\n            inputComponent={inputComponent}\n            selectConcept={selectConcept}\n          />\n        )\n      })}\n    </StyledTree>\n  )\n}\n","/* eslint-disable react/require-default-props */\nimport {useContext} from 'react'\nimport {Flex, Spinner, Box, Text} from '@sanity/ui'\nimport {useListeningQuery} from 'sanity-plugin-utils'\nimport {inputBuilder} from '../../queries'\nimport {DocumentConcepts} from '../../types'\nimport {SchemeContext, TreeContext} from '../../context'\nimport {TreeStructure} from '../TreeStructure'\nimport {NewScheme} from '../guides'\n\n/**\n * #### Input Hierarchy Component\n * - Provides a frame for global controls and tree structure\n * - Fetches the complete tree of concepts in a concept scheme.\n * - Displays the tree in a nested list.\n * @param inputComponent - Specifies whether the component is a Studio\n *   input component. Set in HierarchyInput and passed through TreeView\n */\nexport const InputHierarchy = ({\n  branchId = '',\n  selectConcept,\n  inputComponent,\n}: {\n  branchId: string\n  selectConcept?: any\n  inputComponent: Boolean\n}) => {\n  const document: any = useContext(SchemeContext) || {}\n  const documentId = document.displayed?._id\n  const {data, loading, error} = useListeningQuery<DocumentConcepts>(\n    {\n      fetch: inputBuilder(),\n      listen: `*[_type == \"skosConcept\" || _id == $id]`,\n    },\n    {\n      params: {id: documentId, branchId},\n    }\n  ) as {data: DocumentConcepts; loading: boolean; error: Error | null}\n  if (loading) {\n    return (\n      <Box padding={5}>\n        <Flex\n          align=\"center\"\n          direction=\"column\"\n          gap={5}\n          height=\"fill\"\n          justify=\"center\"\n          style={{paddingTop: '1rem'}}\n        >\n          <Spinner muted />\n          <Text muted size={1}>\n            Loading hierarchy…\n          </Text>\n        </Flex>\n      </Box>\n    )\n  } else if (error) {\n    console.warn(error)\n    return <div>error</div>\n  } else if (!data) {\n    return <NewScheme document={document} />\n  }\n  return (\n    <TreeContext.Provider value={{globalVisibility: {treeId: '123', treeVisibility: 'open'}}}>\n      <Box padding={4}>\n        <TreeStructure\n          concepts={data}\n          inputComponent={inputComponent}\n          selectConcept={selectConcept}\n        />\n      </Box>\n    </TreeContext.Provider>\n  )\n}\n","/* eslint-disable react/require-default-props */\nimport {useCallback, useContext, useState, useEffect} from 'react'\nimport {Flex, Spinner, Stack, Box, Text, Inline, Card} from '@sanity/ui'\nimport {AddCircleIcon, EditIcon, CheckmarkCircleIcon} from '@sanity/icons'\nimport {randomKey} from '@sanity/util/content'\nimport {useListeningQuery} from 'sanity-plugin-utils'\nimport {useCreateConcept} from '../hooks'\nimport {trunkBuilder} from '../queries'\nimport {DocumentConcepts} from '../types'\nimport {HierarchyButton} from '../styles'\nimport {SchemeContext, TreeContext} from '../context'\nimport {TreeStructure} from './TreeStructure'\nimport {NewScheme} from './guides'\n\n/**\n * #### Hierarchy Component\n * - Provides a frame for global controls and tree structure\n * - Fetches the complete tree of concepts in a concept scheme.\n * - Displays the tree in a nested list.\n */\nexport const Hierarchy = ({\n  branchId = '',\n  selectConcept,\n  inputComponent = false,\n}: {\n  branchId: string\n  selectConcept?: any\n  inputComponent?: Boolean\n}) => {\n  const document: any = useContext(SchemeContext) || {}\n  const documentId = document.displayed?._id\n\n  const conceptIds = document.displayed?.concepts?.map((concept: any) => concept?._ref) || []\n  const draftConceptIds =\n    document.displayed?.concepts?.map((concept: any) => `drafts.${concept?._ref}`) || []\n  const topConceptIds = document.displayed?.topConcepts?.map((concept: any) => concept?._ref) || []\n  const draftTopConceptIds =\n    document.displayed?.topConcepts?.map((concept: any) => `drafts.${concept?._ref}`) || []\n\n  const createConcept = useCreateConcept(document)\n\n  const createTopConcept = useCallback(() => {\n    createConcept('topConcept')\n  }, [createConcept])\n\n  const createEntryConcept = useCallback(() => {\n    createConcept('concept')\n  }, [createConcept])\n\n  // `randomKey` is used on treeId to initiate a re-rendering of all child\n  // elements on expand/collapse and re-initialize any local toggle state\n  // that had been set.\n  const [globalVisibility, setGlobalVisibility] = useState({\n    treeId: randomKey(3),\n    treeVisibility: 'open',\n  })\n\n  const [editControls, setEditControls] = useState(false)\n\n  useEffect(() => {\n    if (!document.displayed._id.includes('drafts.')) setEditControls(false)\n  }, [document.displayed._id])\n\n  const handleExpand = useCallback(() => {\n    setGlobalVisibility({treeId: randomKey(3), treeVisibility: 'open'})\n  }, [])\n\n  const handleCollapse = useCallback(() => {\n    setGlobalVisibility({treeId: randomKey(3), treeVisibility: 'closed'})\n  }, [])\n\n  const handleShowEdit = useCallback(() => {\n    setEditControls(true)\n  }, [])\n\n  const handleHideEdit = useCallback(() => {\n    setEditControls(false)\n  }, [])\n\n  const {data, loading, error} = useListeningQuery<DocumentConcepts>(\n    {\n      fetch: trunkBuilder(),\n      listen: `*[_type == \"skosConcept\" || _id == $id ]`,\n    },\n    {\n      params: {\n        id: documentId,\n        branchId,\n        conceptIds,\n        draftConceptIds,\n        topConceptIds,\n        draftTopConceptIds,\n      },\n    }\n  ) as {data: DocumentConcepts; loading: boolean; error: Error | null}\n  if (loading) {\n    return (\n      <Box padding={5}>\n        <Flex\n          align=\"center\"\n          direction=\"column\"\n          gap={5}\n          height=\"fill\"\n          justify=\"center\"\n          style={{paddingTop: '1rem'}}\n        >\n          <Spinner muted />\n          <Text muted size={1}>\n            Loading hierarchy…\n          </Text>\n        </Flex>\n      </Box>\n    )\n  } else if (error) {\n    console.error(error)\n    return <div>Error here</div>\n  } else if (!data) {\n    return <NewScheme document={document} />\n  }\n  return (\n    <TreeContext.Provider value={{globalVisibility, editControls, setEditControls}}>\n      <Box padding={4} paddingTop={2}>\n        <>\n          <Stack space={4}>\n            <Card borderBottom paddingBottom={1} display={'flex'} flex={1}>\n              <Flex justify={'space-between'} flex={1}>\n                <Card>\n                  {(data.topConcepts?.filter((concept) => (concept?.childConcepts?.length ?? 0) > 0)\n                    .length > 0 ||\n                    data.orphans?.filter((concept) => (concept?.childConcepts?.length ?? 0) > 0)\n                      .length > 0) && (\n                    <Inline space={1}>\n                      <HierarchyButton type=\"button\" onClick={handleCollapse}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          Collapse\n                        </Text>\n                      </HierarchyButton>\n                      <Text weight=\"semibold\" muted size={1}>\n                        |\n                      </Text>\n                      <HierarchyButton type=\"button\" onClick={handleExpand}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          Expand\n                        </Text>\n                      </HierarchyButton>\n                    </Inline>\n                  )}\n                </Card>\n                <Card>\n                  {editControls ? (\n                    <Inline space={1}>\n                      <HierarchyButton type=\"button\" className=\"add\" onClick={createTopConcept}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          <AddCircleIcon /> Add Top Concept\n                        </Text>\n                      </HierarchyButton>\n                      <HierarchyButton type=\"button\" className=\"add\" onClick={createEntryConcept}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          <AddCircleIcon /> Add Concept\n                        </Text>\n                      </HierarchyButton>\n                      <HierarchyButton type=\"button\" onClick={handleHideEdit}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          <CheckmarkCircleIcon /> Done\n                        </Text>\n                      </HierarchyButton>\n                    </Inline>\n                  ) : (\n                    <Inline space={2}>\n                      <HierarchyButton type=\"button\" onClick={handleShowEdit}>\n                        <Text weight=\"semibold\" muted size={1}>\n                          <EditIcon /> Edit\n                        </Text>\n                      </HierarchyButton>\n                    </Inline>\n                  )}\n                </Card>\n              </Flex>\n            </Card>\n          </Stack>\n          <TreeStructure\n            concepts={data}\n            inputComponent={inputComponent}\n            selectConcept={selectConcept}\n          />\n        </>\n      </Box>\n    </TreeContext.Provider>\n  )\n}\n\nexport default Hierarchy\n","/* eslint-disable react/require-default-props */\nimport {CSSProperties} from 'react'\nimport {Box, Container, Stack, Text} from '@sanity/ui'\nimport Hierarchy from './Hierarchy'\nimport {InputHierarchy} from './inputs'\nimport {SchemeContext} from '../context'\n\n/**\n * #### Tree View Component Wrapper\n * This is the view component for the hierarchy tree. It is the\n * top level of concept scheme views and is passed into Desk\n * structure to render the primary view for taxonomy documents.\n * @param inputComponent - Specifies whether the component is Studio\n *    input component, which will hide tree view controls and chrome.\n */\nexport const TreeView = ({\n  document,\n  branchId,\n  selectConcept,\n  inputComponent = false,\n}: {\n  document: any // contains document.displayed, the applicable skosConceptScheme\n  branchId: string // used to narrow to a branch for the HierarchyInput component\n  selectConcept: any // HierarchyInput component select action\n  inputComponent?: boolean\n}) => {\n  const containerStyle: CSSProperties = {paddingTop: '1.25rem'}\n  const descriptionStyle: CSSProperties = {whiteSpace: 'pre-wrap'}\n\n  return (\n    // provide document as context for downstream components\n    <SchemeContext.Provider value={document}>\n      {inputComponent ? (\n        <InputHierarchy\n          inputComponent={inputComponent}\n          branchId={branchId}\n          selectConcept={selectConcept}\n        />\n      ) : (\n        <Container width={1} style={containerStyle}>\n          {document?.displayed?.description && (\n            <Box padding={4}>\n              <Stack space={4}>\n                <Stack space={2}>\n                  <Text size={1} weight=\"semibold\">\n                    Description\n                  </Text>\n                  <Text size={2} muted style={descriptionStyle}>\n                    {document?.displayed.description}\n                  </Text>\n                </Stack>\n              </Stack>\n            </Box>\n          )}\n          <Hierarchy inputComponent={inputComponent} branchId={branchId} />\n        </Container>\n      )}\n    </SchemeContext.Provider>\n  )\n}\n\nexport default TreeView\n","import {Grid, Stack, Button, Dialog, Box} from '@sanity/ui'\nimport {useState, useEffect, useCallback} from 'react'\nimport {ObjectFieldProps, useClient, useFormValue} from 'sanity'\nimport {TreeView} from '../../components/TreeView'\n\n/**\n * Hierarchy View Input Component for Reference Fields\n */\nexport function HierarchyInput(props: ObjectFieldProps) {\n  const {name, title} = props // name of the field to input a value\n  const documentId = useFormValue(['_id']) as string // the resource document we're in\n\n  const client = useClient({apiVersion: '2021-10-21'})\n  const [open, setOpen] = useState(false)\n  const [scheme, setScheme] = useState({}) // the skosConceptScheme document identified by the field filter options\n\n  // get the filter options from the `reference` field\n  const {filter} = props.schemaType.options\n  const filterValues = filter()\n  const {schemeId, branchId = null} = filterValues.params // only schemes using the branchFilter() will have a branchId\n\n  // get the skosConceptScheme document identified by the field filter options\n  useEffect(() => {\n    client\n      .fetch(`{\"displayed\": *[schemeId == \"${schemeId}\"][0]}`)\n      .then((res) => {\n        setScheme(res)\n      })\n      .catch((err) => console.warn(err))\n  }, [client, schemeId])\n\n  const browseHierarchy = useCallback(() => {\n    setOpen(true)\n  }, [])\n\n  const handleClose = useCallback(() => {\n    setOpen(false)\n  }, [])\n\n  /**\n   * #### Term Select Action\n   * Writes the selected taxonomy term to the document field\n   */\n  const handleAction = useCallback(\n    (conceptRef: any) => {\n      // if there is a draft document, patch the new reference and commit the change\n      if (documentId.includes('drafts.')) {\n        client\n          .patch(documentId)\n          .set({[name]: conceptRef})\n          .commit()\n          .then(() => setOpen(false))\n          .catch((err) => console.error(err))\n        return\n      }\n      // if there is not draft document, fetch the published version and create a new\n      // document with the published document id in the `drafts.` path and the new\n      // reference\n      client\n        .fetch(`*[_id == \"${documentId}\"][0]`)\n        .then((res) => {\n          res._id = `drafts.${res._id}`\n          res[name] = conceptRef\n          client.create(res)\n        })\n        .then(() => setOpen(false))\n        .catch((err) => console.error(err))\n    },\n    [client, documentId, name]\n  )\n\n  return (\n    <Stack space={3}>\n      {props.renderDefault(props)}\n\n      <Grid columns={1} gap={3}>\n        <Button text=\"Browse Taxonomy Tree\" mode=\"ghost\" onClick={browseHierarchy} />\n      </Grid>\n      {open && (\n        <Dialog\n          header={title}\n          id=\"concept-select-dialog\"\n          onClose={handleClose}\n          zOffset={900}\n          width={1}\n        >\n          <Box padding={10}>\n            <TreeView\n              document={scheme} // the document.displayed _id for the relevant skosConceptScheme\n              branchId={branchId} // the branch identified in branchFilter()\n              inputComponent\n              selectConcept={handleAction}\n            />\n          </Box>\n        </Dialog>\n      )}\n    </Stack>\n  )\n}\n","import {Grid, Stack, Button, Dialog, Box, Card, Label, Text, useToast} from '@sanity/ui'\nimport {useState, useEffect, useCallback} from 'react'\nimport {ArrayFieldProps, useClient, useFormValue} from 'sanity'\nimport {TreeView} from '../TreeView'\n\n/**\n * Hierarchy View Input Component for Array Fields\n */\nexport function ArrayHierarchyInput(props: ArrayFieldProps) {\n  const {name, title, value = []} = props // name of the field to input a value\n  const documentId = useFormValue(['_id']) as string // the resource document we're in\n\n  const client = useClient({apiVersion: '2021-10-21'})\n  const [open, setOpen] = useState(false)\n  const [scheme, setScheme] = useState({}) // the skosConceptScheme document identified by the field filter options\n\n  // get the filter options from the `reference` field\n  const {filter} = props.schemaType.of[0].options\n  const filterValues = filter()\n  const {schemeId, branchId = null} = filterValues.params // only schemes using the branchFilter() will have a branchId\n\n  const toast = useToast()\n\n  // get the skosConceptScheme document identified by the field filter options\n  useEffect(() => {\n    client\n      .fetch(`{\"displayed\": *[schemeId == \"${schemeId}\"][0]}`)\n      .then((res) => {\n        setScheme(res)\n      })\n      .catch((err) => console.warn(err))\n  }, [client, schemeId])\n\n  const browseHierarchy = useCallback(() => {\n    setOpen(true)\n  }, [])\n\n  const handleClose = useCallback(() => {\n    setOpen(false)\n  }, [])\n\n  /**\n   * #### Term Select Action\n   * Writes the selected taxonomy term to the array field\n   */\n  const handleAction = useCallback(\n    (conceptRef: any) => {\n      // If the ref of the selected term is already in the field close the dialog\n      // and provide a toast message that tht entry is already in the field.\n      if (value && value.map((item: any) => item._ref).includes(conceptRef._ref)) {\n        setOpen(false)\n        toast.push({\n          status: 'warning',\n          title: 'Taxonomy Term Not Added',\n          description: 'The selected concept is already included in this field.',\n          duration: 5000,\n          closable: true,\n        })\n        return\n      }\n      // if there is a draft document, patch the new reference and commit the change\n      if (documentId.includes('drafts.')) {\n        client\n          .patch(documentId)\n          .setIfMissing({[name]: []})\n          .append(name, [conceptRef])\n          .commit({autoGenerateArrayKeys: true})\n          .then(() => setOpen(false))\n          .catch((err) => console.error(err))\n        return\n      }\n      // if there is not a draft document, fetch the published version and create a new\n      // document with the published document id in the `drafts.` path and the new\n      // reference\n      client\n        .fetch(`*[_id == \"${documentId}\"][0]`)\n        .then((res) => {\n          res._id = `drafts.${res._id}`\n          client.create(res)\n        })\n        .then(() => {\n          client\n            .patch(`drafts.${documentId}`)\n            .setIfMissing({[name]: []})\n            .append(name, [conceptRef])\n            .commit({autoGenerateArrayKeys: true})\n            .then(() => setOpen(false))\n            .catch((err) => console.error(err))\n        })\n        .catch((err) => console.error(err))\n    },\n    [client, documentId, name, value, toast]\n  )\n\n  // Check to see if array uses more than one schema and bail with a notification if more than one is detected.\n  if (props.schemaType.of.length > 1) {\n    return (\n      <Stack space={3}>\n        {props.renderDefault(props)}\n        <Card padding={[3]} radius={2} shadow={1} tone=\"caution\">\n          <Stack space={4}>\n            <Stack space={2}>\n              <Label size={2}>Input Component Not Supported for Multi-Schema Arrays</Label>\n              <Text size={1}>\n                The Sanity Taxonomy Manager Hierarchy Input Component is not designed to support\n                array inputs with more than one schema type. Please see the{' '}\n                <a href=\"https://sanitytaxonomymanager.com\">Taxonomy Manager docs</a> for more\n                information.\n              </Text>\n            </Stack>\n          </Stack>\n        </Card>\n      </Stack>\n    )\n  }\n\n  return (\n    <Stack space={3}>\n      {props.renderDefault(props)}\n\n      <Grid columns={1} gap={3}>\n        <Button text=\"Browse Taxonomy Tree\" mode=\"ghost\" onClick={browseHierarchy} />\n      </Grid>\n      {open && (\n        <Dialog\n          header={title}\n          id=\"concept-select-dialog\"\n          onClose={handleClose}\n          zOffset={900}\n          width={1}\n        >\n          <Box padding={10}>\n            <TreeView\n              document={scheme} // the document.displayed _id for the relevant skosConceptScheme\n              branchId={branchId} // the branch identified in branchFilter()\n              inputComponent\n              selectConcept={handleAction}\n            />\n          </Box>\n        </Dialog>\n      )}\n    </Stack>\n  )\n}\n","import {useCallback} from 'react'\nimport {unset} from 'sanity'\nimport {Button, Inline, Stack, useToast} from '@sanity/ui'\n\n/**\n * #### Input Component for Deprecated Management Controls Field\n * The Management Controls field was used for a previous version\n * of the plugin and was set by default when creating a new scheme.\n * It has been set to \"Deprecated.\" This control will allow users\n * to delete the value from the input to hide the field, without\n * otherwise seeing an error int their schema.\n * - Input is only visible if no identifier has been assigned\n * - Input disappears once an ID is generated\n */\nexport const ManagementControls = (props: any) => {\n  const {onChange} = props\n  const toast = useToast()\n\n  const handleChange = useCallback(() => {\n    onChange(unset())\n    toast.push({\n      status: 'success',\n      title: 'Value removed.',\n      duration: 2500,\n      closable: true,\n    })\n  }, [onChange, toast])\n\n  return (\n    <Stack space={2}>\n      <Inline space={[3, 3, 4]}>\n        {props.renderDefault(props)}\n        <Button tone=\"primary\" fontSize={2} onClick={handleChange} text=\"Remove Value\" />\n      </Inline>\n    </Stack>\n  )\n}\n","import {defineField} from 'sanity'\nimport {StyledDescription} from '../styles'\nimport {RdfUri} from '../components/inputs'\n\n/**\n * #### Base Universal Resource Identifier object for Sanity Taxonomy Manager\n * Used for Concept and Concept Scheme URI fields\n */\nexport default [\n  defineField({\n    name: 'baseIri',\n    title: 'Base URI',\n    type: 'url',\n    validation: (Rule) =>\n      Rule.required().error(`Please supply a base URI in the format 'http://example.com/'`),\n    description: (\n      <StyledDescription>\n        <summary>\n          The root URI (Uniform Resource Identifier) used to create unique concept identifiers.\n        </summary>\n        <div>\n          Unique identifiers allow for the clear an unambiguous identification of concepts across\n          namespaces, for example between <code>https://shipparts.com/vocab#Bow</code> and {}\n          <code>https://wrappingsupplies.com/vocab#Bow</code>.\n        </div>\n        <div>\n          In most cases, it makes sense for your base URI to be the root or a subdirectory of your\n          website. In all cases, the URI you choose should be in a domain that you control.\n        </div>\n        <div>\n          For new Concepts and Concept Schemes, the Base URI field is pre-populated based on the\n          most recently used Base URI value.\n        </div>\n      </StyledDescription>\n    ),\n    components: {\n      input: RdfUri as any,\n    },\n  }),\n]\n","import {useFormValue} from 'sanity'\nimport {Stack, Text} from '@sanity/ui'\nimport {StringInputProps} from 'sanity'\n\n/**\n * #### SKOS Concept Base URI input component\n * Used for Concept and Concept Scheme URI preview\n */\nexport function RdfUri(props: StringInputProps) {\n  const conceptId = useFormValue(['conceptId'])\n  const schemeId = useFormValue(['schemeId'])\n  return (\n    <Stack space={2}>\n      {props.renderDefault(props)}\n      <Text muted size={1} onResize={undefined} onResizeCapture={undefined}>\n        <>\n          <strong>RDF URI: </strong>\n          {props.value ? props.value : '[base URI not defined] '}\n          {conceptId || schemeId || ' [identifier not assigned]'}\n        </>\n      </Text>\n    </Stack>\n  )\n}\n","import {defineType, defineField, FieldDefinition} from 'sanity'\nimport {WarningOutlineIcon} from '@sanity/icons'\nimport {randomKey} from '@sanity/util/content'\nimport {AiOutlineTag, AiOutlineTags} from 'react-icons/ai'\nimport {StyledDescription} from './styles'\nimport baseIriField from './modules/baseIriField'\nimport {Identifier} from './components/inputs'\n\n/**\n * Sanity document scheme for SKOS Taxonomy Concepts\n */\nexport default function skosConcept(baseUri?: string, customConceptFields: FieldDefinition[] = []) {\n  return defineType({\n    name: 'skosConcept',\n    title: 'Concept',\n    type: 'document',\n    icon: AiOutlineTags,\n    initialValue: async (_, context) => {\n      if (baseUri)\n        return {\n          baseIri: baseUri,\n          broader: [], // an empty array is needed here in order to return concepts with no \"broader\" for \"related\"\n          related: [], // an empty array is needed here in order to return concepts with no \"broader\" for \"related\"\n        }\n\n      const {getClient} = context\n      const client = getClient({apiVersion: '2021-03-25'})\n      const baseIri =\n        (await client.fetch(`\n        *[(_type == 'skosConcept' || _type == 'skosConceptScheme') && defined(baseIri)]| order(_createdAt desc)[0].baseIri\n      `)) ?? undefined\n      return {\n        baseIri: baseIri,\n        broader: [], // an empty array is needed here in order to return concepts with no \"broader\" for \"related\"\n        related: [], // an empty array is needed here in order to return concepts with no \"broader\" for \"related\"\n      }\n    },\n    fields: [\n      defineField({\n        name: 'prefLabel',\n        title: 'Preferred Label',\n        type: 'string',\n        description: 'The preferred lexical label for this concept.',\n        validation: (Rule) =>\n          Rule.required().custom((prefLabel, context) => {\n            const {getClient} = context\n            const client = getClient({apiVersion: '2022-12-14'})\n            return client\n              .fetch(\n                `*[_type == \"skosConcept\" && prefLabel == \"${prefLabel}\" && !(_id in path(\"drafts.**\"))][0]._id`\n              )\n              .then((conceptId) => {\n                if (conceptId && conceptId !== context.document?._id.replace('drafts.', '')) {\n                  return 'Preferred Label must be unique.'\n                }\n                return true\n              })\n          }),\n      }),\n      defineField({\n        name: 'definition',\n        title: 'Definition',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>A complete explanation of the intended meaning of the concept.</summary>\n            <div>\n              <kbd>\n                Example: documentation\n                <br />\n                Definition: \"The process of storing and retrieving information in all fields of\n                knowledge.\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n      defineField({\n        name: 'example',\n        title: 'Examples',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>An example of the use of the concept.</summary>\n            <div>\n              <kbd>\n                Example: organizations of science and culture\n                <br />\n                Example: \"academies of science, general museums, world fairs\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n      defineField({\n        name: 'scopeNote',\n        title: 'Scope Note',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>\n              A brief statement on the intended meaning of this concept, especially as an indication\n              of how the use of the concept is limited in indexing practice.\n            </summary>\n            <div>\n              <kbd>\n                Example: microwave frequencies\n                <br />\n                Scope Note: \"Used for frequencies between 1Ghz and 300Ghz\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n      defineField({\n        name: 'altLabel',\n        title: 'Alternate Label(s)',\n        type: 'array',\n        description: (\n          <StyledDescription>\n            <summary>Synonyms, near-synonyms, abbreviations, and acronyms to a concept.</summary>\n            <div>\n              <p>\n                <WarningOutlineIcon /> Preferred, alternative, and hidden label sets must not\n                overlap.\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        of: [{type: 'string'}],\n        validation: (Rule) => Rule.unique(),\n      }),\n      defineField({\n        name: 'hiddenLabel',\n        title: 'Hidden Label(s)',\n        type: 'array',\n        description: (\n          <StyledDescription>\n            <summary>\n              Character strings that need to be accessible to applications performing text-based\n              indexing and search operations, but which should not be displayed to end users.\n            </summary>\n            <div>\n              <p>\n                Hidden labels may for instance be used to include misspelled variants of other\n                lexical labels.\n              </p>\n              <p>\n                <WarningOutlineIcon /> Preferred, alternative, and hidden label sets must not\n                overlap.\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        of: [{type: 'string'}],\n        validation: (Rule) => Rule.unique(),\n      }),\n      ...baseIriField,\n      defineField({\n        name: 'conceptId',\n        title: 'Identifier',\n        description: 'This concept does not yet have a unique identifier.',\n        type: 'string',\n        initialValue: () => `${randomKey(6)}`,\n        hidden: ({document}) => !!document?.conceptId,\n        readOnly: ({document}) => !!document?.conceptId,\n        components: {\n          input: Identifier,\n        },\n      }),\n      defineField({\n        name: 'broader',\n        title: 'Broader Concept(s)',\n        description: (\n          <StyledDescription>\n            <summary>\n              Create hierarchy between concepts, for example to create category/subcategory,\n              part/whole, or class/instance relationships.\n            </summary>\n            <div>\n              <p>Broader and Associated relationships are mutually exclusive.</p>\n            </div>\n          </StyledDescription>\n        ),\n        type: 'array',\n        of: [\n          {\n            type: 'reference',\n            to: {type: 'skosConcept'},\n            options: {\n              filter: ({document}: {document: any}) => {\n                return {\n                  // Broader filter only performs document-level validation for broader-transitive/related disjunction.\n                  filter:\n                    '!(_id in $broader || _id in $related || _id in path(\"drafts.**\") || _id == $self)',\n                  params: {\n                    self: document._id.replace('drafts.', ''),\n                    broader: document.broader.map(({_ref}: {_ref: any}) => _ref),\n                    related: document.related.map(({_ref}: {_ref: any}) => _ref),\n                  },\n                }\n              },\n            },\n          },\n        ],\n      }),\n      defineField({\n        name: 'related',\n        title: 'Related Concept(s)',\n        description: (\n          <StyledDescription>\n            <summary>\n              Indicate that two concepts are inherently \"related\", but that one is not in any way\n              more general than the other.\n            </summary>\n            <div>\n              <p>Broader and Associated relationships are mutually exclusive.</p>\n            </div>\n          </StyledDescription>\n        ),\n        type: 'array',\n        of: [\n          {\n            type: 'reference',\n            to: [{type: 'skosConcept'}],\n          },\n        ],\n      }),\n      ...customConceptFields,\n      defineField({\n        name: 'historyNote',\n        title: 'History Notes',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>Significant changes to the meaning or the form of this concept.</summary>\n            <div>\n              <kbd>\n                Example: person with disabilities\n                <br />\n                History Note: \"Estab. 1992; heading was: handicapped [1884 - 1992].\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n      defineField({\n        name: 'editorialNote',\n        title: 'Editorial Notes',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>\n              Information to aid in administrative housekeeping, such as reminders of editorial work\n              still to be done, or warnings in the event that future editorial changes might be\n              made.\n            </summary>\n            <div>\n              <kbd>\n                Example: doubleclick\n                <br />\n                Editorial Note: \"Review this term after the company merger is complete.\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n      defineField({\n        name: 'changeNote',\n        title: 'Change Notes',\n        type: 'text',\n        description: (\n          <StyledDescription>\n            <summary>\n              Fine-grained changes to a concept, for the purposes of administration and maintenance.\n            </summary>\n            <div>\n              <kbd>\n                Example: tomato\n                <br />\n                Change Note: \"Moved from under 'fruits' to under 'vegetables' by Horace Gray\"\n              </kbd>\n              <p>\n                For more information on the recommended usage of the SKOS documentation properties,\n                see\n                <a\n                  href=\"https://www.w3.org/TR/2009/NOTE-skos-primer-20090818/#secdocumentation\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                >\n                  {' '}\n                  W3C SKOS Primer: 2.4 Documentary Notes\n                </a>\n              </p>\n            </div>\n          </StyledDescription>\n        ),\n        rows: 3,\n      }),\n    ],\n    orderings: [\n      {\n        title: 'Top Concepts',\n        name: 'topConcept',\n        by: [\n          {field: 'topConcept', direction: 'desc'},\n          {field: 'prefLabel', direction: 'asc'},\n        ],\n      },\n      {\n        title: 'Preferred Label',\n        name: 'prefLabel',\n        by: [{field: 'prefLabel', direction: 'asc'}],\n      },\n    ],\n    preview: {\n      select: {\n        title: 'prefLabel',\n      },\n      prepare({title}) {\n        return {\n          title: title,\n          media: AiOutlineTag,\n        }\n      },\n    },\n  })\n}\n","export default function NodeTree() {\n  return (\n    <svg\n      data-sanity-icon\n      width=\"25\"\n      height=\"25\"\n      viewBox=\"0 0 25 25\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n    >\n      <path\n        d=\"M5.5 6.5V5.9H4.9V6.5H5.5ZM11.5 6.5H12.1V5.9H11.5V6.5ZM5.5 9H4.9V9.6H5.5V9ZM11.5 9V9.6H12.1V9H11.5ZM13.5 11V10.4H12.9V11H13.5ZM19.5 11H20.1V10.4H19.5V11ZM13.5 13.5H12.9V14.1H13.5V13.5ZM19.5 13.5V14.1H20.1V13.5H19.5ZM13.5 16V15.4H12.9V16H13.5ZM19.5 16H20.1V15.4H19.5V16ZM13.5 18.5H12.9V19.1H13.5V18.5ZM19.5 18.5V19.1H20.1V18.5H19.5ZM5.5 7.1H11.5V5.9H5.5V7.1ZM6.1 9V6.5H4.9V9H6.1ZM11.5 8.4H5.5V9.6H11.5V8.4ZM10.9 6.5V9H12.1V6.5H10.9ZM13.5 11.6H19.5V10.4H13.5V11.6ZM14.1 13.5V11H12.9V13.5H14.1ZM19.5 12.9H13.5V14.1H19.5V12.9ZM18.9 11V13.5H20.1V11H18.9ZM13.5 16.6H19.5V15.4H13.5V16.6ZM14.1 18.5V16H12.9V18.5H14.1ZM19.5 17.9H13.5V19.1H19.5V17.9ZM18.9 16V18.5H20.1V16H18.9ZM8 17.85H13.5V16.65H8V17.85ZM8 12.85H13.5V11.65H8V12.85ZM7.9 9.5V17.85H9.1V9.5H7.9Z\"\n        fill=\"currentColor\"\n      />\n    </svg>\n  )\n}\n","import {defineArrayMember, defineField, defineType, FieldDefinition} from 'sanity'\nimport {randomKey} from '@sanity/util/content'\nimport baseIriField from './modules/baseIriField'\nimport {Identifier} from './components/inputs'\nimport NodeTree from './components/NodeTree'\nimport {ManagementControls} from './components/inputs'\n\n/**\n * Sanity document scheme for SKOS Concept Schemes\n */\nexport default function skosConceptScheme(\n  baseUri?: string,\n  customSchemeFields: FieldDefinition[] = []\n) {\n  return defineType({\n    name: 'skosConceptScheme',\n    title: 'Concept Scheme',\n    type: 'document',\n    icon: NodeTree,\n    initialValue: async (_, context) => {\n      if (baseUri) return {baseIri: baseUri}\n      const {getClient} = context\n      const client = getClient({apiVersion: '2021-03-25'})\n      const baseIri =\n        (await client.fetch(`\n        *[(_type == 'skosConcept' || _type == 'skosConceptScheme') && defined(baseIri)]| order(_createdAt desc)[0].baseIri\n      `)) ?? undefined\n      return {\n        baseIri: baseIri,\n      }\n    },\n    fields: [\n      defineField({\n        name: 'title',\n        title: 'Title',\n        type: 'string',\n        description:\n          'Taxonomy schemes group concepts into defined sets, such as thesauri, classification schemes, or facets. Concepts may belong to many (or no) concept schemes, and you may create as many (or few) concept schemes as you like',\n      }),\n      defineField({\n        name: 'description',\n        title: 'Description',\n        type: 'text',\n        rows: 5,\n        description: 'Describe the intended use of this scheme.',\n      }),\n      defineField({\n        name: 'controls',\n        title: 'Concept Management Controls',\n        deprecated: {\n          reason:\n            'This field was used for a previous version of the plugin and is no longer needed. Remove the value to hide this field.',\n        },\n        type: 'boolean',\n        readOnly: true,\n        hidden: ({document}) => document?.controls === undefined,\n        components: {\n          input: ManagementControls,\n        },\n      }),\n      ...baseIriField,\n      defineField({\n        name: 'schemeId',\n        title: 'Identifier',\n        description: 'This scheme does not yet have a unique identifier.',\n        type: 'string',\n        initialValue: () => `${randomKey(6)}`,\n        hidden: ({document}) => !!document?.schemeId,\n        readOnly: ({document}) => !!document?.schemeId,\n        components: {\n          input: Identifier,\n        },\n      }),\n      defineField({\n        name: 'topConcepts',\n        title: 'Top Concepts',\n        type: 'array',\n        validation: (Rule) => Rule.unique(),\n        of: [\n          defineArrayMember({\n            type: 'reference',\n            to: [{type: 'skosConcept'}],\n          }),\n        ],\n        options: {\n          sortable: false,\n        },\n      }),\n      defineField({\n        name: 'concepts',\n        title: 'Concepts',\n        type: 'array',\n        validation: (Rule) => Rule.unique(),\n        of: [\n          defineArrayMember({\n            type: 'reference',\n            to: [{type: 'skosConcept'}],\n          }),\n        ],\n        options: {\n          sortable: false,\n        },\n      }),\n      ...customSchemeFields,\n    ],\n    preview: {\n      select: {\n        title: 'title',\n      },\n      prepare({title}) {\n        return {\n          title: title,\n          media: NodeTree,\n        }\n      },\n    },\n  })\n}\n","type SchemeOptions = {\n  schemeId: string\n}\n\ntype SchemeFilterResult = {\n  filter: string\n  params: SchemeOptions\n}\n\n/**\n * #### Document Scheme Filter\n * Pluggable Function for Filtering to a Single SKOS Concept Scheme\n * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.\n * @returns A reference type filter for Concepts and Top Concepts in the selected Concept Scheme\n */\nexport function schemeFilter(options: SchemeOptions): SchemeFilterResult {\n  const {schemeId} = options || {}\n  return {\n    filter: `!(_id in path(\"drafts.**\"))\n    && _id in *[_type==\"skosConceptScheme\" && schemeId == $schemeId].concepts[]._ref\n    || _id in *[_type==\"skosConceptScheme\" && schemeId == $schemeId].topConcepts[]._ref`,\n    params: {\n      schemeId: schemeId,\n    },\n  }\n}\n","type BranchOptions = {\n  schemeId: string\n  branchId: string\n}\n\ntype BranchFilterResult = {\n  filter: string\n  params: BranchOptions\n}\n\n/**\n * #### Document Branch Filter\n * A pluggable Function for Filtering to a Top Concept Branch within a SKOS Concept Scheme\n * @param schemeId - The unique six character concept identifier for the Concept Scheme to which you wish to filter.\n * @param branchId - The unique six character concept identifier of a branch. Child concepts will be returned.\n * @returns A reference type filter for the child concepts of the designated branch in the selected Concept Scheme\n */\nexport function branchFilter(options: BranchOptions): BranchFilterResult {\n  const {schemeId, branchId} = options || {}\n  return {\n    filter: `!(_id in path(\"drafts.**\")) && _id in *[_type==\"skosConceptScheme\" && schemeId == $schemeId].concepts[]._ref \n               && $branchId in broader[]->conceptId\n               || $branchId in broader[]->broader[]->conceptId\n               || $branchId in broader[]->broader[]->broader[]->conceptId\n               || $branchId in broader[]->broader[]->broader[]->broader[]->conceptId\n               || $branchId in broader[]->broader[]->broader[]->broader[]->broader[]->conceptId`,\n    params: {\n      schemeId,\n      branchId,\n    },\n  }\n}\n","import {TreeView} from './components/TreeView'\nimport {EditIcon} from '@sanity/icons'\nimport NodeTree from './components/NodeTree'\n\n/**\n * #### Default Desk Structure for Concept and Concept Scheme\n * Sets defaultDocumentNode. Consider exporting in the future,\n * if there is a use case for mixing taxonomy views in the main\n * desk structure.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const structure = (S: any) =>\n  S.list()\n    .title('Taxonomy Manager')\n    .items([\n      S.documentTypeListItem('skosConceptScheme').title('Concept Schemes'),\n      S.documentTypeListItem('skosConcept').title('Concepts'),\n    ])\n\n// set default document node here — so that if users want concepts\n// and schemes elsewhere in desk, they'll get the right views.\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, consistent-return\nexport const defaultDocumentNode = (S: any, {schemaType}: {schemaType: any}) => {\n  // Conditionally return a different configuration based on the schema type\n  switch (schemaType) {\n    case 'skosConceptScheme':\n      return S.document().views([\n        S.view.component(TreeView).title('Tree View').icon(NodeTree),\n        S.view.form().icon(EditIcon),\n      ])\n    case 'skosConcept':\n      return S.document().views([S.view.form().icon(EditIcon)])\n    default:\n      S.view.form()\n  }\n}\n","import {definePlugin, FieldDefinition} from 'sanity'\nimport {structureTool} from 'sanity/structure'\nimport skosConcept from './skosConcept'\nimport skosConceptScheme from './skosConceptScheme'\nimport TreeView from './components/TreeView'\nimport {schemeFilter, branchFilter} from './helpers'\nimport {HierarchyInput, ArrayHierarchyInput} from './components/inputs'\n\nimport {defaultDocumentNode, structure} from './structure'\nimport NodeTree from './components/NodeTree'\n\ninterface Options {\n  baseUri?: string\n  customConceptFields?: FieldDefinition[]\n  customSchemeFields?: FieldDefinition[]\n}\n\n/**\n * #### Defines a Sanity plugin for managing taxonomies\n * BaseURI should follow an IANA http/s scheme and should terminate with either a / or #.\n * @param options - Optional configuration options for the plugin.\n * @param options.baseUri - The base URI to use for SKOS concepts and concept schemes.\n * @param options.customConceptFields - An array of additional fields to add to the skosConcept type.\n * @param options.customSchemeFields - An array of additional fields to add to the skosConceptScheme type.\n * @returns A Sanity plugin object.\n */\nconst taxonomyManager = definePlugin((options?: Options) => {\n  const {baseUri, customConceptFields, customSchemeFields} = options || {}\n\n  return {\n    name: 'taxonomyManager',\n    options,\n    schema: {\n      types: [\n        skosConcept(baseUri, customConceptFields),\n        skosConceptScheme(baseUri, customSchemeFields),\n      ],\n    },\n    plugins: [\n      structureTool({\n        name: 'taxonomy',\n        title: 'Taxonomy',\n        structure,\n        defaultDocumentNode,\n        icon: NodeTree,\n      }),\n    ],\n  }\n})\n\nexport {taxonomyManager, TreeView, schemeFilter, branchFilter, HierarchyInput, ArrayHierarchyInput}\n"],"names":["useFormValue","set","useDocumentStore","useClient","useColorSchemeValue","unset","defineField","defineType","defineArrayMember","definePlugin","usePaneRouter","structureTool","jsxs","jsx","Fragment","InfoOutlineIcon","ToggleArrowRightIcon","SquareIcon","AddCircleIcon","TrashIcon","ErrorOutlineIcon","AddIcon","CheckmarkCircleIcon","EditIcon","WarningOutlineIcon","randomKey","AiOutlineTags","AiOutlineTag","r","useRef","useDebugValue","createElement","useContext","useCallback","useState","useEffect","useMemo","createContext","hues","Stack","Text","useToast","Inline","Button","Card","Dialog","Box","Label","Tooltip","TextInput","TextArea","Flex","Spinner","Container","Grid","isEqual","distinctUntilChanged","catchError","RouterContext","__assign","__assign$2","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__spreadArray","to","from","pack","ar","l","Array","slice","concat","memoize","fn","cache","create","arg","reactPropsRegex","isPropValid","prop","test","charCodeAt","MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","IMPORT","KEYFRAMES","LAYER","abs","Math","String","fromCharCode","trim","value","match","pattern","exec","replace","replacement","indexof","search","position","indexOf","charat","index","substr","begin","end","strlen","sizeof","append","array","push","filter","line","column","character","characters","node","root","parent","type","props","children","siblings","return","copy","lift","next","peek","caret","token","delimit","delimiter","whitespace","escaping","count","commenter","identifier","compile","dealloc","parse","alloc","rule","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","size","j","k","x","y","z","prefix","hash","some","element","_","a","b","c","d","e","f","serialize","callback","output","stringify","join","prefixer","map","combine","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","process","env","REACT_APP_SC_ATTR","SC_ATTR","m","v","g","S","window","w","SC_DISABLE_SPEEDY","REACT_APP_SC_DISABLE_SPEEDY","NODE_ENV","E","N","Set","freeze","C","A","O","D","R","T","V","M","B","displayName","name","L","charAt","toLowerCase","G","Symbol","for","Y","q","W","childContextTypes","contextType","contextTypes","defaultProps","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","H","caller","callee","arity","U","$$typeof","compare","J","render","X","Z","defineProperty","K","getOwnPropertyNames","Q","getOwnPropertySymbols","ee","getOwnPropertyDescriptor","te","getPrototypeOf","ne","re","o","oe","se","ie","ae","ce","constructor","le","isArray","ue","pe","de","forEach","he","Error","fe","groupSizes","Uint32Array","tag","indexOfGroup","insertRules","insertRule","clearGroup","deleteRule","getGroup","getRule","me","ye","Map","ve","ge","Se","has","get","we","be","Ee","RegExp","Ne","split","registerName","Pe","textContent","parseInt","u","getTag","_e","document","querySelectorAll","getAttribute","parentNode","removeChild","Ie","head","nextSibling","setAttribute","__webpack_nonce__","insertBefore","Ae","appendChild","createTextNode","sheet","styleSheets","ownerNode","cssRules","cssText","Oe","nodes","childNodes","De","splice","Re","Te","isServer","useCSSOMInjection","ke","options","gs","names","server","registerId","rehydrate","reconstructWithOptions","allocateGSInstance","target","hasNameForId","add","clearNames","clear","clearRules","clearTag","je","xe","Ve","replaceAll","Me","ze","plugins","startsWith","endsWith","d.RULESET","includes","d.prefixer","d.stringify","d.compile","namespace","collection","d.serialize","reduce","toString","Fe","$e","shouldForwardProp","styleSheet","stylis","Ge","qe","inject","id","getName","We","He","Ue","Je","isCss","h","Xe","styledComponentId","isReactComponent","console","error","Ke","Qe","staticRulesId","isStatic","Ze","componentId","baseHash","baseStyle","generateAndInjectStyles","et","ot","st","it","attrs","$","parentComponentId","Boolean","componentStyle","foldedComponentIds","theme","I","className","as","forwardedAs","warn","warnTooManyClasses","ref","forwardRef","_foldedDefaultProps","delete","message","P","keys","at","ct","lt","ut","withConfig","pt","dt","navigator","product","wt","StyledDescription","styled","details","InlineHelp","div","StyledTree","ul","gray","hex","yellow","red","HierarchyButton","button","green","StyledTreeButton","blue","StyledTreeToggle","StyledTopConcept","li","StyledOrphan","StyledChildConcepts","StyledChildConcept","StyledConceptLink","StyledConceptTitle","Identifier","onChange","toast","handleChange","status","title","closable","space","tone","fontSize","onClick","text","commonjsGlobal","globalThis","global","self","builder","urlForImage","parseAssetId$1","example","default","_a","dimensionString","format","_b","width","height","isFinite","parseSource$1","__assign$1","urlToId","url","parts","source","image","src","asset","_ref","_id","isAsset","isAssetStub","img","crop","hotspot","result","left","top","bottom","right","applyDefaults","exports","__importDefault","mod","__esModule","parseSource","SPEC_NAME_TO_URL_NAME_MAPPINGS","parseAssetId_1","parseSource_1","spec","JSON","cropLeft","round","cropTop","hotSpotVerticalRadius","hotSpotHorizontalRadius","hotSpotCenterX","hotSpotCenterY","rect","focalPoint","ignoreImageParams","cropRect","imgWidth","imgHeight","desiredAspectRatio","cropAspectRatio","top_2","max","hotspotXCenter","hotspotYCenter","top_3","fit","cdnUrl","baseUrl","filename","projectId","dataset","params","top_1","bg","flip","flipHorizontal","flipVertical","mapping","specName","param","encodeURIComponent","specToImageUrl","__createBinding","k2","enumerable","__setModuleDefault","__importStar","ImageUrlBuilder","urlForImage_1","validFits","validCrops","validAutoModes","rewriteSpecName","key","_i","specs_1","entry","client","config","isSanityModernClientLike","apiUrl","apiHost","clientConfig","isSanityClientLike","withOptions","newOptions","dpr","maxWidth","minWidth","maxHeight","minHeight","blur","sharpen","invert","orientation","quality","forceDownload","download","saturation","auto","pad","DEFAULT_PARAMS","DEFAULT_OPTIONS","apiVersion","DEFAULT_INITIAL_VALUE","useParams","stringifiedParams","useListeningQuery","query","initialValue","loading","setLoading","setError","data","setData","memoParams","memoOptions","subscription","documentStore","current","listenQuery","pipe","err","subscribe","documents","unsubscribe","_c","__freeze","__defProp","__template","cooked","raw","css","branchBuilder","level","inputBranchBuilder","SchemeContext","TreeContext","editControls","useCreateConcept","openInNewPane","routerContext","routerPanesState","groupIndex","conceptId","panes","href","resolvePathFromState","navigateUrl","path","useOpenNewConceptPane","schemaBaseIri","displayed","baseIri","conceptType","prefLabel","skosConcept","_type","broader","_key","related","draftConceptScheme","transaction","createIfNotExists","patch","setIfMissing","topConcepts","_weak","_strengthenOnPublish","weak","template","concepts","insert","commit","autoGenerateArrayKeys","then","res","catch","description","useRemoveConcept","useLinkColorScheme","ConceptDetailLink","concept","linkColor","style","color","ConceptDetailDialogue","open","setOpen","onClose","onOpen","definition","scopeNote","header","zOffset","padding","paddingBottom","muted","whiteSpace","ConceptSelectLink","selectConcept","handleClick","Children","inputComponent","globalVisibility","treeVisibility","createConcept","removeConcept","handleAddChild","handleRemoveConcept","levelVisibility","setLevelVisibility","handleToggle","childConcepts","content","sizing","fallbackPlacements","placement","controls","ChildConcepts","TopConcepts","Orphans","NewScheme","titleValue","setTitleValue","descriptionValue","setDescriptionValue","handleTitleChange","event","currentTarget","handleDescriptionChange","addTitle","documentId","schemeId","doc","useAddTitle","handleAddTitle","radius","shadow","icon","placeholder","rows","NoConcepts","TreeStructure","treeId","setEditControls","InputHierarchy","branchId","fetch","listen","align","direction","gap","justify","paddingTop","Provider","Hierarchy","conceptIds","draftConceptIds","topConceptIds","draftTopConceptIds","createTopConcept","createEntryConcept","setGlobalVisibility","handleExpand","handleCollapse","handleShowEdit","handleHideEdit","borderBottom","display","weight","TreeView","HierarchyInput","scheme","setScheme","schemaType","filterValues","browseHierarchy","handleClose","handleAction","conceptRef","renderDefault","mode","ArrayHierarchyInput","of","item","duration","ManagementControls","baseIriField","validation","Rule","required","components","input","onResize","onResizeCapture","baseUri","customConceptFields","async","context","getClient","fields","custom","rel","unique","hidden","readOnly","orderings","by","field","preview","select","prepare","media","NodeTree","viewBox","fill","xmlns","skosConceptScheme","customSchemeFields","deprecated","reason","sortable","schemeFilter","branchFilter","structure","list","items","documentTypeListItem","defaultDocumentNode","views","view","component","form","taxonomyManager","schema","types"],"mappings":"uBAAAA,SAAAC,sBAAAC,eAAAC,yBAAAC,WAAAC,iBAAAC,gBAAAC,uBAAAC,kBAAAC,MAAA,iCAAAC,mBAAAC,MAAA,kCAAAC,SAAAC,cAAAC,MAAA,8CAAAC,0BAAAC,gBAAAC,mBAAAC,eAAAC,sBAAAC,aAAAC,yBAAAC,cAAAC,wBAAAC,MAAA,oCAAAC,MAAA,+CAAAC,kBAAAC,MAAA,wBAAAC,aAAAC,mBAAAC,mBAAAC,gBAAAC,iBAAAC,cAAAC,eAAAC,aAAAC,mBAAAC,MAAA,uBAAAC,MAAA,gCAAAC,UAAAC,cAAAC,YAAAC,YAAAC,UAAAC,YAAAC,SAAAC,WAAAC,aAAAC,eAAAC,cAAAC,UAAAC,aAAAC,eAAAC,UAAAC,OAAA,oBAAAC,OAAA,oDAAAC,iBAAAC,OAAA,yCAAAC,OAAA,gBA+BO,IAAIC,GAAW,WACT,OAAAC,GAAAC,OAAOC,QAAU,SAAkBC,GACjC,IAAA,IAAAC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAA,IAASI,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAEvE,OAAAN,CACV,EACMJ,GAASc,MAAMC,KAAMP,UAC9B,EA6KO,SAASQ,GAAcC,EAAIC,EAAMC,GACtC,GAAIA,GAA6B,IAArBX,UAAUC,OAAuB,IAAA,IAAwBW,EAAxBd,EAAI,EA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