@jsenv/core 40.9.1 → 40.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4002,7 +4002,7 @@ const jsenvPluginInliningIntoHtml = () => {
4002
4002
  });
4003
4003
  });
4004
4004
  };
4005
- const onScriptWithSrc = (scriptNode, { src }) => {
4005
+ const onScriptWithSrc = (scriptNode, { type, src }) => {
4006
4006
  let scriptReference;
4007
4007
  for (const dependencyReference of urlInfo.referenceToOthersSet) {
4008
4008
  if (
@@ -4029,7 +4029,7 @@ const jsenvPluginInliningIntoHtml = () => {
4029
4029
  column,
4030
4030
  isOriginal,
4031
4031
  specifier: scriptInlineUrl,
4032
- type: scriptReference.type,
4032
+ type,
4033
4033
  subtype: scriptReference.subtype,
4034
4034
  expectedType: scriptReference.expectedType,
4035
4035
  });
@@ -4073,7 +4073,7 @@ const jsenvPluginInliningIntoHtml = () => {
4073
4073
  if (!src) {
4074
4074
  return;
4075
4075
  }
4076
- onScriptWithSrc(scriptNode, { src });
4076
+ onScriptWithSrc(scriptNode, { type, src });
4077
4077
  },
4078
4078
  });
4079
4079
  if (actions.length > 0) {
@@ -5037,7 +5037,7 @@ const jsenvPluginHtmlReferenceAnalysis = ({
5037
5037
  const createInlineReference = (
5038
5038
  node,
5039
5039
  inlineContent,
5040
- { type, expectedType, contentType },
5040
+ { type, subtype, expectedType, contentType },
5041
5041
  ) => {
5042
5042
  const hotAccept =
5043
5043
  getHtmlNodeAttribute(node, "hot-accept") !== undefined;
@@ -5053,6 +5053,7 @@ const jsenvPluginHtmlReferenceAnalysis = ({
5053
5053
  getHtmlNodeAttribute(node, "jsenv-debug") !== undefined;
5054
5054
  const inlineReference = urlInfo.dependencies.foundInline({
5055
5055
  type,
5056
+ subtype,
5056
5057
  expectedType,
5057
5058
  isOriginalPosition: isOriginal,
5058
5059
  specifierLine: line,
@@ -5929,7 +5930,6 @@ const createNodeEsmResolver = ({
5929
5930
  const resolveNodeEsmFallbackNullToDelegateToWebPlugin =
5930
5931
  createResolverWithFallbackOnError(
5931
5932
  applyNodeEsmResolution,
5932
-
5933
5933
  () => DELEGATE_TO_WEB_RESOLUTION_PLUGIN,
5934
5934
  );
5935
5935
 
@@ -6345,7 +6345,6 @@ const jsenvPluginNodeEsmResolution = (
6345
6345
  );
6346
6346
  }
6347
6347
  return createNodeEsmResolver({
6348
- build: kitchenContext.build,
6349
6348
  runtimeCompat: kitchenContext.runtimeCompat,
6350
6349
  rootDirectoryUrl: kitchenContext.rootDirectoryUrl,
6351
6350
  packageConditions,
@@ -6362,7 +6361,6 @@ const jsenvPluginNodeEsmResolution = (
6362
6361
  appliesDuring: "*",
6363
6362
  init: (kitchenContext) => {
6364
6363
  nodeEsmResolverDefault = createNodeEsmResolver({
6365
- build: kitchenContext.build,
6366
6364
  runtimeCompat: kitchenContext.runtimeCompat,
6367
6365
  rootDirectoryUrl: kitchenContext.rootDirectoryUrl,
6368
6366
  preservesSymlink: true,
@@ -7806,6 +7804,9 @@ const jsenvPluginImportMetaCss = () => {
7806
7804
  const importMetaCssClientFileUrl = import.meta.resolve(
7807
7805
  "../js/import_meta_css.js",
7808
7806
  );
7807
+ const importMetaCssBuildFileUrl = import.meta.resolve(
7808
+ "../js/import_meta_css_build.js",
7809
+ );
7809
7810
 
7810
7811
  return {
7811
7812
  name: "jsenv:import_meta_css",
@@ -7826,35 +7827,17 @@ const jsenvPluginImportMetaCss = () => {
7826
7827
  if (!usesImportMetaCss) {
7827
7828
  return null;
7828
7829
  }
7829
- return injectImportMetaCss(urlInfo, importMetaCssClientFileUrl);
7830
+ return injectImportMetaCss(
7831
+ urlInfo,
7832
+ urlInfo.context.build
7833
+ ? importMetaCssBuildFileUrl
7834
+ : importMetaCssClientFileUrl,
7835
+ );
7830
7836
  },
7831
7837
  },
7832
7838
  };
7833
7839
  };
7834
7840
 
7835
- const injectImportMetaCss = (urlInfo, importMetaCssClientFileUrl) => {
7836
- const importMetaCssClientFileReference = urlInfo.dependencies.inject({
7837
- parentUrl: urlInfo.url,
7838
- type: "js_import",
7839
- expectedType: "js_module",
7840
- specifier: importMetaCssClientFileUrl,
7841
- });
7842
- let content = urlInfo.content;
7843
- let prelude = `import { installImportMetaCss } from ${importMetaCssClientFileReference.generatedSpecifier};
7844
-
7845
- const remove = installImportMetaCss(import.meta);
7846
- if (import.meta.hot) {
7847
- import.meta.hot.dispose(() => {
7848
- remove();
7849
- });
7850
- }
7851
-
7852
- `;
7853
- return {
7854
- content: `${prelude.replace(/\n/g, "")}${content}`,
7855
- };
7856
- };
7857
-
7858
7841
  const babelPluginMetadataUsesImportMetaCss = () => {
7859
7842
  return {
7860
7843
  name: "metadata-uses-import-meta-css",
@@ -7886,6 +7869,29 @@ const babelPluginMetadataUsesImportMetaCss = () => {
7886
7869
  };
7887
7870
  };
7888
7871
 
7872
+ const injectImportMetaCss = (urlInfo, importMetaCssClientFileUrl) => {
7873
+ const importMetaCssClientFileReference = urlInfo.dependencies.inject({
7874
+ parentUrl: urlInfo.url,
7875
+ type: "js_import",
7876
+ expectedType: "js_module",
7877
+ specifier: importMetaCssClientFileUrl,
7878
+ });
7879
+ let content = urlInfo.content;
7880
+ let prelude = `import { installImportMetaCss } from ${importMetaCssClientFileReference.generatedSpecifier};
7881
+
7882
+ const remove = installImportMetaCss(import.meta);
7883
+ if (import.meta.hot) {
7884
+ import.meta.hot.dispose(() => {
7885
+ remove();
7886
+ });
7887
+ }
7888
+
7889
+ `;
7890
+ return {
7891
+ content: `${prelude.replace(/\n/g, "")}${content}`,
7892
+ };
7893
+ };
7894
+
7889
7895
  // https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-stages-of-babel
7890
7896
  // https://github.com/cfware/babel-plugin-bundled-import-meta/blob/master/index.js
7891
7897
  // https://github.com/babel/babel/blob/f4edf62f6beeab8ae9f2b7f0b82f1b3b12a581af/packages/babel-helper-module-imports/src/index.js#L7
@@ -11565,7 +11571,7 @@ const build = async ({
11565
11571
  });
11566
11572
 
11567
11573
  const logLevel = logs.level;
11568
- const logger = createLogger({ logLevel });
11574
+ let logger = createLogger({ logLevel });
11569
11575
  const animatedLogEnabled =
11570
11576
  logs.animated &&
11571
11577
  // canEraseProcessStdout
@@ -12046,9 +12052,9 @@ const build = async ({
12046
12052
  const buildTask = createTaskLog("build");
12047
12053
  buildAbortController = new AbortController();
12048
12054
  try {
12055
+ logger = createLogger({ logLevel: "warn" });
12049
12056
  const result = await runBuild({
12050
12057
  signal: buildAbortController.signal,
12051
- logLevel: "warn",
12052
12058
  });
12053
12059
  buildTask.done();
12054
12060
  resolveFirstBuild(result);
@@ -147,6 +147,14 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
147
147
  return 3;
148
148
  }
149
149
 
150
+ if (env.TERM === 'xterm-ghostty') {
151
+ return 3;
152
+ }
153
+
154
+ if (env.TERM === 'wezterm') {
155
+ return 3;
156
+ }
157
+
150
158
  if ('TERM_PROGRAM' in env) {
151
159
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
152
160
 
@@ -214,10 +222,14 @@ function isUnicodeSupported() {
214
222
  function ansiRegex({onlyFirst = false} = {}) {
215
223
  // Valid string terminator sequences are BEL, ESC\, and 0x9c
216
224
  const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
217
- const pattern = [
218
- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
219
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
220
- ].join('|');
225
+
226
+ // OSC sequences only: ESC ] ... ST (non-greedy until the first ST)
227
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
228
+
229
+ // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
230
+ const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]';
231
+
232
+ const pattern = `${osc}|${csi}`;
221
233
 
222
234
  return new RegExp(pattern, onlyFirst ? undefined : 'g');
223
235
  }
@@ -535,11 +547,10 @@ function isWide(x) {
535
547
  || x >= 0xFE54 && x <= 0xFE66
536
548
  || x >= 0xFE68 && x <= 0xFE6B
537
549
  || x >= 0x16FE0 && x <= 0x16FE4
538
- || x === 0x16FF0
539
- || x === 0x16FF1
540
- || x >= 0x17000 && x <= 0x187F7
541
- || x >= 0x18800 && x <= 0x18CD5
542
- || x >= 0x18CFF && x <= 0x18D08
550
+ || x >= 0x16FF0 && x <= 0x16FF6
551
+ || x >= 0x17000 && x <= 0x18CD5
552
+ || x >= 0x18CFF && x <= 0x18D1E
553
+ || x >= 0x18D80 && x <= 0x18DF2
543
554
  || x >= 0x1AFF0 && x <= 0x1AFF3
544
555
  || x >= 0x1AFF5 && x <= 0x1AFFB
545
556
  || x === 0x1AFFD
@@ -584,7 +595,7 @@ function isWide(x) {
584
595
  || x >= 0x1F680 && x <= 0x1F6C5
585
596
  || x === 0x1F6CC
586
597
  || x >= 0x1F6D0 && x <= 0x1F6D2
587
- || x >= 0x1F6D5 && x <= 0x1F6D7
598
+ || x >= 0x1F6D5 && x <= 0x1F6D8
588
599
  || x >= 0x1F6DC && x <= 0x1F6DF
589
600
  || x === 0x1F6EB
590
601
  || x === 0x1F6EC
@@ -595,11 +606,12 @@ function isWide(x) {
595
606
  || x >= 0x1F93C && x <= 0x1F945
596
607
  || x >= 0x1F947 && x <= 0x1F9FF
597
608
  || x >= 0x1FA70 && x <= 0x1FA7C
598
- || x >= 0x1FA80 && x <= 0x1FA89
599
- || x >= 0x1FA8F && x <= 0x1FAC6
600
- || x >= 0x1FACE && x <= 0x1FADC
601
- || x >= 0x1FADF && x <= 0x1FAE9
602
- || x >= 0x1FAF0 && x <= 0x1FAF8
609
+ || x >= 0x1FA80 && x <= 0x1FA8A
610
+ || x >= 0x1FA8E && x <= 0x1FAC6
611
+ || x === 0x1FAC8
612
+ || x >= 0x1FACD && x <= 0x1FADC
613
+ || x >= 0x1FADF && x <= 0x1FAEA
614
+ || x >= 0x1FAEF && x <= 0x1FAF8
603
615
  || x >= 0x20000 && x <= 0x2FFFD
604
616
  || x >= 0x30000 && x <= 0x3FFFD;
605
617
  }
@@ -1,4 +1,4 @@
1
- var n,l$1,u$2,i$1,r$1,o$1,e$1,f$2,c$1,s$1,a$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$1=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function g$1(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps) void 0===e[o]&&(e[o]=l.defaultProps[o]);return m$1(l,e,i,r,null)}function m$1(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u$2:o,__i:-1,__u:0};return null==o&&null!=l$1.vnode&&l$1.vnode(e),e}function k$1(n){return n.children}function x$1(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M(n){(!n.__d&&(n.__d=true)&&i$1.push(n)&&!$.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($);}function $(){for(var n,u,t,r,o,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N$1(f,t,c),t.__e!=o&&C$2(t)));$.__r=0;}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_=t&&t.__k||v$1,m=l.length;for(f=P$1(u,l,_,f,m),a=0;a<m;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:_[y.__i]||p$1,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),4&y.__u||h.__k===y.__k?f=A(y,f,n):"function"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P$1(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m$1(null,o,null,null,null):w$1(o)?m$1(k$1,{children:o},null,null,null):null==o.constructor&&o.__b>0?m$1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$1(e,e));return t}function A(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=A(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=S(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(w$1(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return -1}function T$1(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var r,o;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$1(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f$2,"$1")),o=l.toLowerCase(),l=o in n||"onFocusOut"==l||"onFocusIn"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,r?a$1:s$1,r)):n.removeEventListener(l,r?a$1:s$1,r);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||false===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$1(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$1(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$1&&null==a.key&&(L=V$1(a.props.children)),f=I(n,w$1(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f;}else {for(T=o.length;T--;)g$1(o[T]);z$1(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$1(u);l$1.__e(n,u,t);}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$1(t.__e,u,t,i,r,o,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$1(n){n&&n.__c&&(n.__c.__e=true),n&&n.__k&&n.__k.forEach(z$1);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:w$1(n)?n.map(V$1):d$1({},n)}function q$1(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=false),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=d;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,d,o);}for(a in k)d=k[a],"children"==a?y=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?_=d:"checked"==a?m=d:c&&"function"!=typeof d||b[a]===d||j$2(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I("template"==t.type?u.content:u,w$1(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$1(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],o));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$1(n,u,t){var i,r;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D$1(i[r],u,t||"function"!=typeof n.type);t||g$1(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),o=(r="function"=="undefined")?null:t.__k,e=[],f=[],O(t,u=(t).__k=_$1(k$1,null,[u]),o||p$1,p$1,t.namespaceURI,o?null:t.firstChild?n.call(t.childNodes):null,e,o?o.__e:t.firstChild,r,f),N$1(e,u,f);}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l;}throw n}},u$2=0,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=true,n&&this.__h.push(n),M(this));},x$1.prototype.render=k$1,i$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f$2=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$1(false),a$1=F$1(true);
1
+ var n,l$1,u$2,i$1,r$1,o$1,e$1,f$2,c$1,s$1,a$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$1=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function g$1(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps) void 0===e[o]&&(e[o]=l.defaultProps[o]);return m$1(l,e,i,r,null)}function m$1(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u$2:o,__i:-1,__u:0};return null==o&&null!=l$1.vnode&&l$1.vnode(e),e}function k$1(n){return n.children}function x$1(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M(n){(!n.__d&&(n.__d=true)&&i$1.push(n)&&!$.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($);}function $(){for(var n,u,t,r,o,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N$1(f,t,c),r.__e=r.__=null,t.__e!=o&&C$2(t)));$.__r=0;}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v$1,b=l.length;for(f=P$1(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:m[y.__i]||p$1,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P$1(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m$1(null,o,null,null,null):w$1(o)?m$1(k$1,{children:o},null,null,null):null==o.constructor&&o.__b>0?m$1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$1(e,e));return t}function A(n,l,u,t){var i,r;if("function"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(w$1(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return -1}function T$1(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var r,o;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$1(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f$2,"$1")),o=l.toLowerCase(),l=o in n||"onFocusOut"==l||"onFocusIn"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,r?a$1:s$1,r)):n.removeEventListener(l,r?a$1:s$1,r);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||false===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$1(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$1(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$1&&null==a.key&&(L=V$1(a.props.children)),f=I(n,w$1(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f;}else {for(T=o.length;T--;)g$1(o[T]);z$1(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$1(u);l$1.__e(n,u,t);}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$1(t.__e,u,t,i,r,o,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$1(n){n&&n.__c&&(n.__c.__e=true),n&&n.__k&&n.__k.forEach(z$1);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:w$1(n)?n.map(V$1):d$1({},n)}function q$1(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=false),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=d;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,d,o);}for(a in k)d=k[a],"children"==a?y=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?_=d:"checked"==a?m=d:c&&"function"!=typeof d||b[a]===d||j$2(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I("template"==t.type?u.content:u,w$1(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$1(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],o));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$1(n,u,t){var i,r;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D$1(i[r],u,t||"function"!=typeof n.type);t||g$1(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),o=(r="function"=="undefined")?null:t.__k,e=[],f=[],O(t,u=(t).__k=_$1(k$1,null,[u]),o||p$1,p$1,t.namespaceURI,o?null:t.firstChild?n.call(t.childNodes):null,e,o?o.__e:t.firstChild,r,f),N$1(e,u,f);}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l;}throw n}},u$2=0,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=true,n&&this.__h.push(n),M(this));},x$1.prototype.render=k$1,i$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f$2=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$1(false),a$1=F$1(true);
2
2
 
3
3
  var t,r,u$1,i,o=0,f$1=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=true);}}),c&&c.call(this,n,t,r)||i};r.__f=true;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i));}function _(n,u){var i=p(t++,4);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i));}function j$1(){for(var n;n=f$1.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u$1===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(i.__h.forEach(z),i.__h.forEach(B$1),i.__h=[],t=0)),u$1=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f$1.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),u$1=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r));}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}function C$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return "function"==typeof t?t(n):t}
4
4
 
@@ -0,0 +1,22 @@
1
+ import "file:///Users/dmail/Documents/dev/jsenv/core/packages/internal/plugin-transpilation/src/babel/new_stylesheet/client/new_stylesheet.js";
2
+
3
+ const installImportMetaCss = importMeta => {
4
+ const stylesheet = new CSSStyleSheet({
5
+ baseUrl: importMeta.url
6
+ });
7
+ let called = false;
8
+ // eslint-disable-next-line accessor-pairs
9
+ Object.defineProperty(importMeta, "css", {
10
+ configurable: true,
11
+ set(value) {
12
+ if (called) {
13
+ throw new Error("import.meta.css setter can only be called once");
14
+ }
15
+ called = true;
16
+ stylesheet.replaceSync(value);
17
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];
18
+ }
19
+ });
20
+ };
21
+
22
+ export { installImportMetaCss };
@@ -147,6 +147,14 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
147
147
  return 3;
148
148
  }
149
149
 
150
+ if (env.TERM === 'xterm-ghostty') {
151
+ return 3;
152
+ }
153
+
154
+ if (env.TERM === 'wezterm') {
155
+ return 3;
156
+ }
157
+
150
158
  if ('TERM_PROGRAM' in env) {
151
159
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
152
160
 
@@ -511,11 +519,10 @@ function isWide(x) {
511
519
  || x >= 0xFE54 && x <= 0xFE66
512
520
  || x >= 0xFE68 && x <= 0xFE6B
513
521
  || x >= 0x16FE0 && x <= 0x16FE4
514
- || x === 0x16FF0
515
- || x === 0x16FF1
516
- || x >= 0x17000 && x <= 0x187F7
517
- || x >= 0x18800 && x <= 0x18CD5
518
- || x >= 0x18CFF && x <= 0x18D08
522
+ || x >= 0x16FF0 && x <= 0x16FF6
523
+ || x >= 0x17000 && x <= 0x18CD5
524
+ || x >= 0x18CFF && x <= 0x18D1E
525
+ || x >= 0x18D80 && x <= 0x18DF2
519
526
  || x >= 0x1AFF0 && x <= 0x1AFF3
520
527
  || x >= 0x1AFF5 && x <= 0x1AFFB
521
528
  || x === 0x1AFFD
@@ -560,7 +567,7 @@ function isWide(x) {
560
567
  || x >= 0x1F680 && x <= 0x1F6C5
561
568
  || x === 0x1F6CC
562
569
  || x >= 0x1F6D0 && x <= 0x1F6D2
563
- || x >= 0x1F6D5 && x <= 0x1F6D7
570
+ || x >= 0x1F6D5 && x <= 0x1F6D8
564
571
  || x >= 0x1F6DC && x <= 0x1F6DF
565
572
  || x === 0x1F6EB
566
573
  || x === 0x1F6EC
@@ -571,11 +578,12 @@ function isWide(x) {
571
578
  || x >= 0x1F93C && x <= 0x1F945
572
579
  || x >= 0x1F947 && x <= 0x1F9FF
573
580
  || x >= 0x1FA70 && x <= 0x1FA7C
574
- || x >= 0x1FA80 && x <= 0x1FA89
575
- || x >= 0x1FA8F && x <= 0x1FAC6
576
- || x >= 0x1FACE && x <= 0x1FADC
577
- || x >= 0x1FADF && x <= 0x1FAE9
578
- || x >= 0x1FAF0 && x <= 0x1FAF8
581
+ || x >= 0x1FA80 && x <= 0x1FA8A
582
+ || x >= 0x1FA8E && x <= 0x1FAC6
583
+ || x === 0x1FAC8
584
+ || x >= 0x1FACD && x <= 0x1FADC
585
+ || x >= 0x1FADF && x <= 0x1FAEA
586
+ || x >= 0x1FAEF && x <= 0x1FAF8
579
587
  || x >= 0x20000 && x <= 0x2FFFD
580
588
  || x >= 0x30000 && x <= 0x3FFFD;
581
589
  }
@@ -147,6 +147,14 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
147
147
  return 3;
148
148
  }
149
149
 
150
+ if (env.TERM === 'xterm-ghostty') {
151
+ return 3;
152
+ }
153
+
154
+ if (env.TERM === 'wezterm') {
155
+ return 3;
156
+ }
157
+
150
158
  if ('TERM_PROGRAM' in env) {
151
159
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
152
160
 
@@ -511,11 +519,10 @@ function isWide(x) {
511
519
  || x >= 0xFE54 && x <= 0xFE66
512
520
  || x >= 0xFE68 && x <= 0xFE6B
513
521
  || x >= 0x16FE0 && x <= 0x16FE4
514
- || x === 0x16FF0
515
- || x === 0x16FF1
516
- || x >= 0x17000 && x <= 0x187F7
517
- || x >= 0x18800 && x <= 0x18CD5
518
- || x >= 0x18CFF && x <= 0x18D08
522
+ || x >= 0x16FF0 && x <= 0x16FF6
523
+ || x >= 0x17000 && x <= 0x18CD5
524
+ || x >= 0x18CFF && x <= 0x18D1E
525
+ || x >= 0x18D80 && x <= 0x18DF2
519
526
  || x >= 0x1AFF0 && x <= 0x1AFF3
520
527
  || x >= 0x1AFF5 && x <= 0x1AFFB
521
528
  || x === 0x1AFFD
@@ -560,7 +567,7 @@ function isWide(x) {
560
567
  || x >= 0x1F680 && x <= 0x1F6C5
561
568
  || x === 0x1F6CC
562
569
  || x >= 0x1F6D0 && x <= 0x1F6D2
563
- || x >= 0x1F6D5 && x <= 0x1F6D7
570
+ || x >= 0x1F6D5 && x <= 0x1F6D8
564
571
  || x >= 0x1F6DC && x <= 0x1F6DF
565
572
  || x === 0x1F6EB
566
573
  || x === 0x1F6EC
@@ -571,11 +578,12 @@ function isWide(x) {
571
578
  || x >= 0x1F93C && x <= 0x1F945
572
579
  || x >= 0x1F947 && x <= 0x1F9FF
573
580
  || x >= 0x1FA70 && x <= 0x1FA7C
574
- || x >= 0x1FA80 && x <= 0x1FA89
575
- || x >= 0x1FA8F && x <= 0x1FAC6
576
- || x >= 0x1FACE && x <= 0x1FADC
577
- || x >= 0x1FADF && x <= 0x1FAE9
578
- || x >= 0x1FAF0 && x <= 0x1FAF8
581
+ || x >= 0x1FA80 && x <= 0x1FA8A
582
+ || x >= 0x1FA8E && x <= 0x1FAC6
583
+ || x === 0x1FAC8
584
+ || x >= 0x1FACD && x <= 0x1FADC
585
+ || x >= 0x1FADF && x <= 0x1FAEA
586
+ || x >= 0x1FAEF && x <= 0x1FAF8
579
587
  || x >= 0x20000 && x <= 0x2FFFD
580
588
  || x >= 0x30000 && x <= 0x3FFFD;
581
589
  }
@@ -4742,7 +4742,7 @@ const jsenvPluginHtmlReferenceAnalysis = ({
4742
4742
  const createInlineReference = (
4743
4743
  node,
4744
4744
  inlineContent,
4745
- { type, expectedType, contentType },
4745
+ { type, subtype, expectedType, contentType },
4746
4746
  ) => {
4747
4747
  const hotAccept =
4748
4748
  getHtmlNodeAttribute(node, "hot-accept") !== undefined;
@@ -4758,6 +4758,7 @@ const jsenvPluginHtmlReferenceAnalysis = ({
4758
4758
  getHtmlNodeAttribute(node, "jsenv-debug") !== undefined;
4759
4759
  const inlineReference = urlInfo.dependencies.foundInline({
4760
4760
  type,
4761
+ subtype,
4761
4762
  expectedType,
4762
4763
  isOriginalPosition: isOriginal,
4763
4764
  specifierLine: line,
@@ -5634,7 +5635,6 @@ const createNodeEsmResolver = ({
5634
5635
  const resolveNodeEsmFallbackNullToDelegateToWebPlugin =
5635
5636
  createResolverWithFallbackOnError(
5636
5637
  applyNodeEsmResolution,
5637
-
5638
5638
  () => DELEGATE_TO_WEB_RESOLUTION_PLUGIN,
5639
5639
  );
5640
5640
 
@@ -6050,7 +6050,6 @@ const jsenvPluginNodeEsmResolution = (
6050
6050
  );
6051
6051
  }
6052
6052
  return createNodeEsmResolver({
6053
- build: kitchenContext.build,
6054
6053
  runtimeCompat: kitchenContext.runtimeCompat,
6055
6054
  rootDirectoryUrl: kitchenContext.rootDirectoryUrl,
6056
6055
  packageConditions,
@@ -6067,7 +6066,6 @@ const jsenvPluginNodeEsmResolution = (
6067
6066
  appliesDuring: "*",
6068
6067
  init: (kitchenContext) => {
6069
6068
  nodeEsmResolverDefault = createNodeEsmResolver({
6070
- build: kitchenContext.build,
6071
6069
  runtimeCompat: kitchenContext.runtimeCompat,
6072
6070
  rootDirectoryUrl: kitchenContext.rootDirectoryUrl,
6073
6071
  preservesSymlink: true,
@@ -7396,7 +7394,7 @@ const jsenvPluginInliningIntoHtml = () => {
7396
7394
  });
7397
7395
  });
7398
7396
  };
7399
- const onScriptWithSrc = (scriptNode, { src }) => {
7397
+ const onScriptWithSrc = (scriptNode, { type, src }) => {
7400
7398
  let scriptReference;
7401
7399
  for (const dependencyReference of urlInfo.referenceToOthersSet) {
7402
7400
  if (
@@ -7423,7 +7421,7 @@ const jsenvPluginInliningIntoHtml = () => {
7423
7421
  column,
7424
7422
  isOriginal,
7425
7423
  specifier: scriptInlineUrl,
7426
- type: scriptReference.type,
7424
+ type,
7427
7425
  subtype: scriptReference.subtype,
7428
7426
  expectedType: scriptReference.expectedType,
7429
7427
  });
@@ -7467,7 +7465,7 @@ const jsenvPluginInliningIntoHtml = () => {
7467
7465
  if (!src) {
7468
7466
  return;
7469
7467
  }
7470
- onScriptWithSrc(scriptNode, { src });
7468
+ onScriptWithSrc(scriptNode, { type, src });
7471
7469
  },
7472
7470
  });
7473
7471
  if (actions.length > 0) {
@@ -7846,6 +7844,9 @@ const jsenvPluginImportMetaCss = () => {
7846
7844
  const importMetaCssClientFileUrl = import.meta.resolve(
7847
7845
  "../js/import_meta_css.js",
7848
7846
  );
7847
+ const importMetaCssBuildFileUrl = import.meta.resolve(
7848
+ "../js/import_meta_css_build.js",
7849
+ );
7849
7850
 
7850
7851
  return {
7851
7852
  name: "jsenv:import_meta_css",
@@ -7866,35 +7867,17 @@ const jsenvPluginImportMetaCss = () => {
7866
7867
  if (!usesImportMetaCss) {
7867
7868
  return null;
7868
7869
  }
7869
- return injectImportMetaCss(urlInfo, importMetaCssClientFileUrl);
7870
+ return injectImportMetaCss(
7871
+ urlInfo,
7872
+ urlInfo.context.build
7873
+ ? importMetaCssBuildFileUrl
7874
+ : importMetaCssClientFileUrl,
7875
+ );
7870
7876
  },
7871
7877
  },
7872
7878
  };
7873
7879
  };
7874
7880
 
7875
- const injectImportMetaCss = (urlInfo, importMetaCssClientFileUrl) => {
7876
- const importMetaCssClientFileReference = urlInfo.dependencies.inject({
7877
- parentUrl: urlInfo.url,
7878
- type: "js_import",
7879
- expectedType: "js_module",
7880
- specifier: importMetaCssClientFileUrl,
7881
- });
7882
- let content = urlInfo.content;
7883
- let prelude = `import { installImportMetaCss } from ${importMetaCssClientFileReference.generatedSpecifier};
7884
-
7885
- const remove = installImportMetaCss(import.meta);
7886
- if (import.meta.hot) {
7887
- import.meta.hot.dispose(() => {
7888
- remove();
7889
- });
7890
- }
7891
-
7892
- `;
7893
- return {
7894
- content: `${prelude.replace(/\n/g, "")}${content}`,
7895
- };
7896
- };
7897
-
7898
7881
  const babelPluginMetadataUsesImportMetaCss = () => {
7899
7882
  return {
7900
7883
  name: "metadata-uses-import-meta-css",
@@ -7926,6 +7909,29 @@ const babelPluginMetadataUsesImportMetaCss = () => {
7926
7909
  };
7927
7910
  };
7928
7911
 
7912
+ const injectImportMetaCss = (urlInfo, importMetaCssClientFileUrl) => {
7913
+ const importMetaCssClientFileReference = urlInfo.dependencies.inject({
7914
+ parentUrl: urlInfo.url,
7915
+ type: "js_import",
7916
+ expectedType: "js_module",
7917
+ specifier: importMetaCssClientFileUrl,
7918
+ });
7919
+ let content = urlInfo.content;
7920
+ let prelude = `import { installImportMetaCss } from ${importMetaCssClientFileReference.generatedSpecifier};
7921
+
7922
+ const remove = installImportMetaCss(import.meta);
7923
+ if (import.meta.hot) {
7924
+ import.meta.hot.dispose(() => {
7925
+ remove();
7926
+ });
7927
+ }
7928
+
7929
+ `;
7930
+ return {
7931
+ content: `${prelude.replace(/\n/g, "")}${content}`,
7932
+ };
7933
+ };
7934
+
7929
7935
  // https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-stages-of-babel
7930
7936
  // https://github.com/cfware/babel-plugin-bundled-import-meta/blob/master/index.js
7931
7937
  // https://github.com/babel/babel/blob/f4edf62f6beeab8ae9f2b7f0b82f1b3b12a581af/packages/babel-helper-module-imports/src/index.js#L7