react-reinspect 0.1.8 → 0.2.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.
@@ -0,0 +1,2 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`),u=require(`react/jsx-runtime`),d=require(`react-dom`);var f=(0,l.createContext)(null),p=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type="hidden"])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `);function m(e){let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`}function h(e){return Array.from(e.querySelectorAll(p)).filter(e=>m(e))}function g(e){let t=h(e)[0];if(t){t.focus();return}e.focus()}function ee(e,t){if(e.key!==`Tab`)return;let n=h(t);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1];if(!r||!i){e.preventDefault(),t.focus();return}let a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=a&&t.contains(a);if(e.shiftKey){(!o||a===r)&&(e.preventDefault(),i.focus());return}(!o||a===i)&&(e.preventDefault(),r.focus())}var _=[`backgroundColor`,`color`,`fontSize`,`padding`,`margin`,`borderRadius`,`borderWidth`,`borderColor`,`opacity`,`width`,`height`,`gap`],v=`#1f2937`,te=new Set([`backgroundColor`,`color`,`borderColor`]),ne=new Set([`fontSize`,`padding`,`margin`,`borderRadius`,`borderWidth`,`width`,`height`,`gap`]),y=2147483e3,b=`reinspect.inspectMode`,x=`reinspect.inspectWhitelist`,S=`reinspect.inspectBlacklist`,C=`reinspect.propsSerializationMode`,w=`reinspect.menuTheme`,T=`reinspect.menuOpenGesture`,E={ctrl:!1,alt:!1,shift:!0,meta:!1},D={mode:`right-click`,modifiers:E},O=[`wrapped`,`first-party`,`all`],k=[`off`,`attempts`,`commits`,`both`],A=[`distilled`,`complete`],j=[`light`,`dark`],M=[`right-click`,`modifier-right-click`],N=!1;function P(e){return typeof e==`object`&&!!e}function re(){N||typeof console>`u`||(N=!0,console.warn("[react-reinspect] `shouldCountRenders` and `renderCaptureMode` are deprecated. Use `renderCounters` instead."))}function ie(e){return typeof e==`string`&&O.includes(e)}function F(e){return typeof e==`string`&&k.includes(e)}function I(e){return typeof e==`string`&&A.includes(e)}function L(e){return typeof e==`string`&&j.includes(e)}function ae(e){return typeof e==`string`&&M.includes(e)}function R(e){let t={ctrl:e?.ctrl===!0,alt:e?.alt===!0,shift:e?.shift===!0,meta:e?.meta===!0};return t.ctrl||t.alt||t.shift||t.meta?t:{...E}}function oe(e){return{mode:ae(e?.mode)?e.mode:D.mode,modifiers:R(e?.modifiers)}}function z(e){let t=[];if(Array.isArray(e?.patterns))for(let n of e.patterns){if(typeof n!=`string`)continue;let e=n.trim();e.length!==0&&t.push(e)}return{patterns:t,regex:e?.regex===!0,wholeWord:e?.wholeWord===!0,matchCase:e?.matchCase===!0}}function B(){if(!(typeof window>`u`))try{let e=window.sessionStorage.getItem(b);return ie(e)?e:void 0}catch{return}}function se(e){return B()||(ie(e)?e:`wrapped`)}function ce(e){if(!(typeof window>`u`))try{window.sessionStorage.setItem(b,e)}catch{}}function le(e){if(!(typeof window>`u`))try{let t=window.sessionStorage.getItem(e);if(!t)return;let n=JSON.parse(t);return P(n)?z(n):void 0}catch{return}}function V(e,t){return le(t)||z(e)}function ue(e){return V(e,x)}function H(e){return V(e,S)}function de(e,t){if(!(typeof window>`u`))try{let n=z(t);window.sessionStorage.setItem(e,JSON.stringify(n))}catch{}}function fe(e){de(x,e)}function pe(e){de(S,e)}function me(){if(!(typeof window>`u`))try{let e=window.sessionStorage.getItem(C);return I(e)?e:void 0}catch{return}}function he(e){return me()||(I(e)?e:`distilled`)}function ge(e){if(!(typeof window>`u`))try{window.sessionStorage.setItem(C,e)}catch{}}function U(){if(!(typeof window>`u`))try{let e=window.sessionStorage.getItem(w);return L(e)?e:void 0}catch{return}}function _e(e){return U()||(L(e)?e:`light`)}function W(e){if(!(typeof window>`u`))try{window.sessionStorage.setItem(w,e)}catch{}}function ve(){if(!(typeof window>`u`))try{let e=window.sessionStorage.getItem(T);if(!e)return;let t=JSON.parse(e);return P(t)?oe(t):void 0}catch{return}}function ye(e){return ve()||oe(e)}function be(e){if(!(typeof window>`u`))try{let t=oe(e);window.sessionStorage.setItem(T,JSON.stringify(t))}catch{}}function xe(e){return F(e.renderCounters)?e.renderCounters:((e.shouldCountRenders!==void 0||e.renderCaptureMode!==void 0)&&re(),e.shouldCountRenders===!1?`off`:e.shouldCountRenders===!0?e.renderCaptureMode??`attempts`:e.renderCaptureMode?e.renderCaptureMode:`off`)}function Se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ce(e){let t=z(e),n=[],r=[],i=t.matchCase?``:`i`;for(let e of t.patterns){let a=t.regex?e:Se(e),o=t.wholeWord?`\\b(?:${a})\\b`:a;try{n.push(new RegExp(o,i))}catch{r.push(e)}}return{hasPatterns:n.length>0,invalidPatterns:r,matches:e=>n.some(t=>t.test(e))}}function G(e,t,n){return!(!(!t.hasPatterns||t.matches(e))||n.hasPatterns&&n.matches(e))}function we(e={}){let t=e.enabled??!1,n=e.editableProps&&e.editableProps.length>0?e.editableProps:_;return{enabled:t,startActive:e.startActive??!0,showFloatingToggle:e.showFloatingToggle??t,inspectMode:se(e.inspectMode),inspectWhitelist:ue(e.inspectWhitelist),inspectBlacklist:H(e.inspectBlacklist),editableProps:n,zIndexBase:e.zIndexBase??y,renderCounters:xe(e),countRendersForComponents:e.countRendersForComponents??[],propsSerializationMode:he(e.propsSerializationMode),menuTheme:_e(e.menuTheme),menuOpenGesture:ye(e.menuOpenGesture)}}function Te(e,t){if(!e)return{};let n={};for(let r of t){let t=e[r];t==null||t===``||(n[r]=t)}return n}function K(e){let t=e.trim();if(t.length===0)return;if(t.endsWith(`%`)){let e=Number(t.slice(0,-1));return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e/100*255))):void 0}let n=Number(t);if(Number.isFinite(n))return Math.min(255,Math.max(0,Math.round(n)))}function Ee(e){return e.toString(16).padStart(2,`0`)}function q(e){if(!e)return;let t=e.trim();if(/^#[0-9a-fA-F]{6}$/.test(t))return t.toLowerCase();if(/^#[0-9a-fA-F]{3}$/.test(t)){let[,e=`0`,n=`0`,r=`0`]=t;return`#${e}${e}${n}${n}${r}${r}`.toLowerCase()}let n=t.match(/^rgba?\((.+)\)$/i);if(n){let e=(n[1]??``).replace(/\//g,` `).split(/[,\s]+/).filter(e=>e.length>0),t=K(e[0]??``),r=K(e[1]??``),i=K(e[2]??``);if(t!==void 0&&r!==void 0&&i!==void 0)return`#${Ee(t)}${Ee(r)}${Ee(i)}`}}function J(e){if(typeof document>`u`||typeof window>`u`)return;let t=document.createElement(`span`);if(t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,t.style.color=``,t.style.color=e,t.style.color){document.body.appendChild(t);try{let e=window.getComputedStyle(t).color;return q(e)}finally{t.remove()}}}function De(e){let t=q(e);if(t)return t;if(e){let t=J(e);if(t)return t}return J(`var(--reinspect-menu-text)`)||J(`CanvasText`)||v}function Oe(e){let t=Number(e);if(Number.isFinite(t))return t}var ke=4,Y=40,Ae=40,je=`__reinspect_placeholder__`,Me=`__reinspect__displayName__`,Ne=`display`,X=Symbol(`reinspect.omitSerialization`),Pe=new Set([`$$typeof`,`_owner`,`_store`,`_self`,`_source`]);function Z(e,t){return{[Me]:t}}function Q(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fe(e){if(!Q(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ie(e){if(!Q(e))return!1;let t=e[je];if(t!==void 0&&typeof t!=`string`)return!1;let n=e[Me];if(n!==void 0&&typeof n!=`string`)return!1;let r=e[Ne];return r!==void 0&&typeof r!=`string`?!1:typeof t==`string`||typeof n==`string`}function Le(e){try{return JSON.stringify(e,null,2)}catch{return null}}function Re(e){try{let t=Function.prototype.toString.call(e);return typeof t!=`string`||t.trim().length===0?`[Function source unavailable]`:t}catch{return`[Function source unavailable]`}}function ze(e){let t=e.replace(/\s+/g,` `).trim();return t.length<=120?t:`${t.slice(0,117)}...`}function Be(e){return e?.mode===`complete`?`complete`:`distilled`}function Ve(e){return`$$typeof`in e&&`props`in e}function He(e,t){let n=Object.entries(e);return t!==`distilled`||!Ve(e)?n:n.filter(([e])=>!Pe.has(e))}function Ue(e,t,n,r){let i=(e,t)=>r===`complete`?Z(e,t):X;if(n>ke)return i(`truncated`,`[Max depth reached]`);if(e===null)return null;let a=typeof e;if(a===`string`||a===`boolean`)return e;if(a===`number`)return Number.isFinite(e)?e:i(`non-finite-number`,String(e));if(a===`undefined`)return i(`undefined`,`undefined`);if(a===`bigint`)return i(`bigint`,`${String(e)}n`);if(a===`symbol`)return i(`symbol`,String(e));if(a===`function`)return i(`function`,`[Function ${e.name||`anonymous`}]`);if(e instanceof Date)return i(`date`,Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString());if(e instanceof RegExp)return i(`regexp`,e.toString());if(a===`object`){let a=e;if(t.has(a))return i(`circular`,`[Circular]`);if(t.add(a),Array.isArray(e)){let o=[],s=Math.min(e.length,Ae);for(let i=0;i<s;i+=1){let a=Ue(e[i],t,n+1,r);a!==X&&o.push(a)}if(e.length>Ae){let t=i(`truncated`,`${e.length-Ae} more items`);t!==X&&o.push(t)}return t.delete(a),o}let o={},s=He(e,r),c=Math.min(s.length,Y);for(let e=0;e<c;e+=1){let i=s[e];if(!i)continue;let[a,c]=i,l=Ue(c,t,n+1,r);l!==X&&(o[a]=l)}if(s.length>Y){let e=i(`truncated`,`${s.length-Y} more keys`);e!==X&&(o.__reinspect_truncated__=e)}return t.delete(a),o}return i(`unsupported`,`[Unsupported value]`)}function We(e){if(e===null)return{kind:`null`,summary:`null`,copyText:`null`};let t=typeof e;if(t===`undefined`)return{kind:`undefined`,summary:`undefined`,copyText:`undefined`};if(t===`boolean`)return{kind:`boolean`,summary:String(e),copyText:String(e)};if(t===`number`)return{kind:`number`,summary:String(e),copyText:String(e)};if(t===`string`)return{kind:`string`,summary:JSON.stringify(e),copyText:String(e)};if(t===`bigint`)return{kind:`bigint`,summary:`${String(e)}n`,copyText:`${String(e)}n`};if(t===`symbol`){let t=String(e);return{kind:`symbol`,summary:t,copyText:t}}if(t===`function`){let t=e,n=Re(t),r=t.name||`anonymous`;return{kind:`function`,summary:`Function ${r}(${t.length})`,copyText:n,functionMeta:{name:r,arity:t.length,preview:ze(n),source:n}}}if(e instanceof Date){let t=Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString();return{kind:`date`,summary:`Date ${t}`,copyText:t}}if(e instanceof RegExp){let t=e.toString();return{kind:`regexp`,summary:t,copyText:t}}return Array.isArray(e)?{kind:`array`,summary:`Array(${e.length})`}:Q(e)?{kind:`object`,summary:`Object(${Object.keys(e).length})`}:{kind:`unknown`,summary:String(e)}}function Ge(e){if(!Ie(e)){if(Array.isArray(e)){let t=[];for(let n of e){let e=Ge(n);if(e===void 0)return;t.push(e)}return t}if(Q(e)){let t={};for(let[n,r]of Object.entries(e)){let e=Ge(r);e!==void 0&&(t[n]=e)}return t}return e}}function Ke(e){return Object.keys(e).map(t=>({key:t,value:We(e[t])}))}function qe(e,t){let n=Ue(e,new WeakSet,0,Be(t));return n===X?`{}`:Le(n)??`{}`}function Je(e,t){let n=Ue(e,new WeakSet,0,Be(t));return n===X?null:Le(n)}function Ye(e){if(e===null)return!0;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||Array.isArray(e)?!0:Fe(e)}function Xe(e){if(e===null)return!0;let t=typeof e;return t===`string`||t===`number`||t===`boolean`?!0:Array.isArray(e)?e.every(e=>Xe(e)):!1}function Ze(e){let t=e.trim();if(t.length===0)return{parsed:null,error:`Value JSON cannot be empty.`};try{let e=Ge(JSON.parse(t));return e===void 0||!Ye(e)?{parsed:null,error:`Only objects, arrays, and primitive JSON values are editable.`}:{parsed:e,error:null}}catch{return{parsed:null,error:`Invalid JSON. Fix syntax and try Apply again.`}}}function Qe(e){let t=e.trim();if(t.length===0)return{parsed:{},error:null};try{let e=JSON.parse(t);if(typeof e!=`object`||!e||Array.isArray(e))return{parsed:null,error:`Props JSON must be an object (example: {"title":"Demo"}).`};let n={};for(let[t,r]of Object.entries(e)){let e=Ge(r);e!==void 0&&(n[t]=e)}return{parsed:n,error:null}}catch{return{parsed:null,error:`Invalid JSON. Fix syntax and try Apply again.`}}}var $e=Symbol.for(`reinspect.wrapped`);function et(e){return e[$e]}function tt(e,t){e[$e]=t}var nt={attempts:0,commits:0},rt=new Map,$=new Map;function it(e){let t=rt.get(e);if(t)return t;let n={attempts:0,commits:0};return rt.set(e,n),n}function at(e){let t=$.get(e);if(t)for(let e of t)e()}function ot(e){let t=it(e);rt.set(e,{attempts:t.attempts+1,commits:t.commits+1}),at(e)}function st(e){return rt.get(e)||nt}function ct(e){rt.delete(e),at(e)}function lt(e,t){let n=$.get(e);return n?n.add(t):$.set(e,new Set([t])),()=>{let n=$.get(e);n&&(n.delete(t),n.size===0&&$.delete(e))}}function ut(e){return(0,l.useSyncExternalStore)((0,l.useCallback)(t=>lt(e,t),[e]),(0,l.useCallback)(()=>st(e),[e]),()=>nt)}function dt(e,t){return t===`commits`?`${e.commits} commits`:t===`both`?`${e.attempts} attempts | ${e.commits} commits`:`${e.attempts} attempts`}var ft=c(o(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,`__id`,{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,ee=!!h.lookbehind,_=!!h.greedy,v=h.alias;if(_&&!h.pattern.global){var te=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,te+`g`)}for(var ne=h.pattern||h,y=r.next,b=c;y!==t.tail&&!(d&&b>=d.reach);b+=y.value.length,y=y.next){var x=y.value;if(t.length>e.length)return;if(!(x instanceof a)){var S=1,C;if(_){if(C=o(ne,b,e,ee),!C||C.index>=e.length)break;var w=C.index,T=C.index+C[0].length,E=b;for(E+=y.value.length;w>=E;)y=y.next,E+=y.value.length;if(E-=y.value.length,b=E,y.value instanceof a)continue;for(var D=y;D!==t.tail&&(E<T||typeof D.value==`string`);D=D.next)S++,E+=D.value.length;S--,x=e.slice(b,E),C.index-=b}else if(C=o(ne,0,x,ee),!C)continue;var w=C.index,O=C[0],k=x.slice(0,w),A=x.slice(w+O.length),j=b+x.length;d&&j>d.reach&&(d.reach=j);var M=y.prev;k&&(M=l(t,M,k),b+=k.length),u(t,M,S);var N=new a(f,g?i.tokenize(O,g):O,v,O);if(y=l(t,M,N),A&&l(t,y,A),S>1){var P={cause:f+`,`+m,reach:j};s(e,t,n,y.prev,b,P),d&&P.reach>d.reach&&(d.reach=P.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,`addInlined`,{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,`addAttribute`,{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
2
+ `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))(),1);Prism.languages.javascript=Prism.languages.extend(`clike`,{"class-name":[Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined(`script`,`javascript`),Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),Prism.languages.js=Prism.languages.javascript,Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},Prism.languages.webmanifest=Prism.languages.json;function pt(e){return e.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}function mt(e){return ft.languages[e]??null}function ht(e,t){let n=mt(t);if(!n)return pt(e);try{return ft.highlight(e,n,t)}catch{return pt(e)}}function gt({value:e}){if(e.kind===`function`&&e.functionMeta){let t=e.functionMeta;return(0,u.jsxs)(`div`,{className:`reinspect-prop-function`,children:[(0,u.jsx)(`code`,{children:e.summary}),(0,u.jsx)(`pre`,{children:(0,u.jsx)(`code`,{className:`language-javascript reinspect-code-block`,dangerouslySetInnerHTML:{__html:ht(t.preview,`javascript`)}})})]})}return(0,u.jsx)(`div`,{className:`reinspect-prop-scalar`,children:(0,u.jsx)(`code`,{children:e.summary})})}function _t({instanceId:e,counterMode:t}){return(0,u.jsx)(u.Fragment,{children:dt(ut(e),t)})}var vt={enabled:!1,startActive:!1,showFloatingToggle:!1,inspectMode:`wrapped`,inspectWhitelist:{patterns:[],regex:!1,wholeWord:!1,matchCase:!1},inspectBlacklist:{patterns:[],regex:!1,wholeWord:!1,matchCase:!1},editableProps:[],zIndexBase:0,renderCounters:`off`,countRendersForComponents:[],propsSerializationMode:`distilled`,menuTheme:`light`,menuOpenGesture:{mode:`right-click`,modifiers:{ctrl:!1,alt:!1,shift:!0,meta:!1}}},yt=0,bt=12,xt=560,St=620,Ct=`children can only be null, primitive values, or arrays of primitive values.`;function wt(e){return yt+=1,`${e}-${yt.toString(36)}`}function Tt(e){let t=e.replace(/([A-Z])/g,` $1`).trim(),n=t.slice(0,1);return t.length>0?n.toUpperCase()+t.slice(1):e}function Et(e){return e.trim().toLowerCase().replace(/[\s_-]+/g,``)}function Dt(e){return e!=null&&e!==``}function Ot(e){return e.replace(/[^a-zA-Z0-9_-]/g,`-`)}function kt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function At(e){if(!e)return!0;let t=e.trim().toLowerCase();if(t===`transparent`)return!0;let n=t.match(/^rgba?\((.+)\)$/i);if(!n)return!1;let[,r=``]=n,i=r.replace(/\//g,` `).split(/[,\s]+/).filter(e=>e.length>0);if(i.length<4)return!1;let a=i[3];if(!a)return!1;let o=a.endsWith(`%`)?Number(a.slice(0,-1))/100:Number(a);return Number.isFinite(o)&&o<=0}function jt(e,t,n){if(typeof window>`u`)return e;let r=bt,i=bt,a=Math.max(r,window.innerWidth-t-bt),o=Math.max(i,window.innerHeight-n-bt);return{x:Math.min(Math.max(e.x,r),a),y:Math.min(Math.max(e.y,i),o)}}function Mt(e,t){return e.includes(t)?[...e]:[...e,t]}function Nt(e,t){return e.includes(t)?e.filter(e=>e!==t):Mt(e,t)}function Pt(e,t){if(t.mode===`right-click`)return!0;let n=t.modifiers;return!(n.ctrl&&!e.ctrlKey||n.alt&&!e.altKey||n.shift&&!e.shiftKey||n.meta&&!e.metaKey)}function Ft(e){if(!Object.prototype.hasOwnProperty.call(e,`children`)||Xe(e.children))return e;let t={...e};return delete t.children,t}function It(){return(0,u.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,children:(0,u.jsx)(`path`,{d:`M5.5 1.75A1.75 1.75 0 0 0 3.75 3.5v7c0 .966.784 1.75 1.75 1.75h7a1.75 1.75 0 0 0 1.75-1.75v-7a1.75 1.75 0 0 0-1.75-1.75h-7Zm-.25 1.75c0-.138.112-.25.25-.25h7c.138 0 .25.112.25.25v7a.25.25 0 0 1-.25.25h-7a.25.25 0 0 1-.25-.25v-7ZM1.75 6.5a.75.75 0 0 1 1.5 0v6c0 .966.784 1.75 1.75 1.75h6a.75.75 0 0 1 0 1.5h-6A3.25 3.25 0 0 1 1.75 12.5v-6Z`,fill:`currentColor`})})}function Lt(){return(0,u.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,children:(0,u.jsx)(`path`,{d:`M11.86 1.52a1.8 1.8 0 0 1 2.55 2.55l-7.12 7.12a.75.75 0 0 1-.35.2l-3 0a.75.75 0 0 1-.75-.75l0-3a.75.75 0 0 1 .2-.35l7.12-7.12Zm1.49 1.06a.3.3 0 0 0-.43 0L6.1 9.4l-.16.5.5-.16 6.82-6.82a.3.3 0 0 0 0-.43l.09.09Z`,fill:`currentColor`})})}function Rt(e){return Array.isArray(e)||typeof e==`object`&&!!e}async function zt(e){if(typeof navigator>`u`||!navigator.clipboard?.writeText)return!1;try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function Bt(e,t){return t?.componentName?.trim()||e.displayName?.trim()||e.name?.trim()||t?.fallbackName?.trim()||`Component`}function Vt(e,t,n){return e===`manual`||n===`all`||n===`first-party`&&t===`first-party`}function Ht(e,t){let n=t?.source??`manual`,r=t?.scope??`first-party`,i=et(e);if(i&&n===`auto`)return e;let a=i&&n===`manual`?i.original:e,o=Bt(a,t);function s(e){let t=(0,l.useRef)(null),i=(0,l.useRef)(null),s=(0,l.useRef)(null),c=(0,l.useRef)(null),p=(0,l.useRef)(null),m=(0,l.useRef)(!1),[h,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(`css`),[b,x]=(0,l.useState)(`detected`),[S,C]=(0,l.useState)(``),[w,T]=(0,l.useState)({}),[E,D]=(0,l.useState)(`{}`),[O,k]=(0,l.useState)(null),[A,j]=(0,l.useState)(null),[M,N]=(0,l.useState)({}),[P,re]=(0,l.useState)({}),[ie,F]=(0,l.useState)({}),[I,L]=(0,l.useState)(null),[ae,R]=(0,l.useState)(``),[oe,z]=(0,l.useState)(null),[B,se]=(0,l.useState)(null),[ce,le]=(0,l.useState)({}),V=(0,l.useContext)(f),ue=!!V,H=V?.config??vt,de=V?.getColor??(()=>`var(--reinspect-brand-500)`),fe=V?.menuTheme??`light`,pe=V?.menuOpenGesture??vt.menuOpenGesture,me=V?.isActive??!1,he=V?.inspectMode??`wrapped`,ge=V?.renderCounterMode??vt.renderCounters,U=V?.propsSerializationMode??vt.propsSerializationMode,_e=V?.overrides??{},W=V?.updateOverride??(()=>void 0),ve=V?.renderCountComponents??{},ye=V?.setRenderCountingForComponent??(()=>void 0),be=V?.setInspectWhitelist??(()=>void 0),xe=V?.inspectWhitelist??vt.inspectWhitelist,Se=V?.setInspectBlacklist??(()=>void 0),Ce=V?.isRenderCountingEnabledFor??(()=>!1);t.current||=wt(o);let G=t.current,we=de(o),K=Vt(n,r,he),Ee=V?.isComponentInspectableByFilters(o)??!0,q=H.enabled&&me&&K&&Ee,J=q&&Ce(o),ke=!!ve[o],Y=ge!==`off`,Ae=ge===`off`?`attempts`:ge,je=J,Me=_e[G],Ne=q?Te(Me,H.editableProps):{},X={...e,...w},Pe=X,Z=h!==null,Q=Et(S),Fe=Q.length===0?H.editableProps:H.editableProps.filter(e=>Et(e).includes(Q)),Ie=Z&&v===`props`&&b===`detected`?Ke(Pe):[],Le=(0,l.useRef)(je);(0,l.useEffect)(()=>{Le.current=je},[je]);let Re=(0,l.useMemo)(()=>(e,t)=>{t===`mount`||!Le.current||ot(G)},[G]);(0,l.useEffect)(()=>()=>{ct(G)},[G]),(0,l.useEffect)(()=>{if(!Z)return;let e=e=>{let t=e.target;s.current?.contains(t)||c.current?.contains(t)||(_(null),L(null),R(``),z(null))},t=e=>{if(e.key===`Escape`){if(I){L(null),R(``),z(null);return}_(null)}};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[I,Z]),(0,l.useEffect)(()=>{Z&&(H.enabled&&me&&K||(_(null),L(null),R(``),z(null)))},[H.enabled,K,me,Z]),(0,l.useEffect)(()=>{if(!A)return;let e=globalThis.setTimeout(()=>{j(null)},1400);return()=>{globalThis.clearTimeout(e)}},[A]),(0,l.useEffect)(()=>{if(!B)return;let e=globalThis.setTimeout(()=>{se(null)},5e3);return()=>{globalThis.clearTimeout(e)}},[B]),(0,l.useEffect)(()=>{if(!Z||!h||!s.current)return;let e=s.current.getBoundingClientRect(),t=jt(h,e.width,e.height);(t.x!==h.x||t.y!==h.y)&&_(t)},[Z,h]),(0,l.useEffect)(()=>{if(!Z||I||!s.current)return;let e=s.current;g(e);let t=t=>{ee(t,e)};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[Z,I]),(0,l.useEffect)(()=>{if(!I||!c.current)return;let e=c.current;g(e);let t=t=>{ee(t,e)};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t),s.current?.focus()}},[I]),(0,l.useEffect)(()=>{m.current&&!Z&&i.current?.focus(),m.current=Z},[Z]);let ze={"--reinspect-color":we,"--reinspect-z-base":H.zIndexBase},Be=e=>{if(typeof window>`u`)return{};let t=e.currentTarget.querySelector(`[data-reinspect-content="true"]`),n=e.target,r=null;if(n instanceof HTMLElement&&t?.contains(n)&&(r=n),!r&&t?.firstElementChild instanceof HTMLElement&&(r=t.firstElementChild),!r&&t instanceof HTMLElement&&(r=t),!r)return{};let i=window.getComputedStyle(r),a={},o=()=>{let e=r;for(;e;){let t=window.getComputedStyle(e).backgroundColor.trim();if(!At(t))return t;e=e.parentElement}let t=window.getComputedStyle(document.documentElement).backgroundColor.trim();return At(t)?`rgb(255 255 255)`:t};for(let e of H.editableProps){let t=kt(e),n=e===`backgroundColor`?o():i.getPropertyValue(t).trim();n.length>0&&(a[e]=n)}return a},Ve=e=>{if(!e)return;let t=e.trim().match(/-?\d*\.?\d+/);if(t?.[0])return Oe(t[0])},He=e=>{q&&Pt(e,pe)&&(e.preventDefault(),y(`general`),x(`detected`),C(``),k(null),j(null),N({}),re({}),F({}),L(null),R(``),z(null),D(`{}`),le(Be(e)),_(jt({x:e.clientX,y:e.clientY},xt,St)))},Ue=()=>{let{parsed:e,error:t}=Qe(E);if(t||!e){k(t);return}let n={...e};Object.prototype.hasOwnProperty.call(n,`children`)&&!Xe(n.children)&&delete n.children,T(n),N({}),re({}),F({}),k(null)},We=()=>{T({}),b===`raw`&&D(qe(Ft(e),{mode:U})),k(null)},Ge=(e,t)=>{zt(e).then(e=>{j(e?`${t} copied.`:`Clipboard access is unavailable.`)})},$e=(e,t)=>{let n=M[e],r=n??Je(t,{mode:U});if(!r){j(`JSON preview is unavailable for this value.`);return}n||N(t=>({...t,[e]:r})),Ge(r,`JSON value`)},et=(e,t)=>{if(ie[e]){F(t=>({...t,[e]:!1}));return}if(!(e in M)&&!(e in P)){let n=Je(t,{mode:U});n===null?re(t=>({...t,[e]:`JSON preview is unavailable for this value.`})):N(t=>({...t,[e]:n}))}F(t=>({...t,[e]:!0}))},tt=(e,t)=>{if(!Ye(t))return;let n=Je(t,{mode:U});if(n===null){j(`Unable to open editor for this value.`);return}L(e),R(n),z(null)},nt=()=>{if(!I)return;let e=I,{parsed:t,error:n}=Ze(ae);if(n||t===null){z(n);return}if(e===`children`&&!Xe(t)){z(Ct);return}let r=Rt(t),i=r?Je(t,{mode:U}):null;T(n=>({...n,[e]:t})),N(t=>{if(i===null){if(!(e in t))return t;let n={...t};return delete n[e],n}return t[e]===i?t:{...t,[e]:i}}),re(t=>{let n=`JSON preview is unavailable for this value.`;if(r&&i===null)return t[e]===n?t:{...t,[e]:n};if(!(e in t))return t;let a={...t};return delete a[e],a}),F(t=>r||!t[e]?t:{...t,[e]:!1}),L(null),R(``),z(null)},rt=()=>{be(e=>({...e,patterns:Nt(e.patterns,o)}))},$=xe.patterns.includes(o),it=()=>{Se(e=>({...e,patterns:Mt(e.patterns,o)})),_(null),se({componentName:o})},at=()=>{B&&(Se(e=>({...e,patterns:e.patterns.filter(e=>e!==B.componentName)})),se(null))},st=Z?(0,u.jsxs)(`div`,{ref:s,className:`reinspect-menu`,"data-reinspect-theme":fe,role:`dialog`,"aria-modal":`true`,"aria-label":`${o} controls`,tabIndex:-1,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},style:{top:`${h.y}px`,left:`${h.x}px`,"--reinspect-color":we},children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-header`,children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-title-wrap`,children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-title-row`,children:[(0,u.jsx)(`p`,{className:`reinspect-menu-title`,children:o}),(0,u.jsx)(`span`,{className:`reinspect-menu-title-color-chip`,"aria-hidden":`true`,title:`${o} color`})]}),(0,u.jsx)(`p`,{className:`reinspect-menu-subtitle`,children:`Component controls`})]}),(0,u.jsx)(`button`,{type:`button`,className:`reinspect-menu-close`,"aria-label":`Close ${o} controls`,"data-testid":`reinspect-menu-close-${o}`,onClick:()=>_(null),children:`×`})]}),(0,u.jsxs)(`div`,{className:`reinspect-submenu`,"aria-label":`${o} menu panels`,children:[(0,u.jsx)(`button`,{type:`button`,"data-state":v===`general`?`active`:`idle`,onClick:()=>y(`general`),children:`General`}),(0,u.jsx)(`button`,{type:`button`,"data-state":v===`css`?`active`:`idle`,onClick:()=>y(`css`),children:`CSS`}),(0,u.jsx)(`button`,{type:`button`,"data-state":v===`props`?`active`:`idle`,onClick:()=>y(`props`),children:`Props`})]}),v===`general`?(0,u.jsx)(`div`,{className:`reinspect-general-panel`,children:(0,u.jsxs)(`section`,{className:`reinspect-menu-section`,children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-section-header`,children:[(0,u.jsx)(`p`,{className:`reinspect-menu-section-title`,children:`Quick filters`}),(0,u.jsx)(`p`,{className:`reinspect-menu-section-caption`,children:o})]}),(0,u.jsx)(`p`,{className:`reinspect-menu-section-description`,children:`Focus inspection on this component type, or hide this type from inspection.`}),(0,u.jsxs)(`div`,{className:`reinspect-menu-shortcuts`,children:[(0,u.jsxs)(`button`,{type:`button`,className:`reinspect-menu-action-card`,onClick:rt,"data-testid":`reinspect-include-component-${o}`,"data-state":$?`active`:`idle`,"aria-label":`Only inspect ${o} components`,children:[(0,u.jsx)(`span`,{className:`reinspect-menu-action-title`,children:`Show only this component type`}),(0,u.jsx)(`span`,{className:`reinspect-menu-action-description`,children:`Keeps all matching instances inspectable and hides other types.`}),(0,u.jsx)(`code`,{className:`reinspect-menu-action-target`,children:o})]}),(0,u.jsxs)(`button`,{type:`button`,className:`reinspect-menu-action-card`,onClick:it,"data-testid":`reinspect-exclude-component-${o}`,"aria-label":`Hide ${o} components from inspection`,children:[(0,u.jsx)(`span`,{className:`reinspect-menu-action-title`,children:`Hide this component type`}),(0,u.jsx)(`span`,{className:`reinspect-menu-action-description`,children:`Removes matching instances from inspection overlays.`}),(0,u.jsx)(`code`,{className:`reinspect-menu-action-target`,children:o})]})]}),(0,u.jsx)(`div`,{className:`reinspect-menu-divider`}),(0,u.jsxs)(`div`,{className:`reinspect-menu-inline-setting`,children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-inline-copy`,children:[(0,u.jsx)(`p`,{className:`reinspect-menu-inline-title`,children:`Capture renders`}),(0,u.jsx)(`p`,{className:`reinspect-menu-inline-description`,children:`Track rerender attempts and commits for this component.`})]}),(0,u.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":Y?!0:ke,onClick:()=>ye(o,!ke),disabled:Y,"aria-label":`Capture renders for ${o}`,"data-testid":`reinspect-component-render-toggle-${o}`,className:`reinspect-switch-button reinspect-menu-switch`,"data-state":Y||ke?`on`:`off`})]}),Y?(0,u.jsx)(`p`,{className:`reinspect-setting-note`,children:`Global render capture is enabled in settings.`}):null]})}):null,v===`css`?(0,u.jsxs)(`div`,{className:`reinspect-css-panel`,children:[(0,u.jsxs)(`div`,{className:`reinspect-menu-panel-header`,children:[(0,u.jsx)(`p`,{className:`reinspect-menu-section-title`,children:`Editable styles`}),(0,u.jsxs)(`p`,{className:`reinspect-menu-section-caption`,children:[Fe.length,`/`,H.editableProps.length]})]}),(0,u.jsxs)(`div`,{className:`reinspect-menu-filter`,children:[(0,u.jsx)(`span`,{className:`reinspect-menu-filter-icon`,"aria-hidden":`true`,children:(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,focusable:`false`,children:(0,u.jsx)(`path`,{d:`M10.5 3a7.5 7.5 0 015.92 12.1l4.24 4.23a1 1 0 01-1.42 1.42l-4.23-4.24A7.5 7.5 0 1110.5 3zm0 2a5.5 5.5 0 100 11 5.5 5.5 0 000-11z`,fill:`currentColor`})})}),(0,u.jsx)(`input`,{id:`${G}-css-filter`,"data-testid":`reinspect-css-filter-input`,type:`search`,value:S,placeholder:`Filter`,"aria-label":`Filter CSS properties`,onChange:e=>C(e.currentTarget.value)}),S.trim().length>0?(0,u.jsx)(`button`,{type:`button`,className:`reinspect-menu-filter-clear`,onClick:()=>C(``),"aria-label":`Clear CSS filter`,children:`Clear`}):null]}),(0,u.jsx)(`div`,{className:`reinspect-menu-grid`,children:Fe.map(e=>{let t=Me?.[e],n=`${G}-${e}`;if(te.has(e)){let r=De(typeof t==`string`?t:ce[e]);return(0,u.jsxs)(`div`,{className:`reinspect-field`,children:[(0,u.jsx)(`label`,{htmlFor:n,children:Tt(e)}),(0,u.jsxs)(`div`,{className:`reinspect-inline-controls`,children:[(0,u.jsx)(`input`,{id:n,type:`color`,value:r,onChange:t=>W(G,e,t.currentTarget.value)}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>W(G,e,void 0),disabled:!Dt(t),children:`reset`})]})]},e)}if(e===`opacity`){let r=typeof t==`number`?t:Ve(ce[e])??1;return(0,u.jsxs)(`div`,{className:`reinspect-field`,children:[(0,u.jsx)(`label`,{htmlFor:n,children:`Opacity`}),(0,u.jsxs)(`div`,{className:`reinspect-inline-controls reinspect-opacity-controls`,children:[(0,u.jsx)(`input`,{id:n,type:`range`,min:`0`,max:`1`,step:`0.05`,value:r,onChange:t=>{let n=Oe(t.currentTarget.value);n!==void 0&&W(G,e,n)}}),(0,u.jsx)(`output`,{children:r.toFixed(2)}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>W(G,e,void 0),disabled:!Dt(t),children:`reset`})]})]},e)}if(ne.has(e)){let r=typeof t==`number`?t:Ve(ce[e])??``;return(0,u.jsxs)(`div`,{className:`reinspect-field`,children:[(0,u.jsxs)(`label`,{htmlFor:n,children:[Tt(e),` (px)`]}),(0,u.jsxs)(`div`,{className:`reinspect-inline-controls`,children:[(0,u.jsx)(`input`,{id:n,type:`number`,step:`1`,value:r,onChange:t=>{if(t.currentTarget.value===``){W(G,e,void 0);return}let n=Oe(t.currentTarget.value);n!==void 0&&W(G,e,n)}}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>W(G,e,void 0),disabled:!Dt(t),children:`reset`})]})]},e)}return(0,u.jsxs)(`div`,{className:`reinspect-field`,children:[(0,u.jsx)(`label`,{htmlFor:n,children:Tt(e)}),(0,u.jsxs)(`div`,{className:`reinspect-inline-controls`,children:[(0,u.jsx)(`input`,{id:n,type:`text`,value:typeof t==`string`?t:ce[e]??``,onChange:t=>W(G,e,t.currentTarget.value||void 0)}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>W(G,e,void 0),disabled:!Dt(t),children:`reset`})]})]},e)})}),Fe.length===0?(0,u.jsxs)(`p`,{className:`reinspect-menu-empty-state`,children:[`No CSS properties match "`,S.trim(),`".`]}):null]}):null,v===`props`?(0,u.jsxs)(`div`,{className:`reinspect-props-panel`,children:[(0,u.jsxs)(`div`,{className:`reinspect-props-submenu`,children:[(0,u.jsx)(`button`,{type:`button`,"data-state":b===`detected`?`active`:`idle`,onClick:()=>x(`detected`),children:`Detected`}),(0,u.jsx)(`button`,{type:`button`,"data-state":b===`raw`?`active`:`idle`,onClick:()=>{x(`raw`),k(null),D(qe(Ft(Pe),{mode:U}))},children:`Raw`})]}),b===`detected`?Ie.length>0?(0,u.jsx)(`div`,{className:`reinspect-props-table`,children:Ie.map(e=>{let t=Ot(e.key),n=Pe[e.key],r=e.value.kind===`object`||e.value.kind===`array`,i=!!ie[e.key],a=M[e.key],o=P[e.key],s=e.key===`children`?Xe(n):Ye(n);return(0,u.jsxs)(`div`,{className:`reinspect-props-row`,"data-testid":`reinspect-prop-row-${t}`,children:[(0,u.jsx)(`code`,{className:`reinspect-prop-key`,children:e.key}),(0,u.jsxs)(`div`,{className:`reinspect-prop-cell`,"data-testid":`reinspect-prop-value-${t}`,children:[(0,u.jsxs)(`div`,{className:`reinspect-prop-main`,children:[(0,u.jsx)(`div`,{className:`reinspect-prop-value-render`,children:gt({value:e.value})}),r||s||e.value.copyText?(0,u.jsxs)(`div`,{className:`reinspect-prop-actions`,children:[r?(0,u.jsx)(`button`,{type:`button`,"data-testid":`reinspect-prop-show-json-${t}`,onClick:()=>et(e.key,n),className:`reinspect-prop-action-text-button`,title:i?`Collapse JSON preview`:`Expand JSON preview`,"aria-label":i?`Collapse JSON preview for ${e.key}`:`Expand JSON preview for ${e.key}`,children:i?`Collapse JSON`:`Expand JSON`}):null,s?(0,u.jsx)(`button`,{type:`button`,"data-testid":`reinspect-prop-edit-${t}`,onClick:()=>tt(e.key,n),className:`reinspect-icon-button`,title:`Edit value`,"aria-label":`Edit ${e.key}`,children:Lt()}):null,r||e.value.copyText?(0,u.jsx)(`button`,{type:`button`,className:`reinspect-icon-button`,title:e.value.kind===`function`?`Copy function source`:r?`Copy JSON`:`Copy value`,"aria-label":e.value.kind===`function`?`Copy function source`:r?`Copy JSON for ${e.key}`:`Copy value for ${e.key}`,onClick:()=>{if(r){$e(e.key,n);return}e.value.copyText&&Ge(e.value.copyText,e.value.kind===`function`?`Function source`:`Value`)},children:It()}):null]}):null]}),i?(0,u.jsx)(`div`,{className:`reinspect-prop-json-preview`,"data-testid":`reinspect-prop-json-preview-${t}`,children:o?(0,u.jsx)(`p`,{className:`reinspect-error`,children:o}):(0,u.jsx)(`pre`,{children:(0,u.jsx)(`code`,{className:`language-json reinspect-code-block`,dangerouslySetInnerHTML:{__html:ht(a??``,`json`)}})})}):null]})]},e.key)})}):(0,u.jsx)(`p`,{className:`reinspect-menu-empty-state`,children:`No props detected.`}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`label`,{htmlFor:`${G}-props-json`,children:`Props JSON`}),(0,u.jsxs)(`div`,{className:`reinspect-json-editor`,children:[(0,u.jsx)(`pre`,{"aria-hidden":`true`,ref:p,children:(0,u.jsx)(`code`,{className:`language-json reinspect-code-block`,dangerouslySetInnerHTML:{__html:ht(E,`json`)}})}),(0,u.jsx)(`textarea`,{id:`${G}-props-json`,value:E,onChange:e=>{D(e.currentTarget.value),k(null)},onScroll:e=>{let t=p.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)},rows:9,spellCheck:!1,className:`reinspect-json-editor-textarea`,"data-testid":`reinspect-raw-props-textarea`})]}),O?(0,u.jsx)(`p`,{className:`reinspect-error`,children:O}):null,(0,u.jsxs)(`div`,{className:`reinspect-inline-controls`,children:[(0,u.jsx)(`button`,{type:`button`,onClick:Ue,children:`apply`}),(0,u.jsx)(`button`,{type:`button`,onClick:We,children:`reset`})]})]}),A?(0,u.jsx)(`p`,{className:`reinspect-setting-note`,"data-testid":`reinspect-props-copy-status`,children:A}):null]}):null]}):null,lt=I?(0,d.createPortal)((0,u.jsx)(`div`,{className:`reinspect-modal-backdrop`,"data-reinspect-theme":fe,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit ${I} prop`,"data-testid":`reinspect-prop-edit-modal`,children:(0,u.jsxs)(`div`,{className:`reinspect-modal`,"data-reinspect-theme":fe,ref:c,tabIndex:-1,children:[(0,u.jsxs)(`p`,{className:`reinspect-menu-title`,children:[`Edit prop: `,I]}),(0,u.jsx)(`label`,{htmlFor:`${G}-prop-edit-json`,children:`JSON value`}),(0,u.jsx)(`textarea`,{id:`${G}-prop-edit-json`,"data-testid":`reinspect-prop-edit-textarea`,value:ae,onChange:e=>{R(e.currentTarget.value),z(null)},rows:10}),oe?(0,u.jsx)(`p`,{className:`reinspect-error`,"data-testid":`reinspect-prop-edit-error`,children:oe}):null,(0,u.jsxs)(`div`,{className:`reinspect-inline-controls`,children:[(0,u.jsx)(`button`,{type:`button`,onClick:nt,children:`apply`}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>{L(null),R(``),z(null)},children:`cancel`})]})]})}),document.body):null,ut=B?(0,d.createPortal)((0,u.jsxs)(`div`,{className:`reinspect-toast`,"data-reinspect-theme":fe,role:`status`,"aria-live":`polite`,"data-testid":`reinspect-hide-component-toast`,children:[(0,u.jsxs)(`div`,{className:`reinspect-toast-copy`,children:[(0,u.jsxs)(`p`,{className:`reinspect-toast-title`,children:[`Hidden `,B.componentName]}),(0,u.jsx)(`p`,{className:`reinspect-toast-description`,children:`This component type was excluded from inspection.`})]}),(0,u.jsx)(`button`,{type:`button`,className:`reinspect-toast-undo`,"data-testid":`reinspect-hide-component-undo`,onClick:at,children:`Undo`}),(0,u.jsx)(`button`,{type:`button`,className:`reinspect-toast-dismiss`,"aria-label":`Dismiss notification`,onClick:()=>se(null),children:`×`})]}),document.body):null;if(!ue){if(n===`manual`)throw Error(`useReinspect must be used within ReinspectProvider`);return(0,u.jsx)(a,{...X})}let dt=je?(0,u.jsx)(l.Profiler,{id:G,onRender:Re,children:(0,u.jsx)(a,{...X})}):(0,u.jsx)(a,{...X});return!q&&!Z?(0,u.jsxs)(u.Fragment,{children:[dt,ut]}):(0,u.jsxs)(`div`,{ref:i,className:`reinspect-shell`,"data-reinspect-component":o,"data-reinspect-active":q,"data-testid":`reinspect-shell-${o}`,style:ze,tabIndex:-1,onContextMenu:He,children:[q?(0,u.jsxs)(`span`,{className:`reinspect-name-badge`,children:[o,J?` | `:``,J?(0,u.jsx)(_t,{instanceId:G,counterMode:Ae}):null]}):null,st?(0,d.createPortal)(st,document.body):null,lt,ut,(0,u.jsx)(`div`,{className:`reinspect-content`,"data-reinspect-content":`true`,style:Ne,children:dt})]})}return s.displayName=`withReinspect(${o})`,tt(s,{source:n,scope:r,original:a}),s}Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return g}});
package/package.json CHANGED
@@ -1,9 +1,28 @@
1
1
  {
2
2
  "name": "react-reinspect",
3
- "version": "0.1.8",
4
- "description": "Visual runtime inspector for React components with render counters and style overrides.",
3
+ "version": "0.2.0",
4
+ "description": "Visual runtime inspector for React components.",
5
+ "homepage": "https://github.com/rinslow/react-reinspect",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/rinslow/react-reinspect.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/rinslow/react-reinspect/issues"
12
+ },
13
+ "author": {
14
+ "name": "Dan Elkis",
15
+ "url": "https://github.com/rinslow"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
5
20
  "keywords": [
6
21
  "react",
22
+ "component",
23
+ "inspect",
24
+ "ui",
25
+ "ai",
7
26
  "debug",
8
27
  "devtools",
9
28
  "inspector"
@@ -72,6 +91,7 @@
72
91
  "@testing-library/user-event": "^14.6.1",
73
92
  "@types/babel__generator": "^7.27.0",
74
93
  "@types/node": "^24.12.2",
94
+ "@types/prismjs": "^1.26.6",
75
95
  "@types/react": "^19.2.14",
76
96
  "@types/react-dom": "^19.2.3",
77
97
  "@vitejs/plugin-react": "^6.0.1",
@@ -87,5 +107,8 @@
87
107
  "typescript-eslint": "^8.58.1",
88
108
  "vite": "^8.0.8",
89
109
  "vitest": "^4.1.4"
110
+ },
111
+ "dependencies": {
112
+ "prismjs": "^1.30.0"
90
113
  }
91
114
  }