@puzzmo/sdk 1.0.62 → 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-350yNsax.cjs +1 -0
- package/dist/createSimulator-Ce3StrQI.cjs +1930 -0
- package/dist/createSimulator-Ce3StrQI.cjs.map +1 -0
- package/dist/{createSimulator-CdInpCHG.js → createSimulator-DUZOd1Hx.js} +2231 -439
- package/dist/createSimulator-DUZOd1Hx.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/inputs/index.cjs +1 -1
- package/dist/inputs/index.cjs.map +1 -1
- package/dist/inputs/index.js +1 -1
- package/dist/{lua-QeU9Rzet.cjs → lua-CclI-QKD.cjs} +1 -1
- package/dist/{lua-QeU9Rzet.cjs.map → lua-CclI-QKD.cjs.map} +1 -1
- package/dist/pico8/index.cjs +1 -1
- package/dist/pico8/index.js +2 -2
- package/dist/simulator/checklistProgress.d.ts +34 -0
- package/dist/simulator/checklistProgress.d.ts.map +1 -0
- package/dist/simulator/checklistProgress.spec.d.ts +2 -0
- package/dist/simulator/checklistProgress.spec.d.ts.map +1 -0
- package/dist/simulator/createSimulator.d.ts.map +1 -1
- package/dist/simulator/index.cjs +1 -1
- package/dist/simulator/index.js +1 -1
- package/dist/simulator/standalone.cjs +1 -1
- package/dist/simulator/standalone.js +1 -1
- package/dist/simulator/styles.d.ts +1 -1
- package/dist/simulator/styles.d.ts.map +1 -1
- package/dist/simulator/types.d.ts +25 -0
- package/dist/simulator/types.d.ts.map +1 -1
- package/dist/simulator/views/ChecklistView.d.ts +4 -0
- package/dist/simulator/views/ChecklistView.d.ts.map +1 -0
- package/dist/simulator/views/index.d.ts +1 -0
- package/dist/simulator/views/index.d.ts.map +1 -1
- package/dist/vite.cjs +5 -5
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.ts +3 -1
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +20 -7
- package/dist/vite.js.map +1 -1
- package/package.json +1 -1
- package/dist/createSimulator-CdInpCHG.js.map +0 -1
- package/dist/createSimulator-PNeBoNux.cjs +0 -1775
- package/dist/createSimulator-PNeBoNux.cjs.map +0 -1
- /package/dist/{asyncToGenerator-BotOOyB7.js → asyncToGenerator-DSd3oTwb.js} +0 -0
- /package/dist/{asyncToGenerator-DIL7svO7.cjs → asyncToGenerator-Tjg_Hpik.cjs} +0 -0
- /package/dist/{objectSpread2-BQwrzeNG.js → objectSpread2-BJrS9rM5.js} +0 -0
- /package/dist/{objectSpread2-CCAs_T0X.cjs → objectSpread2-BU9HzoRm.cjs} +0 -0
- /package/dist/{objectWithoutProperties-Bjd1IAMi.js → objectWithoutProperties-54Cbyogk.js} +0 -0
- /package/dist/{objectWithoutProperties-Ee8z5QMa.cjs → objectWithoutProperties-CL_8JSCP.cjs} +0 -0
|
@@ -1,1775 +0,0 @@
|
|
|
1
|
-
const e=require(`./objectSpread2-CCAs_T0X.cjs`),t=require(`./asyncToGenerator-DIL7svO7.cjs`),n=[{name:`Puzzmo (light)`,type:`light`,key:`#FFAAAC`,keyFG:`#000000`,keyStrong:`#F7868B`,keyLight:`#FFD2D3`,g_key:`#FFAAAC`,subBrand:`#FFC000`,subBrandFG:`#000000`,player:`#5DBAFC`,playerFG:`#000000`,playerLight:`#9EDDFF`,alt1:`#98B389`,alt2:`#FAC16C`,alt3:`#D298FF`,fg:`#000000`,error:`#FF3C3C`,alwaysDark:`#1B1D29`,alwaysLight:`#FFFFFF`,g_bg:`#FFFFFF`,g_bgAlt:`#EBEBEB`,g_bgDark:`#D6D6D6`,g_textDark:`#1B1B28`,g_textLight:`#FFFFFF`,g_blank:`#000000`,g_unsolved:`#C2C2C2`,g_outline:`#1B1D29`,a_bg:`#F2F2F2`,a_bgAlt:`#ECECEC`,a_puzmo:`#FFC000`,a_headerText:`#000000`,a_table:`#F9F9F9`,a_tableAlt:`#F6F4F4`,a_inlineTag:`#D9D9D9`,a_anchor:`#1F97EE`,a_infoBG:`#FFFFFF`},{name:`Puzzmo (dark)`,type:`dark`,key:`#FFAAAC`,keyFG:`#000000`,keyStrong:`#F7868B`,keyLight:`#FFD2D3`,g_key:`#FFAAAC`,player:`#5DBAFC`,playerFG:`#000000`,playerLight:`#9EDDFF`,subBrand:`#FFC000`,subBrandFG:`#000000`,alt1:`#98B389`,alt2:`#FAC16C`,alt3:`#D298FF`,error:`#FF3C3C`,fg:`#ECECEC`,alwaysDark:`#1B1D29`,alwaysLight:`#FFFFFF`,g_bg:`#374351`,g_bgAlt:`#333D49`,g_bgDark:`#2C2F33`,g_textDark:`#F2F2F2`,g_textLight:`#20180E`,g_blank:`#000000`,g_unsolved:`#747474`,g_outline:`#646464`,a_bg:`#141620`,a_bgAlt:`#202433`,a_puzmo:`#FFC000`,a_headerText:`#A1BAD4`,a_table:`#303246`,a_tableAlt:`#393b52`,a_inlineTag:`#ECECEC`,a_anchor:`#1F97EE`,a_infoBG:`#282C3A`},{name:`Foshay`,type:`light`,key:`#98B389`,keyFG:`#313540`,keyStrong:`#87BD69`,keyLight:`#809B77`,g_key:`#98B389`,player:`#3EC0E5`,subBrand:`#FFC000`,subBrandFG:`#000000`,playerFG:`#292B35`,playerLight:`#A8B5D6`,alt1:`#D87DA4`,alt2:`#E3A54F`,alt3:`#D298FF`,error:`#FF3C3C`,fg:`#292B35`,alwaysDark:`#292B35`,alwaysLight:`#D1DBF2`,g_bg:`#949EBA`,g_bgAlt:`#8891AB`,g_bgDark:`#7B839B`,g_textDark:`#292B35`,g_textLight:`#FFFFFF`,g_blank:`#292B35`,g_unsolved:`#B6B7BA`,g_outline:`#676F83`,a_bg:`#828CA3`,a_bgAlt:`#7F889F`,a_puzmo:`#FFC000`,a_headerText:`#292B35`,a_table:`#7A8399`,a_tableAlt:`#767E94`,a_inlineTag:`#ECECEC`,a_anchor:`#56C9E9`,a_infoBG:`#767F95`},{name:`Bright white`,type:`light`,key:`#67ced2`,keyFG:`#000000`,keyStrong:`#26a0a5`,keyLight:`#ade6e9`,g_key:`#67ced2`,subBrand:`#FFC000`,subBrandFG:`#000000`,player:`#5DBAFC`,playerFG:`#000000`,playerLight:`#9EDDFF`,alt1:`#d26767`,alt2:`#fac16c`,alt3:`#7580bd`,fg:`#000000`,error:`#FF3C3C`,alwaysDark:`#111111`,alwaysLight:`#FFFFFF`,g_bg:`#f6f6f6`,g_bgAlt:`#F4F4F4`,g_bgDark:`#D6D6D6`,g_textDark:`#1B1B28`,g_textLight:`#FFFFFF`,g_blank:`#000000`,g_unsolved:`#C2C2C2`,g_outline:`#1B1D29`,a_bg:`#FFFFFF`,a_bgAlt:`#f8fbfc`,a_puzmo:`#FFC000`,a_headerText:`#000000`,a_table:`#EDEDED`,a_tableAlt:`#DBDBDB`,a_inlineTag:`#D9D9D9`,a_anchor:`#1F97EE`,a_infoBG:`#f6f6f6`},{name:`Submersible`,type:`dark`,key:`#CD6DC6`,keyFG:`#031698`,keyStrong:`#FF7ABC`,keyLight:`#B467CB`,g_key:`#CD6DC6`,subBrand:`#FFC000`,subBrandFG:`#000000`,player:`#4AB1D1`,playerFG:`#071D47`,playerLight:`#3C99D7`,alt1:`#8BA964`,alt2:`#C69A58`,alt3:`#7644B5`,fg:`#FFEBFF`,error:`#FF3C3C`,alwaysDark:`#031698`,alwaysLight:`#FFEBFF`,g_bg:`#043BED`,g_bgAlt:`#0A31CC`,g_bgDark:`#0E2DA8`,g_textDark:`#031698`,g_textLight:`#FFEBFF`,g_blank:`#031698`,g_unsolved:`#3662F1`,g_outline:`#031698`,a_bg:`#043BED`,a_bgAlt:`#0A31CC`,a_puzmo:`#FFC000`,a_headerText:`#FFEBFF`,a_table:`#043BED`,a_tableAlt:`#0A31CC`,a_inlineTag:`#FF7ABC`,a_anchor:`#FF7ABC`,a_infoBG:`#0A31CC`},{name:`Hot Dog (beta)`,type:`light`,key:`#FFFF00`,keyFG:`#000000`,keyStrong:`#FFE600`,keyLight:`#FFEC44`,g_key:`#FFFF00`,subBrand:`#FFC000`,subBrandFG:`#000000`,player:`#FF7A00`,playerFG:`#000000`,playerLight:`#FFA450`,alt1:`#3ABC5E`,alt2:`#5C3ABC`,alt3:`#BC3AAF`,fg:`#000000`,error:`#FF3C3C`,alwaysDark:`#1B1D29`,alwaysLight:`#FFFFFF`,g_bg:`#EBFF00`,g_bgAlt:`#EBEBEB`,g_bgDark:`#D6D6D6`,g_textDark:`#1B1B28`,g_textLight:`#FFFFFF`,g_blank:`#000000`,g_unsolved:`#C2C2C2`,g_outline:`#1B1D29`,a_bg:`#FF0000`,a_bgAlt:`#E50000`,a_puzmo:`#FFC000`,a_headerText:`#FFFFFF`,a_table:`#E50000`,a_tableAlt:`#FF2525`,a_inlineTag:`#000000`,a_anchor:`#000000`,a_infoBG:`#C6C6C6`},{name:`Outlook Hayesy`,type:`light`,key:`#DAB98C`,keyFG:`#000000`,keyStrong:`#B99368`,keyLight:`#DAB98C`,subBrand:`#FFC000`,subBrandFG:`#000000`,g_key:`#DAB98C`,player:`#5DBAFC`,playerFG:`#000000`,playerLight:`#9EDDFF`,alt1:`#5EC386`,alt2:`#5E93C3`,alt3:`#C35E5E`,fg:`#000000`,error:`#FF3C3C`,alwaysDark:`#5E390F`,alwaysLight:`#FFF3E4`,g_bg:`#FFFFFF`,g_bgAlt:`#EBEBEB`,g_bgDark:`#D6D6D6`,g_textDark:`#1B1B28`,g_textLight:`#FFFFFF`,g_blank:`#000000`,g_unsolved:`#C2C2C2`,g_outline:`#1B1D29`,a_bg:`#FEF5E8`,a_bgAlt:`#ffffff`,a_puzmo:`#FAC7CE`,a_headerText:`#000000`,a_table:`#FAE8D3`,a_tableAlt:`#EED7BC`,a_inlineTag:`#D9D9D9`,a_anchor:`#B99368`,a_infoBG:`#FFFFFF`},{name:`Console (beta)`,type:`dark`,key:`#957df9`,keyFG:`#000000`,keyStrong:`#590FF5`,keyLight:`#590FF5`,subBrand:`#FFC000`,subBrandFG:`#000000`,g_key:`#FFFF00`,player:`#ffffff`,playerFG:`#000000`,playerLight:`#9EDDFF`,alt1:`#590ff5`,alt2:`#00e200`,alt3:`#ff8a02`,fg:`#00e200`,error:`#FF3C3C`,alwaysDark:`#1B1D29`,alwaysLight:`#00e200`,g_bg:`#101428`,g_bgAlt:`#101428`,g_bgDark:`#00e200`,g_textDark:`#00e200`,g_textLight:`#590ff5`,g_blank:`#00e200`,g_unsolved:`#0000ff`,g_outline:`#00e200`,a_bg:`#000000`,a_bgAlt:`#112211`,a_puzmo:`#ffffff`,a_headerText:`#00e200`,a_table:`#000000`,a_tableAlt:`#002200`,a_inlineTag:`#D9D9D9`,a_anchor:`#957df9`,a_infoBG:`#001900`}];var r={collapsed:`simulator-collapsed`,tab:`simulator-tab`,theme:`simulator-theme`,fixtureCategory:`simulator-fixture-category`,fixturePuzzle:`simulator-fixture-puzzle`,renderHost:`simulator-render-host`,renderContext:`simulator-render-context`,previewKind:`simulator-preview-kind`,gameSettings:`simulator-game-settings`,hostContext:`simulator-host-context`,keyboardDocked:`simulator-keyboard-docked`},i=`simulator-override:`;function a(e){return`${i}${e}:${(window.location.pathname||`/`).replace(/\/index\.html$/,``).replace(/\/+$/,``)||`/`}`}function o(e){try{return localStorage.getItem(a(e))}catch(e){return null}}function s(e,t){try{return localStorage.setItem(a(e),t),!0}catch(e){return!1}}function c(e){try{localStorage.removeItem(a(e))}catch(e){}}function l(){c(`puzzle`),c(`input`)}function u(){let e=localStorage.getItem(r.hostContext);if(!e)return null;try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch(e){}return null}function d(e){localStorage.setItem(r.hostContext,JSON.stringify(e))}function f(){localStorage.removeItem(r.hostContext)}function p(){return localStorage.getItem(r.keyboardDocked)===`true`}function m(e){localStorage.setItem(r.keyboardDocked,String(e))}function h(){let e=localStorage.getItem(r.gameSettings);if(!e)return{};try{let t=JSON.parse(e);if(t&&typeof t==`object`)return t}catch(e){}return{}}function g(){let e=localStorage.getItem(r.theme);if(e){let t=n.find(t=>t.name===e);if(t)return t}return n[0]}function _(e){var t;let n=localStorage.getItem(r.tab);return n&&e.includes(n)?n:(t=e[0])==null?`ctrl`:t}function v(e){let t=localStorage.getItem(r.collapsed);return t===null?e:t===`true`}function y(){let e=localStorage.getItem(r.renderHost);return e&&[`game`,`app`,`opengraph`].includes(e)?e:`game`}function b(){return localStorage.getItem(r.previewKind)===`text`?`text`:`image`}function x(){let e=localStorage.getItem(r.renderContext);if(e&&[`preview`,`share`,`completed`,`timeline`].includes(e))return e}function ee(e,t,n){var i,a,s;let c=localStorage.getItem(r.fixtureCategory),l=localStorage.getItem(r.fixturePuzzle),d=u(),f=o(`puzzle`),m=o(`input`);return{hostContext:(i=d==null?e.hostContext:d)==null?[{type:`app`,layout:`desktop`,host:null}]:i,hostContextIsOverridden:d!==null,isCollapsed:v((a=e.collapsed)==null?!0:a),isPaused:!1,hasStarted:!1,activeTab:_(n),puzzleData:f,originalPuzzle:f==null?``:f,currentInputStr:m==null?``:m,appliedPuzzleOverride:f,appliedInputOverride:m,completionData:null,selectedTheme:g(),selectedCategory:c&&t.includes(c)?c:(s=t[0])==null?null:s,selectedPuzzle:l==null?null:l,renderHost:y(),renderContext:x(),previewKind:b(),gameSettings:h(),keyboardDocked:p(),settingsComponents:null}}function S(e){localStorage.setItem(r.gameSettings,JSON.stringify(e))}function C(){localStorage.removeItem(r.gameSettings)}function te(e){localStorage.setItem(r.collapsed,String(e))}function ne(e){localStorage.setItem(r.tab,e)}function w(e){localStorage.setItem(r.theme,e)}function T(e){localStorage.setItem(r.fixtureCategory,e)}function E(e){localStorage.setItem(r.fixturePuzzle,e)}function D(){localStorage.removeItem(r.fixturePuzzle)}function O(e){e?localStorage.setItem(r.renderHost,e):localStorage.removeItem(r.renderHost)}function k(e){localStorage.setItem(r.previewKind,e)}function A(e){e?localStorage.setItem(r.renderContext,e):localStorage.removeItem(r.renderContext)}function re(e){let t=[];return{log(n,r,i){let a={type:n,data:r,time:new Date().toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),direction:i};t.push(a),t.length>100&&t.shift(),e==null||e(a)},clear(){t.length=0},getLog(){return t}}}function ie(e,t,n){console.log(`Simulator sending:`,e,t),n==null||n.log(e,t,`out`),window.postMessage({type:e,data:t},`*`)}function ae(e,t){let n=n=>{var r,i,a;if(!(!(n==null||(r=n.data)==null)&&r.type))return;let o=n.data.type,s=(i=(a=n.data.data)==null?n.data.json:a)==null?{}:i;[`TIMER_TICK`,`TIMER_SYNC`].includes(o)||t==null||t.log(o,s,`in`),e(o,s)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)}function oe(e){let t=new Map;console.log(`Simulator: Parsing fixtures`,Object.keys(e));for(let[o,s]of Object.entries(e)){var n,r,i,a;let e=o.split(`/`),c=(n=(r=e.pop())==null?void 0:r.replace(/\.[^.]+$/,``))==null?``:n,l=(i=e.pop())==null?`default`:i;t.has(l)||t.set(l,new Map);let u=(a=s.default)==null?s:a;t.get(l).set(c,u)}return t.forEach((e,n)=>{let r=new Map(Array.from(e.entries()).sort((e,t)=>{var n,r,i,a;return parseInt((n=(r=e[0].match(/\d+/))==null?void 0:r[0])==null?`0`:n)-parseInt((i=(a=t[0].match(/\d+/))==null?void 0:a[0])==null?`0`:i)}));t.set(n,r)}),t}function j(e,t){return e.length===0?``:`
|
|
2
|
-
<div class="simulator-fixtures">
|
|
3
|
-
<div class="simulator-field">
|
|
4
|
-
<label class="simulator-label">Category</label>
|
|
5
|
-
<select class="simulator-select" id="simulator-fixture-category">
|
|
6
|
-
${e.map(e=>`<option value="${e}" ${e===t?`selected`:``}>${e}</option>`).join(``)}
|
|
7
|
-
</select>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="simulator-field">
|
|
10
|
-
<label class="simulator-label">Puzzle</label>
|
|
11
|
-
<select class="simulator-select" id="simulator-fixture-puzzle"></select>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
`}function M(e,t,n,r){let i=t.get(n);if(!i)return null;let a=Array.from(i.keys()),o=r;if(!r||!i.has(r)){var s;o=(s=a[0])==null?null:s}return e.innerHTML=a.map(e=>`<option value="${e}" ${e===o?`selected`:``}>${e}</option>`).join(``),o}function N(e,t,n){var r,i;return!t||!n||(r=(i=e.get(t))==null?void 0:i.get(n))==null?null:r}const se=`puzzmo-simulator-dev-only-do-not-ship`;function ce(){return{id:`ctrl`,label:`Ctrl`,render(){return`
|
|
15
|
-
<div id="simulator-fixtures-container"></div>
|
|
16
|
-
<div id="simulator-status">
|
|
17
|
-
<span class="indicator waiting"></span>
|
|
18
|
-
<span class="text">Waiting for READY...</span>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="simulator-row">
|
|
21
|
-
<button class="simulator-btn primary" id="simulator-start" disabled>Start</button>
|
|
22
|
-
<button class="simulator-btn" id="simulator-pause" disabled>Pause</button>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="simulator-row">
|
|
25
|
-
<button class="simulator-btn danger" id="simulator-retry" disabled>Retry</button>
|
|
26
|
-
</div>
|
|
27
|
-
`},bind(e){let t=e.getElement(`#simulator-start`),n=e.getElement(`#simulator-pause`),r=e.getElement(`#simulator-retry`),i=e.getElement(`#simulator-fixtures-container`);if(console.log(`Simulator: CtrlView.bind called`,{hasFixtures:!!e.fixtures,categories:e.fixtureCategories,selectedCategory:e.state.selectedCategory,selectedPuzzle:e.state.selectedPuzzle}),e.fixtures&&e.fixtureCategories.length>0&&i){i.innerHTML=j(e.fixtureCategories,e.state.selectedCategory);let t=e.getElement(`#simulator-fixture-category`),n=e.getElement(`#simulator-fixture-puzzle`);if(t&&n&&e.state.selectedCategory){e.state.selectedPuzzle=M(n,e.fixtures,e.state.selectedCategory,e.state.selectedPuzzle);let r=N(e.fixtures,e.state.selectedCategory,e.state.selectedPuzzle);console.log(`Simulator: Loading fixture puzzle`,{category:e.state.selectedCategory,puzzle:e.state.selectedPuzzle,hasPuzzleData:!!r}),r&&(e.state.appliedPuzzleOverride===null&&(e.state.puzzleData=r,e.state.originalPuzzle=r),e.state.selectedCategory&&T(e.state.selectedCategory),e.state.selectedPuzzle&&E(e.state.selectedPuzzle)),t.addEventListener(`change`,()=>{console.log(`Simulator: Category changed, reloading...`,t.value),l(),T(t.value),D(),window.location.reload()}),n.addEventListener(`change`,()=>{console.log(`Simulator: Puzzle changed, reloading...`,n.value),l(),E(n.value),window.location.reload()})}}t==null||t.addEventListener(`click`,()=>{e.state.isPaused?(e.sendToGame(`RESUME_GAME`,{}),e.state.isPaused=!1,n&&(n.textContent=`Pause`),e.updateStatus(`Running`,`ready`)):(e.sendToGame(`START_GAME`,void 0),e.state.hasStarted=!0,n&&(n.disabled=!1),t&&(t.textContent=`Resume`),e.updateStatus(`Running`,`ready`))}),n==null||n.addEventListener(`click`,()=>{e.state.isPaused?(e.sendToGame(`RESUME_GAME`,{}),e.state.isPaused=!1,n.textContent=`Pause`,e.updateStatus(`Running`,`ready`)):(e.sendToGame(`PAUSE_GAME`,{}),e.state.isPaused=!0,n.textContent=`Resume`,e.updateStatus(`Paused`,`paused`))}),r==null||r.addEventListener(`click`,()=>{e.sendToGame(`RETRY_PUZZLE`,{}),e.state.hasStarted=!1,e.state.isPaused=!1,n&&(n.disabled=!0,n.textContent=`Pause`),t&&(t.textContent=`Start`),e.updateStatus(`Ready to retry`,`ready`)})},onMessage(e,t,n){let r=n.getElement(`#simulator-start`),i=n.getElement(`#simulator-pause`),a=n.getElement(`#simulator-retry`);e===`READY_GAME_LOADED`&&(r&&(r.disabled=!1),a&&(a.disabled=!1),n.updateStatus(`Ready`,`ready`)),e===`GAME_COMPLETED`&&(n.state.hasStarted=!1,i&&(i.disabled=!0),r&&(r.disabled=!0),n.updateStatus(`Completed!`,`complete`))}}}function P(e){var t;if(typeof e!=`string`)return e;let n=(t=F(e))==null?{width:800,height:800}:t;return{svg:e,width:n.width,height:n.height}}function F(e){var t,n,r,i;let a=e.indexOf(`<svg`);if(a===-1)return;let o=e.indexOf(`>`,a),s=o===-1?e.slice(a):e.slice(a,o+1),c=/viewBox\s*=\s*["']\s*[-\d.]+[\s,]+[-\d.]+[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(s);if(c){let e=parseFloat(c[1]),t=parseFloat(c[2]);if(e>0&&t>0)return{width:e,height:t}}let l=parseFloat((t=(n=/\bwidth\s*=\s*["']\s*([\d.]+)(?:px)?\s*["']/i.exec(s))==null?void 0:n[1])==null?``:t),u=parseFloat((r=(i=/\bheight\s*=\s*["']\s*([\d.]+)(?:px)?\s*["']/i.exec(s))==null?void 0:i[1])==null?``:r);if(l>0&&u>0)return{width:l,height:u}}var I=`simulator-saved-states`;function L(){let e=globalThis;for(let t of Object.keys(e))if(t.endsWith(`Thumbnail`)&&typeof e[t]==`function`)return{name:t,fn:e[t]};return null}function R(e,t){let n=L();if(!n)return``;try{var r;let i=(r=e.state.puzzleData)==null?``:r,a={viewerIsOwner:!0,theme:e.state.selectedTheme,strict:!0,renderHost:`game`};return P(n.fn(i,t,a)).svg}catch(e){return``}}var z=[];function B(e,t=8){let n=14*t+8+4;e.style.height=`auto`;let r=Math.min(Math.max(e.scrollHeight,40),n);e.style.height=`${r}px`}function le(){let e=``,t=``;return{id:`data`,label:`Data`,render(){return`
|
|
28
|
-
<div class="data-view-container">
|
|
29
|
-
<div class="data-subtabs">
|
|
30
|
-
<button class="data-subtab active" data-subtab="edit">Edit</button>
|
|
31
|
-
<button class="data-subtab" data-subtab="history">History</button>
|
|
32
|
-
<button class="data-subtab" data-subtab="saves">Saves</button>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div class="data-subtab-content active" id="data-subtab-edit">
|
|
36
|
-
<div class="simulator-field">
|
|
37
|
-
<label class="simulator-label">
|
|
38
|
-
Puzzle String<span class="simulator-override-tag" id="simulator-puzzle-override-tag" hidden>applied</span>
|
|
39
|
-
</label>
|
|
40
|
-
<textarea class="simulator-textarea auto-resize" id="simulator-puzzle" placeholder="Loading..."></textarea>
|
|
41
|
-
<div class="simulator-row">
|
|
42
|
-
<button class="simulator-btn subtle" id="simulator-puzzle-reset">Reset</button>
|
|
43
|
-
<button class="simulator-btn primary" id="simulator-puzzle-apply" disabled>Apply</button>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="simulator-divider"></div>
|
|
47
|
-
<div class="simulator-field">
|
|
48
|
-
<label class="simulator-label">
|
|
49
|
-
Input String<span class="simulator-override-tag" id="simulator-input-override-tag" hidden>applied</span>
|
|
50
|
-
</label>
|
|
51
|
-
<textarea class="simulator-textarea auto-resize" id="simulator-input" placeholder="No input yet..."></textarea>
|
|
52
|
-
<div class="simulator-row">
|
|
53
|
-
<button class="simulator-btn subtle" id="simulator-input-reset">Reset</button>
|
|
54
|
-
<button class="simulator-btn primary" id="simulator-input-apply" disabled>Apply</button>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div class="data-subtab-content" id="data-subtab-history">
|
|
60
|
-
<div class="history-header">
|
|
61
|
-
<span class="simulator-label">Input String Timeline</span>
|
|
62
|
-
<button class="simulator-btn tiny" id="simulator-history-clear">Clear</button>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="history-list" id="simulator-history-list">
|
|
65
|
-
<div class="simulator-empty">No history yet</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div class="data-subtab-content" id="data-subtab-saves">
|
|
70
|
-
<div class="save-new">
|
|
71
|
-
<input type="text" class="simulator-input" id="simulator-save-name" placeholder="Save name..." />
|
|
72
|
-
<button class="simulator-btn primary" id="simulator-save-btn">Save</button>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="simulator-divider"></div>
|
|
75
|
-
<div class="saves-list" id="simulator-saves-list">
|
|
76
|
-
<div class="simulator-empty">No saved states</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
`},bind(n){let r=n.getElement(`.data-subtabs`);r==null||r.querySelectorAll(`.data-subtab`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.getAttribute(`data-subtab`);if(!t)return;r.querySelectorAll(`.data-subtab`).forEach(e=>e.classList.remove(`active`)),e.classList.add(`active`);let i=n.getElement(`.data-view-container`);i==null||i.querySelectorAll(`.data-subtab-content`).forEach(e=>{e.classList.toggle(`active`,e.id===`data-subtab-${t}`)}),t===`edit`?de(n):t===`history`?H(n):t===`saves`&&U(n)})});let i=n.getElement(`#simulator-puzzle`),a=n.getElement(`#simulator-input`),o=n.getElement(`#simulator-puzzle-reset`),l=n.getElement(`#simulator-puzzle-apply`),u=n.getElement(`#simulator-input-reset`),d=n.getElement(`#simulator-input-apply`);setTimeout(()=>{i&&n.state.originalPuzzle&&document.activeElement!==i&&(i.value=n.state.originalPuzzle,e=n.state.originalPuzzle,B(i)),a&&n.state.currentInputStr&&document.activeElement!==a&&(a.value=n.state.currentInputStr,t=n.state.currentInputStr,B(a)),fe(n)},0),i==null||i.addEventListener(`input`,()=>{B(i);let t=i.value!==e;l&&(l.disabled=!t)}),a==null||a.addEventListener(`input`,()=>{B(a);let e=a.value!==t;d&&(d.disabled=!e)}),o==null||o.addEventListener(`click`,()=>{if(n.state.appliedPuzzleOverride!==null){c(`puzzle`),n.updateStatus(`Restoring fixture puzzle...`,`waiting`),window.location.reload();return}i&&(i.value=n.state.originalPuzzle,e=n.state.originalPuzzle,B(i),l&&(l.disabled=!0))}),l==null||l.addEventListener(`click`,()=>{if(i){if(!s(`puzzle`,i.value)){n.updateStatus(`Could not store puzzle — storage unavailable`,`paused`);return}c(`input`),l.disabled=!0,n.updateStatus(`Applying puzzle...`,`waiting`),window.location.reload()}}),u==null||u.addEventListener(`click`,()=>{if(n.state.appliedInputOverride!==null){c(`input`),n.updateStatus(`Clearing input...`,`waiting`),window.location.reload();return}a&&(a.value=t,B(a),d&&(d.disabled=!0))}),d==null||d.addEventListener(`click`,()=>{if(a){if(!s(`input`,a.value)){n.updateStatus(`Could not store input — storage unavailable`,`paused`);return}d.disabled=!0,n.updateStatus(`Applying input...`,`waiting`),window.location.reload()}});let f=n.getElement(`#simulator-history-clear`);f==null||f.addEventListener(`click`,()=>{z=[],H(n)});let p=n.getElement(`#simulator-save-name`),m=n.getElement(`#simulator-save-btn`);m==null||m.addEventListener(`click`,()=>{if(!p||!p.value.trim())return;let e=V(),t={name:p.value.trim(),puzzleStr:n.state.originalPuzzle,inputStr:n.state.currentInputStr,timestamp:Date.now()};e.push(t),localStorage.setItem(I,JSON.stringify(e)),p.value=``,U(n)}),U(n)},onActivate(n){e=n.state.originalPuzzle,t=n.state.currentInputStr,de(n),H(n)},onMessage(e,n,r){var i,a;let o=r.getElement(`#simulator-input`),s=r.getElement(`#simulator-input-apply`),c=(i=n==null||(a=n.input)==null?void 0:a.boardState)==null?n==null?void 0:n.boardState:i;if(e===`UPLOAD_NEW_GAME_STATE`&&c){if(r.state.currentInputStr=c,z.length===0||z[z.length-1].value!==c){z.push({value:c,timestamp:Date.now()}),z.length>100&&(z=z.slice(-100));let e=r.getElement(`#data-subtab-history`);e!=null&&e.classList.contains(`active`)&&H(r)}o&&document.activeElement!==o&&(o.value!==c&&(o.value=c,B(o)),t=c,s&&(s.disabled=!0))}}}}function V(){try{let e=localStorage.getItem(I);return e?JSON.parse(e):[]}catch(e){return[]}}function H(e){let t=e.getElement(`#simulator-history-list`);if(t){if(t.style.setProperty(`--history-thumb-bg`,e.state.selectedTheme.a_bg),z.length===0){t.innerHTML=`<div class="simulator-empty">No history yet</div>`;return}t.innerHTML=[...z].reverse().map((t,n)=>{let r=z.length-1-n,i=new Date(t.timestamp).toLocaleTimeString(),a=t.value.length>60?t.value.slice(0,60)+`...`:t.value;return`
|
|
81
|
-
<div class="history-item" data-history-idx="${r}">
|
|
82
|
-
<div class="history-item-thumb">${R(e,t.value)}</div>
|
|
83
|
-
<div class="history-item-content">
|
|
84
|
-
<div class="history-item-header">
|
|
85
|
-
<span class="history-item-num">#${r+1}</span>
|
|
86
|
-
<span class="history-item-time">${i}</span>
|
|
87
|
-
<button class="simulator-btn tiny history-restore-btn" data-history-idx="${r}">Restore</button>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="history-item-preview">${ue(a)}</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
`}).join(``),t.querySelectorAll(`.history-restore-btn`).forEach(t=>{t.addEventListener(`click`,t=>{let n=parseInt(t.target.getAttribute(`data-history-idx`)||`0`),r=z[n];if(r){let t=e.getElement(`.data-subtab[data-subtab="edit"]`);t==null||t.click();let n=e.getElement(`#simulator-input`),i=e.getElement(`#simulator-input-apply`);n&&(n.value=r.value,B(n)),i&&(i.disabled=!1),e.updateStatus(`Input restored — press Apply to load it`,`ready`)}})})}}function U(e){let t=e.getElement(`#simulator-saves-list`);if(!t)return;let n=V();if(n.length===0){t.innerHTML=`<div class="simulator-empty">No saved states</div>`;return}t.innerHTML=[...n].reverse().map((e,t)=>{let r=n.length-1-t,i=new Date(e.timestamp).toLocaleDateString(),a=new Date(e.timestamp).toLocaleTimeString();return`
|
|
93
|
-
<div class="save-item">
|
|
94
|
-
<div class="save-item-header">
|
|
95
|
-
<span class="save-item-name">${ue(e.name)}</span>
|
|
96
|
-
<span class="save-item-time">${i} ${a}</span>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="save-item-actions">
|
|
99
|
-
<button class="simulator-btn tiny save-load-btn" data-save-idx="${r}">Load</button>
|
|
100
|
-
<button class="simulator-btn tiny danger save-delete-btn" data-save-idx="${r}">Delete</button>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
`}).join(``),t.querySelectorAll(`.save-load-btn`).forEach(t=>{t.addEventListener(`click`,t=>{let r=n[parseInt(t.target.getAttribute(`data-save-idx`)||`0`)];if(r){if(!s(`puzzle`,r.puzzleStr)||!s(`input`,r.inputStr)){l(),e.updateStatus(`Could not load "${r.name}" — storage unavailable`,`paused`);return}e.updateStatus(`Loading: ${r.name}`,`waiting`),window.location.reload()}})}),t.querySelectorAll(`.save-delete-btn`).forEach(t=>{t.addEventListener(`click`,t=>{let r=parseInt(t.target.getAttribute(`data-save-idx`)||`0`),i=n.filter((e,t)=>t!==r);localStorage.setItem(I,JSON.stringify(i)),U(e)})})}function ue(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function de(e){let t=e.getElement(`#simulator-puzzle`),n=e.getElement(`#simulator-input`),r=e.getElement(`#simulator-puzzle-apply`),i=e.getElement(`#simulator-input-apply`);t&&e.state.originalPuzzle&&(t.value=e.state.originalPuzzle,B(t),r&&(r.disabled=!0)),n&&(n.value=e.state.currentInputStr,B(n),i&&(i.disabled=!0)),fe(e)}function fe(e){let t=e.getElement(`#simulator-puzzle-override-tag`),n=e.getElement(`#simulator-input-override-tag`);t&&(t.hidden=e.state.appliedPuzzleOverride===null),n&&(n.hidden=e.state.appliedInputOverride===null)}function pe(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function me(){let e=0;return{id:`msgs`,label:`Msgs`,render(){return`
|
|
104
|
-
<div class="msgs-view-container">
|
|
105
|
-
<div class="msgs-header">
|
|
106
|
-
<span class="simulator-label">Message Log</span>
|
|
107
|
-
<button class="simulator-btn tiny" id="simulator-msgs-clear">Clear</button>
|
|
108
|
-
</div>
|
|
109
|
-
<div id="simulator-msgs-log"></div>
|
|
110
|
-
</div>
|
|
111
|
-
`},bind(t){let n=t.getElement(`#simulator-msgs-clear`);n==null||n.addEventListener(`click`,()=>{let n=t.getElement(`#simulator-msgs-log`);n&&(n.innerHTML=``),e=0,t.updateBadge(`msgs`,0)})},addLogEntry(t,n){let r=n.getElement(`#simulator-msgs-log`);if(!r)return;e++,n.updateBadge(`msgs`,e);let i=document.createElement(`div`);i.className=`simulator-msg ${t.direction}`;let a=t.data===void 0?``:JSON.stringify(t.data,null,2);i.innerHTML=`
|
|
112
|
-
<div class="simulator-msg-header">
|
|
113
|
-
<span class="simulator-msg-type">${t.direction===`out`?`→`:`←`} ${t.type}</span>
|
|
114
|
-
<span class="simulator-msg-time">${t.time}</span>
|
|
115
|
-
</div>
|
|
116
|
-
${a?`<div class="simulator-msg-data">${pe(a)}</div>`:``}
|
|
117
|
-
`;let o=i.querySelector(`.simulator-msg-data`);for(o&&o.addEventListener(`click`,()=>{r.querySelectorAll(`.simulator-msg.expanded`).forEach(e=>{e!==i&&e.classList.remove(`expanded`)}),i.classList.toggle(`expanded`)}),r.insertBefore(i,r.firstChild);r.children.length>50;)r.removeChild(r.lastChild)}}}function he(){return{id:`done`,label:`Done`,render(){return`
|
|
118
|
-
<div id="simulator-done-empty" class="simulator-empty">Game not completed yet</div>
|
|
119
|
-
<div id="simulator-done-content" style="display:none;">
|
|
120
|
-
<div class="simulator-field">
|
|
121
|
-
<label class="simulator-label">Completion Text</label>
|
|
122
|
-
<div id="simulator-done-text" class="simulator-value"></div>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="simulator-divider"></div>
|
|
125
|
-
<div class="simulator-field">
|
|
126
|
-
<label class="simulator-label">Board State</label>
|
|
127
|
-
<textarea class="simulator-textarea" id="simulator-done-input" rows="2" readonly></textarea>
|
|
128
|
-
</div>
|
|
129
|
-
<div class="simulator-divider"></div>
|
|
130
|
-
<div class="simulator-field">
|
|
131
|
-
<label class="simulator-label">Deeds</label>
|
|
132
|
-
<div id="simulator-done-deeds" class="simulator-deeds"></div>
|
|
133
|
-
</div>
|
|
134
|
-
<div class="simulator-divider"></div>
|
|
135
|
-
<div class="simulator-field">
|
|
136
|
-
<label class="simulator-label">Raw Data</label>
|
|
137
|
-
<textarea class="simulator-textarea" id="simulator-done-raw" rows="4" readonly></textarea>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
`},bind(e){},onMessage(e,t,n){var r,i;if(e===`SHOW_GAME_COMPLETE_SCREEN`){n.setCollapsed(!1),n.switchTab(`done`);return}if(e!==`GAME_COMPLETED`)return;n.state.completionData=t;let a=n.getElement(`#simulator-done-empty`),o=n.getElement(`#simulator-done-content`),s=n.getElement(`#simulator-done-text`),c=n.getElement(`#simulator-done-input`),l=n.getElement(`#simulator-done-deeds`),u=n.getElement(`#simulator-done-raw`);a&&(a.style.display=`none`),o&&(o.style.display=`block`);let d=((r=t.input)==null?void 0:r.completionText)||t.completionText||`(no completion text)`;s&&(s.textContent=d);let f=((i=t.input)==null?void 0:i.boardState)||t.boardState||n.state.currentInputStr||``;if(c&&(c.value=f),l){var p;l.innerHTML=``;let e=((p=t.config)==null?void 0:p.deeds)||t.deeds;e&&Array.isArray(e)?e.forEach(e=>{let t=document.createElement(`div`);t.className=`simulator-deed`,t.innerHTML=`
|
|
141
|
-
<span class="simulator-deed-name">${e.id}</span>
|
|
142
|
-
<span class="simulator-deed-value">${e.value}</span>
|
|
143
|
-
`,l.appendChild(t)}):l.innerHTML=`<div class="simulator-empty">No deeds</div>`}u&&(u.value=JSON.stringify(t,null,2))}}}function ge(){let e=[],t=()=>new Date().toLocaleTimeString(`en-US`,{hour12:!1}),n=e=>{let{checkpointName:t,augConfig:n,time:r}=e,i=n==null?void 0:n.deeds;return`
|
|
144
|
-
<div class="checkpoint-item">
|
|
145
|
-
<div class="checkpoint-header">
|
|
146
|
-
<span class="checkpoint-name">${t}</span>
|
|
147
|
-
<span class="checkpoint-time">${r}</span>
|
|
148
|
-
</div>
|
|
149
|
-
${i&&i.length>0?`<div class="simulator-deeds">
|
|
150
|
-
${i.map(e=>`<div class="simulator-deed"><span class="simulator-deed-name">${e.id}</span><span class="simulator-deed-value">${e.value}</span></div>`).join(``)}
|
|
151
|
-
</div>`:``}
|
|
152
|
-
</div>
|
|
153
|
-
`},r=()=>e.length===0?`<div class="simulator-empty">No checkpoints received yet</div>`:e.map(e=>n(e)).join(``);return{id:`checkpoints`,label:`Chkpt`,render(){return`
|
|
154
|
-
<div class="checkpoints-view-container">
|
|
155
|
-
<div class="checkpoints-header">
|
|
156
|
-
<span class="simulator-label">Checkpoints</span>
|
|
157
|
-
<button class="simulator-btn subtle small" id="simulator-checkpoints-clear">Clear</button>
|
|
158
|
-
</div>
|
|
159
|
-
<div id="simulator-checkpoints-list" class="checkpoints-list">
|
|
160
|
-
${r()}
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
`},bind(t){let n=t.getElement(`#simulator-checkpoints-clear`),i=t.getElement(`#simulator-checkpoints-list`);n==null||n.addEventListener(`click`,()=>{e=[],i&&(i.innerHTML=r()),t.updateBadge(`checkpoints`,0)})},onMessage(n,i,a){if(n!==`HIT_CHECKPOINT`)return;let o={checkpointName:i.checkpointName,augConfig:i.augConfig,time:t()};e.push(o),a.updateBadge(`checkpoints`,e.length);let s=a.getElement(`#simulator-checkpoints-list`);s&&(s.innerHTML=r(),s.scrollTop=s.scrollHeight)}}}function _e(){let e=globalThis;for(let t of Object.keys(e))if(t.endsWith(`Thumbnail`)&&typeof e[t]==`function`)return{name:t,fn:e[t]};return null}function ve(){let e=globalThis.getShareString;return typeof e==`function`?e:null}function ye(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function be(){let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function xe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Se=`
|
|
164
|
-
<div class="simulator-share-missing">
|
|
165
|
-
<p>The app bundle doesn't export <code>getShareString</code>.</p>
|
|
166
|
-
<p>Add it to your app bundle to preview share strings here:</p>
|
|
167
|
-
<pre>export const getShareString: AppBundle["getShareString"] = (
|
|
168
|
-
inputStr, title, { puzzleString, dateKey, gameplaySlug },
|
|
169
|
-
) => ({ str: \`\${title}: ...\` })</pre>
|
|
170
|
-
</div>
|
|
171
|
-
`;function Ce(){return{id:`thumb`,label:`Thumb`,render(){return`
|
|
172
|
-
<div class="thumb-view-container">
|
|
173
|
-
<div class="thumb-header">
|
|
174
|
-
<span class="simulator-label">Preview</span>
|
|
175
|
-
<button class="simulator-btn tiny" id="simulator-thumb-refresh">Refresh</button>
|
|
176
|
-
</div>
|
|
177
|
-
<div class="simulator-segmented" id="simulator-preview-kind" role="tablist">
|
|
178
|
-
<button class="simulator-segmented-btn" data-preview-kind="image" type="button" role="tab">Image</button>
|
|
179
|
-
<button class="simulator-segmented-btn" data-preview-kind="text" type="button" role="tab">Text</button>
|
|
180
|
-
</div>
|
|
181
|
-
<div id="simulator-thumb-preview">
|
|
182
|
-
<span class="simulator-empty">No thumbnail function found</span>
|
|
183
|
-
</div>
|
|
184
|
-
<div id="simulator-thumb-fn"></div>
|
|
185
|
-
<div class="simulator-divider"></div>
|
|
186
|
-
<div class="simulator-field" id="simulator-render-host-field">
|
|
187
|
-
<label class="simulator-label">Render Host</label>
|
|
188
|
-
<select class="simulator-select" id="simulator-render-host-select">
|
|
189
|
-
<option value="game">game</option>
|
|
190
|
-
<option value="app">app</option>
|
|
191
|
-
<option value="opengraph">opengraph</option>
|
|
192
|
-
</select>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="simulator-field" id="simulator-render-context-field" style="display: none;">
|
|
195
|
-
<label class="simulator-label">Render Context</label>
|
|
196
|
-
<select class="simulator-select" id="simulator-render-context-select">
|
|
197
|
-
<option value="preview">preview</option>
|
|
198
|
-
<option value="share">share</option>
|
|
199
|
-
<option value="completed">completed</option>
|
|
200
|
-
<option value="timeline">timeline</option>
|
|
201
|
-
</select>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
`},bind(e){let t=e.getElement(`#simulator-thumb-refresh`);t==null||t.addEventListener(`click`,()=>e.updateThumbnail());let n=e.getElement(`#simulator-render-host-select`),r=e.getElement(`#simulator-render-context-select`),i=e.getElement(`#simulator-render-host-field`),a=e.getElement(`#simulator-render-context-field`),o=e.getElement(`#simulator-preview-kind`),s=()=>{let t=e.state.previewKind!==`text`;i&&(i.style.display=t?`block`:`none`),a&&(a.style.display=t&&e.state.renderHost===`opengraph`?`block`:`none`)},c=()=>{o==null||o.querySelectorAll(`.simulator-segmented-btn`).forEach(t=>{let n=t.dataset.previewKind;t.classList.toggle(`active`,n===e.state.previewKind),t.setAttribute(`aria-selected`,n===e.state.previewKind?`true`:`false`)})};o==null||o.querySelectorAll(`.simulator-segmented-btn`).forEach(t=>{t.addEventListener(`click`,()=>{let n=t.dataset.previewKind;!n||n===e.state.previewKind||(e.state.previewKind=n,k(n),c(),s(),e.updateThumbnail())})}),n&&(e.state.renderHost||(e.state.renderHost=`game`,O(e.state.renderHost)),n.value=e.state.renderHost||`game`,n.addEventListener(`change`,()=>{e.state.renderHost=n.value,O(e.state.renderHost),s(),e.updateThumbnail()})),r&&(e.state.renderContext||(e.state.renderContext=`preview`,A(e.state.renderContext)),r.value=e.state.renderContext||`preview`,r.addEventListener(`change`,()=>{e.state.renderContext=r.value,A(e.state.renderContext),e.updateThumbnail()})),c(),s()},onActivate(e){setTimeout(()=>e.updateThumbnail(),0)},updatePreview:e=>{let t=e.getElement(`#simulator-thumb-preview`),n=e.getElement(`#simulator-thumb-fn`);if(t==null||t.style.setProperty(`--sim-thumb-bg`,e.state.selectedTheme.g_bg),e.state.previewKind===`text`){let s=ve();if(!s){t&&(t.innerHTML=Se),n&&(n.textContent=``);return}n&&(n.textContent=`Using: getShareString()`);try{var r,i,a,o;let n=(r=e.gameSlug)==null?`game`:r,c=s((i=e.state.currentInputStr)==null?``:i,xe(n),{puzzleString:(a=e.state.puzzleData)==null?``:a,dateKey:be(),gameplaySlug:`simulator:${n}`}),l=(o=c==null?void 0:c.str)==null?``:o;t&&(t.innerHTML=`<pre class="simulator-share-preview" style="color: ${e.state.selectedTheme.fg}">${ye(l)}</pre>`)}catch(e){console.error(`Simulator: Share string error`,e),t&&(t.innerHTML=`<span class="simulator-empty">Error: ${e}</span>`)}return}let s=_e();if(!s){t&&(t.innerHTML=`<span class="simulator-empty">No thumbnail function found</span>`),n&&(n.textContent=``);return}n&&(n.textContent=`Using: ${s.name}()`);try{var c;let n=(c=e.state.puzzleData)==null?``:c,r={viewerIsOwner:!0,theme:e.state.selectedTheme,strict:!0,renderHost:e.state.renderHost,renderContext:e.state.renderContext},{svg:i}=P(s.fn(n,e.state.currentInputStr,r));t&&(t.innerHTML=i)}catch(e){console.error(`Simulator: Thumbnail error`,e),t&&(t.innerHTML=`<span class="simulator-empty">Error: ${e}</span>`)}}}}function we(e){let t=[e.key,e.subBrand,e.player,e.alt1,e.alt2,e.alt3].map(e=>`<div class="simulator-theme-preview-cell" style="background: ${e}"></div>`).join(``);return`<div class="simulator-theme-preview" style="background: ${e.g_bg}">${t}</div>`}function Te(){return{id:`theme`,label:`Theme`,render(){return`
|
|
205
|
-
<div class="theme-view-container">
|
|
206
|
-
<div class="theme-header">
|
|
207
|
-
<span class="simulator-label">Select Theme</span>
|
|
208
|
-
</div>
|
|
209
|
-
<div id="simulator-themes" class="simulator-themes"></div>
|
|
210
|
-
</div>
|
|
211
|
-
`},bind(e){let t=e.getElement(`#simulator-themes`);t&&n.forEach(n=>{let r=document.createElement(`div`);r.className=`simulator-theme-item${n.name===e.state.selectedTheme.name?` selected`:``}`,r.innerHTML=`
|
|
212
|
-
${we(n)}
|
|
213
|
-
<div class="simulator-theme-name">${n.name}</div>
|
|
214
|
-
<div class="simulator-theme-type">${n.type}</div>
|
|
215
|
-
`,r.addEventListener(`click`,()=>{console.log(`Simulator: Theme changed, reloading...`,n.name),w(n.name),window.location.reload()}),t.appendChild(r)})}}}var Ee=[{name:`app (desktop)`,context:[{type:`app`,layout:`desktop`,host:null}]},{name:`app (mobile)`,context:[{type:`app`,layout:`mobile`,host:null}]},{name:`app (ios)`,context:[{type:`app`,layout:`mobile`,host:`ios-app`}]},{name:`embed`,context:[{type:`embed`}]},{name:`embed (no UI)`,context:[{type:`embed`,noUI:!0}]},{name:`sandbox`,context:[{type:`sandbox`}]}];function De(e=[]){let t=[...Ee,...e];return{id:`host`,label:`Host`,render(){return`
|
|
216
|
-
<style>
|
|
217
|
-
#simulator-tab-host .host-note { opacity: 0.5; font-size: 10px; margin: 4px 0 8px; }
|
|
218
|
-
#simulator-tab-host .host-error { color: #f66; font-size: 11px; margin-top: 6px; white-space: pre-wrap; }
|
|
219
|
-
#simulator-tab-host .host-actions { display: flex; gap: 6px; margin-top: 8px; }
|
|
220
|
-
#simulator-tab-host .simulator-textarea { min-height: 140px; font-family: monospace; }
|
|
221
|
-
</style>
|
|
222
|
-
<div class="simulator-section">
|
|
223
|
-
<div class="simulator-section-title">Host Context</div>
|
|
224
|
-
<div class="host-note" id="host-source"></div>
|
|
225
|
-
<select class="simulator-select" id="host-presets">
|
|
226
|
-
<option value="">Preset…</option>
|
|
227
|
-
${t.map((e,t)=>`<option value="${t}">${Oe(e.name)}</option>`).join(``)}
|
|
228
|
-
</select>
|
|
229
|
-
<textarea class="simulator-textarea" id="host-json" spellcheck="false"></textarea>
|
|
230
|
-
<div class="host-actions">
|
|
231
|
-
<button class="simulator-btn primary" id="host-apply">Apply & Restart</button>
|
|
232
|
-
<button class="simulator-btn subtle" id="host-reset">Reset</button>
|
|
233
|
-
</div>
|
|
234
|
-
<div class="host-error" id="host-error"></div>
|
|
235
|
-
</div>
|
|
236
|
-
`},bind(e){var n,r;let i=e.getElement(`#host-json`),a=e.getElement(`#host-presets`),o=e.getElement(`#host-error`),s=e.getElement(`#host-source`);!i||!a||!o||!s||(i.value=JSON.stringify(e.state.hostContext,null,2),s.textContent=e.state.hostContextIsOverridden?`Using this tab's override. Changes apply on restart.`:`Using the vite config / default context. Changes apply on restart.`,a.addEventListener(`change`,()=>{let e=t[Number(a.value)];e&&(i.value=JSON.stringify(e.context,null,2))}),(n=e.getElement(`#host-apply`))==null||n.addEventListener(`click`,()=>{let e;try{e=JSON.parse(i.value)}catch(e){o.textContent=`Invalid JSON: ${e.message}`;return}if(!Array.isArray(e)||!e.every(e=>e&&typeof e==`object`&&typeof e.type==`string`)){o.textContent=`hostContext must be an array of { type: string, ... } objects`;return}console.log(`Simulator: hostContext changed, reloading...`,e),d(e),window.location.reload()}),(r=e.getElement(`#host-reset`))==null||r.addEventListener(`click`,()=>{f(),window.location.reload()}))}}}function Oe(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}var ke=`puzzmo_sim_api_mode`,W=`http://localhost:8911`,Ae=`https://api.puzzmo.com`,G=()=>localStorage.getItem(ke)===`dev`?`dev`:`prod`,je=e=>{localStorage.setItem(ke,e)},K=null,Me=function(){var e=t.t(function*(){if(K!==null)return K;try{let e=new AbortController,t=setTimeout(()=>e.abort(),1e3),n=yield fetch(`${W}/healthz`,{signal:e.signal});return clearTimeout(t),K=n.ok,K}catch(e){return K=!1,!1}});return function(){return e.apply(this,arguments)}}(),q=()=>({apiURL:G()===`dev`?W:Ae,clientID:`protosdk:oauthclient`,redirectUri:`${window.location.origin}/oauth/callback`}),Ne=()=>{let e=new Uint8Array(32);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)},Pe=`puzzmo_sim_oauth_token`,Fe=`puzzmo_sim_oauth_refresh_token`,Ie=e=>localStorage.setItem(Pe,e),Le=e=>localStorage.setItem(Fe,e),Re=()=>{let e=localStorage.getItem(Pe);return e&&`${e.substring(0,20)}`,e},ze=()=>localStorage.getItem(Fe),Be=()=>{localStorage.removeItem(Pe),localStorage.removeItem(Fe)},Ve=()=>{let e=q(),t=Ne();sessionStorage.setItem(`oauth_state`,t),sessionStorage.setItem(`oauth_return_url`,window.location.href);let n=new URL(`${e.apiURL}/oauth/auth`);n.searchParams.set(`client_id`,e.clientID),n.searchParams.set(`response_type`,`code`),n.searchParams.set(`redirect_uri`,e.redirectUri),n.searchParams.set(`state`,t),window.location.href=n.toString()},He=e=>{try{let t=e.split(`.`);if(t.length!==3)return!0;let n=JSON.parse(atob(t[1])).exp;return n?Date.now()>=n*1e3-300*1e3:!0}catch(e){return!0}},Ue=function(){var e=t.t(function*(){let e=ze();if(!e)return!1;let t=q();try{let n=new URLSearchParams({grant_type:`refresh_token`,refresh_token:e,client_id:t.clientID}),r=yield fetch(`${t.apiURL}/oauth/token`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:n.toString()});if(!r.ok)return r.statusText,!1;let i=yield r.json(),a=i.access_token||i.accessToken;if(!a)return!1;Ie(a);let o=i.refresh_token||i.refreshToken;return o&&Le(o),!0}catch(e){return!1}});return function(){return e.apply(this,arguments)}}(),We=function(){var e=t.t(function*(e,t){let n=q(),r=sessionStorage.getItem(`oauth_state`);if(!r||r!==t)return null;sessionStorage.removeItem(`oauth_state`);try{let t=new URLSearchParams({grant_type:`authorization_code`,code:e,client_id:n.clientID,redirect_uri:n.redirectUri}),r=yield fetch(`${n.apiURL}/oauth/token`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:t.toString()});return r.ok?yield r.json():(r.statusText,null)}catch(e){return null}});return function(t,n){return e.apply(this,arguments)}}(),Ge=function(){var e=t.t(function*(e,t={}){let n=q(),r=Re();if(!r)throw Error(`Not authenticated`);if(He(r))if(yield Ue()){if(r=Re(),!r)throw Error(`Token refresh succeeded but no token available`)}else throw Be(),Error(`Session expired. Please log in again.`);let i=yield fetch(`${n.apiURL}/graphql`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`,"auth-provider":`custom`},body:JSON.stringify({query:e,variables:t})});if(!i.ok)throw Error(`API request failed: ${i.statusText}`);return i.json()});return function(t){return e.apply(this,arguments)}}(),Ke=e=>{try{let t=e.split(`.`);return t.length,t.length===3?JSON.parse(atob(t[1])):null}catch(e){return null}};function qe(){let e=!1;return{id:`auth`,label:`Auth`,render(){let e=Re(),t=!!e,n=G(),r=n===`dev`?W:Ae,i=`<button class="simulator-btn tiny" id="auth-dev-toggle" style="display: none;">${n===`dev`?`Using Dev`:`Dev`}</button>`;if(t){let t=Ke(e),n=t!=null&&t.exp?new Date(t.exp*1e3).toLocaleString():`Unknown`,a=!!ze(),o=a?Ke(ze()):null,s=o!=null&&o.exp?new Date(o.exp*1e3).toLocaleString():null;return`
|
|
237
|
-
<div class="simulator-section">
|
|
238
|
-
<div class="simulator-section-title auth-title-row">
|
|
239
|
-
<span>Puzzmo Authentication</span>
|
|
240
|
-
${i}
|
|
241
|
-
<button class="simulator-btn danger tiny" id="auth-logout">Logout</button>
|
|
242
|
-
</div>
|
|
243
|
-
<div id="auth-status" class="auth-status authenticated">
|
|
244
|
-
<span class="indicator ready"></span>
|
|
245
|
-
<span>Authenticated</span>
|
|
246
|
-
</div>
|
|
247
|
-
<div id="auth-user-info" class="auth-user-info">
|
|
248
|
-
<div>User ID: <code>${(t==null?void 0:t.userID)||(t==null?void 0:t.sub)||`Unknown`}</code></div>
|
|
249
|
-
<div>API: <code>${r}</code></div>
|
|
250
|
-
<div>Access expires: <code>${n}</code></div>
|
|
251
|
-
${a?`<div>Refresh expires: <code>${s||`Unknown`}</code></div>`:`<div class="auth-warning">No refresh token</div>`}
|
|
252
|
-
</div>
|
|
253
|
-
${a?`<button class="simulator-btn secondary tiny" id="auth-refresh">Refresh Now</button>`:``}
|
|
254
|
-
</div>
|
|
255
|
-
<div class="simulator-section">
|
|
256
|
-
<div class="simulator-section-title">Test API Request</div>
|
|
257
|
-
<div class="simulator-row">
|
|
258
|
-
<button class="simulator-btn primary" id="auth-test-api">Fetch Current User</button>
|
|
259
|
-
</div>
|
|
260
|
-
<div id="auth-api-result" class="auth-api-result"></div>
|
|
261
|
-
</div>
|
|
262
|
-
`}return`
|
|
263
|
-
<div class="simulator-section">
|
|
264
|
-
<div class="simulator-section-title auth-title-row">
|
|
265
|
-
<span>Puzzmo Authentication</span>
|
|
266
|
-
${i}
|
|
267
|
-
</div>
|
|
268
|
-
<div id="auth-status" class="auth-status">
|
|
269
|
-
<span class="indicator waiting"></span>
|
|
270
|
-
<span>Not authenticated</span>
|
|
271
|
-
</div>
|
|
272
|
-
<p class="auth-description">
|
|
273
|
-
Login with your Puzzmo account to make authenticated API requests.
|
|
274
|
-
${n===`dev`?`<br><strong>Using local dev server:</strong> ${W}`:``}
|
|
275
|
-
</p>
|
|
276
|
-
<div class="simulator-row">
|
|
277
|
-
<button class="simulator-btn primary" id="auth-login">Login with Puzzmo</button>
|
|
278
|
-
</div>
|
|
279
|
-
<div id="auth-error" class="auth-error"></div>
|
|
280
|
-
</div>
|
|
281
|
-
`},bind(n){let r=n.getElement(`#auth-login`),i=n.getElement(`#auth-logout`),a=n.getElement(`#auth-refresh`),o=n.getElement(`#auth-test-api`),s=n.getElement(`#auth-api-result`),c=n.getElement(`#auth-dev-toggle`);e?K&&c&&(c.style.display=``,G()===`dev`&&c.classList.add(`active`)):(e=!0,Me().then(e=>{e&&c&&(c.style.display=``,G()===`dev`&&c.classList.add(`active`))})),c==null||c.addEventListener(`click`,()=>{je(G()===`dev`?`prod`:`dev`),Be(),window.location.reload()}),r==null||r.addEventListener(`click`,()=>{Ve()}),i==null||i.addEventListener(`click`,()=>{Be(),window.location.reload()}),a==null||a.addEventListener(`click`,t.t(function*(){a.disabled=!0,a.textContent=`Refreshing...`,(yield Ue())?window.location.reload():(a.textContent=`Refresh Failed`,a.disabled=!1)})),o==null||o.addEventListener(`click`,t.t(function*(){if(s){s.innerHTML=`<div class="loading">Loading...</div>`;try{let t=yield Ge(`
|
|
282
|
-
query {
|
|
283
|
-
currentUser {
|
|
284
|
-
id
|
|
285
|
-
username
|
|
286
|
-
usernameID
|
|
287
|
-
name
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
`);if(t.errors){var e;s.innerHTML=`<div class="error">Error: ${((e=t.errors[0])==null?void 0:e.message)||`Unknown error`}</div>`}else s.innerHTML=`<pre>${JSON.stringify(t.data,null,2)}</pre>`}catch(e){s.innerHTML=`<div class="error">Error: ${e instanceof Error?e.message:`Unknown error`}</div>`}}}))},onActivate(e){return t.t(function*(){let t=new URLSearchParams(window.location.search),n=t.get(`code`),r=t.get(`state`),i=t.get(`error`);if(i){let t=e.getElement(`#auth-error`);t&&(t.innerHTML=`<div class="error">OAuth error: ${i}</div>`),window.history.replaceState({},``,window.location.pathname);return}if(n&&r){let t=e.getElement(`#auth-status`);t&&(t.innerHTML=`<span class="indicator waiting"></span><span>Exchanging code...</span>`);let i=yield We(n,r);if(window.history.replaceState({},``,window.location.pathname),i){let e=i.access_token||i.accessToken;if(e){Ie(e);let t=i.refresh_token||i.refreshToken;t&&Le(t)}window.location.reload()}else{let t=e.getElement(`#auth-error`);t&&(t.innerHTML=`<div class="error">Failed to exchange code for token</div>`)}}})()}}}var Je=`puzzmo_sim_api_mode`,Ye=`http://localhost:8911`,Xe=`https://api.puzzmo.com`,Ze=`puzzmo_sim_oauth_token`,Qe=`puzzmo_sim_oauth_refresh_token`,$e=()=>localStorage.getItem(Je)===`dev`?`dev`:`prod`,et=()=>localStorage.getItem(Ze),tt=()=>localStorage.getItem(Qe),nt=e=>localStorage.setItem(Ze,e),rt=e=>localStorage.setItem(Qe,e),it=()=>{localStorage.removeItem(Ze),localStorage.removeItem(Qe)},at=e=>{try{let t=e.split(`.`);if(t.length!==3)return!0;let n=JSON.parse(atob(t[1])).exp;return n?Date.now()>=n*1e3-300*1e3:!0}catch(e){return!0}},ot=function(){var e=t.t(function*(){let e=tt();if(!e)return!1;let t=$e()===`dev`?Ye:Xe;try{let n=new URLSearchParams({grant_type:`refresh_token`,refresh_token:e,client_id:`protosdk:oauthclient`}),r=yield fetch(`${t}/oauth/token`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:n.toString()});if(!r.ok)return!1;let i=yield r.json(),a=i.access_token||i.accessToken;if(!a)return!1;nt(a);let o=i.refresh_token||i.refreshToken;return o&&rt(o),!0}catch(e){return!1}});return function(){return e.apply(this,arguments)}}(),st=function(){var e=t.t(function*(e,t={}){let n=$e()===`dev`?Ye:Xe,r=et();if(!r)throw Error(`Not authenticated`);if(at(r))if(yield ot()){if(r=et(),!r)throw Error(`Token refresh succeeded but no token available`)}else throw it(),Error(`Session expired. Please log in again.`);let i=yield fetch(`${n}/graphql`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`,"auth-provider":`custom`},body:JSON.stringify({query:e,variables:t})});if(!i.ok)throw Error(`API request failed: ${i.statusText}`);return i.json()});return function(t){return e.apply(this,arguments)}}(),ct=`
|
|
291
|
-
query GameFeaturesQuery($slug: ID!) {
|
|
292
|
-
game(id: $slug) {
|
|
293
|
-
id
|
|
294
|
-
slug
|
|
295
|
-
displayName
|
|
296
|
-
featuresArr
|
|
297
|
-
gameFeatures {
|
|
298
|
-
slug
|
|
299
|
-
title
|
|
300
|
-
features {
|
|
301
|
-
featureID
|
|
302
|
-
title
|
|
303
|
-
isEnabled
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
`,lt=`
|
|
309
|
-
mutation ToggleFeatureMutation($gameSlug: ID!, $input: UpdateGameInput!) {
|
|
310
|
-
updateGame(id: $gameSlug, input: $input) {
|
|
311
|
-
id
|
|
312
|
-
featuresArr
|
|
313
|
-
gameFeatures {
|
|
314
|
-
slug
|
|
315
|
-
title
|
|
316
|
-
features {
|
|
317
|
-
featureID
|
|
318
|
-
title
|
|
319
|
-
isEnabled
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
`,ut=(e,t)=>{let n=t-1,r=Math.floor(n/31),i=n%31,a=[...e];for(;a.length<=r;)a.push(0);return a[r]=a[r]^1<<i,a};const dt=()=>!!et();function ft(){let n=null,r=!1,i=null,a=function(){var e=t.t(function*(e){r=!0,i=null;try{var t;let r=yield st(ct,{slug:e});if(r.errors){var a;i=((a=r.errors[0])==null?void 0:a.message)||`Unknown error`,n=null}else (t=r.data)!=null&&t.game?n=r.data.game:(i=`Game not found`,n=null)}catch(e){i=e instanceof Error?e.message:`Unknown error`,n=null}finally{r=!1}});return function(t){return e.apply(this,arguments)}}(),o=function(){var r=t.t(function*(t){if(!n)return;let r=ut(n.featuresArr,t);try{var i;let t=yield st(lt,{gameSlug:n.slug,input:{featuresArr:r}});if(t.errors){var a;console.error(`Failed to toggle feature:`,(a=t.errors[0])==null?void 0:a.message)}else (i=t.data)!=null&&i.updateGame&&(n=e.t(e.t({},n),{},{featuresArr:t.data.updateGame.featuresArr,gameFeatures:t.data.updateGame.gameFeatures}))}catch(e){console.error(`Failed to toggle feature:`,e)}});return function(e){return r.apply(this,arguments)}}(),s=()=>{if(r)return`<div class="features-loading">Loading features...</div>`;if(i)return`<div class="features-error">${i}</div>`;if(!n)return`<div class="features-empty">Enter your game slug above to load features</div>`;let e=n.gameFeatures.map(e=>{let t=e.features.map(e=>{let t=e.isEnabled?`enabled`:`disabled`,n=e.isEnabled?`✓`:`✗`;return`
|
|
325
|
-
<div class="feature-item ${t}" data-feature-id="${e.featureID}">
|
|
326
|
-
<span class="feature-status">${n}</span>
|
|
327
|
-
<span class="feature-title">${e.title}</span>
|
|
328
|
-
</div>
|
|
329
|
-
`}).join(``);return`
|
|
330
|
-
<div class="feature-group">
|
|
331
|
-
<div class="feature-group-title">${e.title}</div>
|
|
332
|
-
<div class="feature-group-items">${t}</div>
|
|
333
|
-
</div>
|
|
334
|
-
`}).join(``);return`
|
|
335
|
-
<div class="features-game-name">${n.displayName}</div>
|
|
336
|
-
${e}
|
|
337
|
-
`};return{id:`features`,label:`Features`,render(){return dt()?`
|
|
338
|
-
<div class="features-view-container">
|
|
339
|
-
<div class="simulator-section">
|
|
340
|
-
<div class="simulator-section-title">Game Features</div>
|
|
341
|
-
<div class="features-slug-input">
|
|
342
|
-
<input type="text" class="simulator-input" id="features-game-slug" placeholder="Game slug (e.g. crossword)" />
|
|
343
|
-
<button class="simulator-btn primary" id="features-load-btn">Load</button>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
<div class="simulator-divider"></div>
|
|
347
|
-
<div id="features-content" class="features-content">
|
|
348
|
-
${s()}
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
`:`
|
|
352
|
-
<div class="features-view-container">
|
|
353
|
-
<div class="simulator-section">
|
|
354
|
-
<div class="simulator-section-title">Game Features</div>
|
|
355
|
-
<div class="features-auth-required">
|
|
356
|
-
<p>You must be logged in to view and edit game features.</p>
|
|
357
|
-
<p>Go to the <strong>Auth</strong> tab to log in with your Puzzmo account.</p>
|
|
358
|
-
</div>
|
|
359
|
-
</div>
|
|
360
|
-
</div>
|
|
361
|
-
`},bind(e){let r=e.getElement(`#features-load-btn`),i=e.getElement(`#features-game-slug`),c=e.getElement(`#features-content`),l=()=>{c&&(c.innerHTML=s(),u())},u=()=>{var n;let r=(n=e.getElement(`#features-content`))==null?void 0:n.querySelectorAll(`.feature-item`);r==null||r.forEach(e=>{e.addEventListener(`click`,t.t(function*(){let t=parseInt(e.getAttribute(`data-feature-id`)||`0`);t>0&&(e.classList.add(`updating`),yield o(t),l())}))})},d=function(){var e=t.t(function*(e){e&&(r&&(r.disabled=!0,r.textContent=`Loading...`),yield a(e),l(),r&&(r.disabled=!1,r.textContent=`Load`))});return function(t){return e.apply(this,arguments)}}();r==null||r.addEventListener(`click`,t.t(function*(){let e=i==null?void 0:i.value.trim();e&&(yield d(e))})),i==null||i.addEventListener(`keypress`,e=>{e.key===`Enter`&&(r==null||r.click())}),console.log(`[FeaturesView] bind called, ctx.gameSlug:`,e.gameSlug,`slugInput:`,i),e.gameSlug&&i&&(i.value=e.gameSlug,dt()&&!n&&d(e.gameSlug)),u()},onActivate(e){let t=e.getElement(`#simulator-tab-features`);t&&(t.innerHTML=this.render(),this.bind(e))}}}var pt=200,mt=24;const J=pt+mt;var ht=6,gt=2.5,_t=100,vt=(e,t)=>e?`14.7%`:t?`17.85%`:`9.75%`,Y=(e,t)=>{let n=e.replace(`#`,``),r=n.length===3?[...n].map(e=>e+e).join(``):n,i=parseInt(r,16);return r.length!==6||Number.isNaN(i)?e:`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, ${t})`},yt=e=>e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`),bt=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);function xt(e){let{theme:t,sendToGame:n}=e,r=!1,i=null,a=null,o=document.createElement(`style`);o.id=`sim-docked-kbd-page-style`,o.textContent=`
|
|
362
|
-
html.sim-kbd-docked #simulator {
|
|
363
|
-
bottom: ${J+4}px;
|
|
364
|
-
}
|
|
365
|
-
`;let s=()=>{var e;return(e=document.getElementById(`root`))==null?document.body.firstElementChild:e},c=null,l=()=>{let e=s();if(!e||c)return;let{height:t,maxHeight:n,position:r}=e.style;c=()=>{e.style.height=t,e.style.maxHeight=n,e.style.position=r,c=null},e.style.height=`calc(100% - ${J}px)`,e.style.maxHeight=`calc(100% - ${J}px)`,getComputedStyle(e).position===`static`&&(e.style.position=`relative`)},u=(e,n)=>{var r;let i=n.disabled.includes(e),a=n.highlight.includes(e);return[`display:flex`,`align-items:center`,`justify-content:center`,`width:100%`,`height:100%`,`box-sizing:border-box`,`border-radius:3px`,`overflow:hidden`,`background:transparent`,`pointer-events:none`,`border:${i?`1px dashed ${Y(t.fg,.25)}`:a?`2px solid ${Y(t.fg,.75)}`:`1px solid ${Y(t.fg,.4)}`}`,X((r=n.individualKeyStyles)==null||(r=r[e])==null?void 0:r.background)].filter(Boolean).join(`;`)},d=(e,n)=>{var r;return[`font:11px/1 Menlo, Monaco, Consolas, monospace`,`letter-spacing:0.5px`,`text-transform:uppercase`,`white-space:nowrap`,`color:${Y(t.fg,n.disabled.includes(e)?.3:.65)}`,n.highlight.includes(e)?``:X(n.keyStyles),X((r=n.individualKeyStyles)==null||(r=r[e])==null?void 0:r.text)].filter(Boolean).join(`;`)},f=(e,t)=>{var n,r;let i=(n=t.symbols[e])==null?e:n,a=t.disabled.includes(e),o=(r=t.flexGrowSymbols)==null?void 0:r.includes(e),s=[`width:${vt(t.l.includes(e),t.xl.includes(e))}`,`flex:${o?`1 0 auto`:`0 1 auto`}`,`height:100%`,`display:flex`,`align-items:center`,`justify-content:center`,`padding:0 3px 12px`,`position:relative`,a?`pointer-events:none`:``].filter(Boolean).join(`;`),c=u(e,t),l=d(e,t);return`<div class="sim-docked-kbd-key" data-key="${yt(e)}" style="${s}">
|
|
366
|
-
<div class="sim-docked-kbd-key-inner" style="${c}"><div style="${l}">${bt(i)}</div></div>
|
|
367
|
-
</div>`},p=e=>{let n=e.layout.filter(e=>!!e),r=`calc(100% / ${n.length})`;return`${n.map((t,n)=>{var i,a;return`<div style="${`height:${r};display:flex;flex-direction:row;align-items:center;justify-content:${(i=(a=e.rowPositioning)==null?void 0:a[n])==null?`center`:i}`}">${[...t].map(t=>f(t,e)).join(``)}</div>`}).join(``)}${`<div id="sim-docked-kbd-cursor" style="position:absolute;inset:0;z-index:1;background:${Y(t.fg,.12)};opacity:0;transition:opacity 0.1s ease-in-out;pointer-events:none"></div>`}`},m=!1,h=[0,0],g=null,_=0,v=null,y=null,b=e=>{let t=a==null?void 0:a.querySelector(`#sim-docked-kbd-cursor`);t&&(t.style.opacity=e?`0.5`:`0`)},x=()=>{m=!1,h=[0,0],g=null,_=0,v=null,y=null,b(!1)},ee=e=>{var t,n;return(t=(n=document.elementFromPoint(e.clientX,e.clientY))==null||(n=n.closest(`.sim-docked-kbd-key`))==null?void 0:n.getAttribute(`data-key`))==null?null:t},S=e=>{y=ee(e),a==null||a.setPointerCapture(e.pointerId)},C=e=>{!(i!=null&&i.supportsDragCursor)||!y||g&&g.clientX===e.clientX&&g.clientY===e.clientY||(g&&g.pointerId!==e.pointerId&&(_=0,v=null),v||(v=Date.now()),m||(_+=1,_>=ht&&Date.now()-v>=_t&&(m=!0,b(!0))),m&&g&&(h=[h[0]+(e.clientX-g.clientX)*gt,h[1]+(e.clientY-g.clientY)*gt]),g={clientX:e.clientX,clientY:e.clientY,pointerId:e.pointerId},m&&n(`KEYBOARD_CURSOR_CHANGE`,{position:h}))},te=e=>{m?n(`KEYBOARD_CURSOR_END`,{}):y&&ee(e)===y&&n(`KEYBOARD_KEY_PRESS`,{key:y}),x()},ne=()=>{a||!i||(a=document.createElement(`div`),a.id=`sim-docked-kbd`,a.style.cssText=[`position:fixed`,`left:0`,`right:0`,`bottom:0`,`height:${J}px`,`box-sizing:border-box`,`padding-top:8px`,`padding-bottom:${mt}px`,`display:flex`,`flex-direction:column`,`z-index:999998`,`touch-action:none`,`user-select:none`,`-webkit-user-select:none`,`background:${t.a_bg}`,`border-top:1px solid ${Y(t.fg,.2)}`].join(`;`),a.innerHTML=p(i),a.addEventListener(`pointerdown`,S),a.addEventListener(`pointermove`,C),a.addEventListener(`pointerup`,te),a.addEventListener(`pointercancel`,()=>x()),a.addEventListener(`contextmenu`,e=>e.preventDefault()),document.body.appendChild(a),o.isConnected||document.head.appendChild(o),document.documentElement.classList.add(`sim-kbd-docked`),l())},w=()=>{a&&(a.remove(),a=null,document.documentElement.classList.remove(`sim-kbd-docked`),c==null||c(),x())},T=()=>{let e=i;!a||!e||a.querySelectorAll(`.sim-docked-kbd-key`).forEach(t=>{let n=t.getAttribute(`data-key`),r=t.firstElementChild,i=r==null?void 0:r.firstElementChild;!n||!r||!i||(r.style.cssText=u(n,e),i.style.cssText=d(n,e))})},E=()=>{if(!r||!i)return w();if(!a)return ne();a.innerHTML=p(i),b(m)};return{setEnabled(e){r=e,E()},setConfig(e){let t=a&&e&&i&&St(e)===St(i);i=e,t?T():E()}}}var St=e=>JSON.stringify([e.layout,e.symbols,e.highlight,e.disabled,e.xl,e.l,e.flexGrowSymbols,e.rowPositioning,e.keyStyles]);const X=e=>Object.entries(e==null?{}:e).map(([e,t])=>`${e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${yt(String(t))}`).join(`;`);var Ct=(e,t)=>{var n,r,i,a;let o=(n=t.symbols[e])==null?e:n,s=t.disabled.includes(e),c=t.highlight.includes(e),l=t.xl.includes(e),u=t.l.includes(e),d=(r=t.flexGrowSymbols)==null?void 0:r.includes(e),f=[`sim-kb-key`,s?`disabled`:``,c?`highlight`:``,l?`xl`:``,u?`l`:``,d?`grow`:``].filter(Boolean).join(` `),p=X((i=t.individualKeyStyles)==null||(i=i[e])==null?void 0:i.background),m=X((a=t.individualKeyStyles)==null||(a=a[e])==null?void 0:a.text);return`<button class="${f}" data-key="${e}" style="${p}" ${s?`disabled`:``}><span style="${m}">${o}</span></button>`},wt=e=>`<div class="sim-kb">${e.layout.filter(e=>e!=null).map(t=>`<div class="sim-kb-row">${[...t].map(t=>Ct(t,e)).join(``)}</div>`).join(``)}</div>`;function Tt(){let e=null,t=null,n=t=>e?t?`<div class="sim-kb-empty">Shown under the game at production size, taking ${J}px off the bottom.<br>Uncheck to preview the layout here instead.</div>`:wt(e):`<div class="sim-kb-empty">No keyboard config received from game yet.<br>The game calls <code>sdk.keyboard.show(config)</code> to display a keyboard.</div>`;return{id:`kbd`,label:`Kbd`,render(){return`
|
|
368
|
-
<div class="keyboard-view-container">
|
|
369
|
-
<div class="simulator-field">
|
|
370
|
-
<label class="sim-settings-row">
|
|
371
|
-
<input type="checkbox" id="sim-kb-dock" />
|
|
372
|
-
<span class="simulator-label">Show keyboard under game</span>
|
|
373
|
-
</label>
|
|
374
|
-
</div>
|
|
375
|
-
<div id="sim-kb-content">
|
|
376
|
-
${n(!1)}
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
`},bind(e){t!=null||(t=xt({theme:e.state.selectedTheme,sendToGame:e.sendToGame})),t.setEnabled(e.state.keyboardDocked);let n=e.getElement(`#sim-kb-dock`);n&&(n.checked=e.state.keyboardDocked,n.addEventListener(`change`,()=>{e.state.keyboardDocked=n.checked,m(n.checked),t==null||t.setEnabled(n.checked),r(e)})),Et(e)},onMessage(n,i,a){var o;n===`KEYBOARD_UPDATE_CONFIG`&&(e=!(!(i==null||(o=i.layout)==null)&&o.length)||i.layout.every(e=>!e)?null:i,t==null||t.setConfig(e),r(a))}};function r(e){let t=e.getElement(`#sim-kb-content`);t&&(t.innerHTML=n(e.state.keyboardDocked),Et(e))}}function Et(e){var t;let n=(t=e.getElement(`#sim-kb-content`))==null?void 0:t.querySelectorAll(`.sim-kb-key`);n==null||n.forEach(t=>{t.addEventListener(`click`,()=>{let n=t.getAttribute(`data-key`);n&&e.sendToGame(`KEYBOARD_KEY_PRESS`,{key:n})})})}function Dt(){let t=e=>{let t=e.state.settingsComponents;return!t||t.length===0?`<div class="sim-settings-empty">No settings registered by the game yet.<br>The game calls <code>sdk.settings.initialize(components)</code> to describe its settings UI.</div>`:`<div class="sim-settings-form">${t.map(t=>Ot(t,e.state.gameSettings)).join(``)}</div><div class="sim-settings-actions"><button class="simulator-btn tiny" id="sim-settings-reset">Reset to defaults</button></div>`},n=e=>{let n=e.getElement(`#sim-settings-content`);n&&(n.innerHTML=t(e),i(e))},r=e=>{S(e.state.gameSettings),e.sendToGame(`SETTINGS_UPDATE`,e.state.gameSettings)},i=t=>{var i;let a=t.getElement(`#sim-settings-content`);a&&(a.querySelectorAll(`[data-setting]`).forEach(n=>{let i=n.getAttribute(`data-setting`),o=n.getAttribute(`data-setting-type`);n.addEventListener(`change`,()=>{let s;if(o===`multiselect`){let e=a.querySelectorAll(`input[data-multiselect="${i}"]`);s=Array.from(e).filter(e=>e.checked).map(e=>e.value)}else s=n instanceof HTMLInputElement&&n.type===`checkbox`?n.checked:o===`number`?Number(n.value):n.value;t.state.gameSettings=e.t(e.t({},t.state.gameSettings),{},{[i]:s}),r(t)})}),(i=a.querySelector(`#sim-settings-reset`))==null||i.addEventListener(`click`,()=>{var e;C(),t.state.gameSettings=kt((e=t.state.settingsComponents)==null?[]:e),r(t),n(t)}))};return{id:`settings`,label:`Set`,render(){return`
|
|
380
|
-
<div class="settings-view-container">
|
|
381
|
-
<div id="sim-settings-content"></div>
|
|
382
|
-
</div>
|
|
383
|
-
`},bind(e){n(e)},onMessage(t,r,i){if(t===`INITIALIZE_SETTINGS`){var a;i.state.settingsComponents=(a=r==null?void 0:r.components)==null?[]:a,i.state.gameSettings=e.t(e.t({},r==null?void 0:r.settings),i.state.gameSettings),S(i.state.gameSettings),n(i);return}t===`UPDATE_SETTINGS_FROM_EMBED`&&(i.state.gameSettings=e.t(e.t({},i.state.gameSettings),r==null?void 0:r.settings),S(i.state.gameSettings),n(i))}}}function Ot(e,t){switch(e.type){case`title`:return`<div class="sim-settings-heading">${Q(e.value)}</div>`;case`subtitle`:return`<div class="sim-settings-subheading">${Q(e.value)}</div>`;case`paragraph`:return`<p class="sim-settings-paragraph">${Q(e.value)}</p>`;case`separator`:return`<div class="simulator-divider"></div>`;case`split`:return`<div class="sim-settings-split">${e.content.map(e=>Ot(e,t)).join(``)}</div>`;case`boolean`:{var n;let r=((n=t[e.name])==null?e.defaultValue:n)?`checked`:``,i=e.subtitle?`<div class="sim-settings-subtitle">${Q(e.subtitle)}</div>`:``;return`
|
|
384
|
-
<div class="simulator-field">
|
|
385
|
-
<label class="sim-settings-row">
|
|
386
|
-
<input type="checkbox" data-setting="${e.name}" ${r} />
|
|
387
|
-
<span class="simulator-label">${Q(e.title)}</span>
|
|
388
|
-
</label>
|
|
389
|
-
${i}
|
|
390
|
-
</div>`}case`enum`:{var r;let n=(r=t[e.name])==null?e.defaultValue:r,i=e.values.map((t,r)=>{var i;return`<option value="${Q(t)}" ${t===n?`selected`:``}>${Q((i=e.displays[r])==null?t:i)}</option>`}).join(``);return`
|
|
391
|
-
<div class="simulator-field">
|
|
392
|
-
${Z(e)}
|
|
393
|
-
<select class="simulator-select" data-setting="${e.name}">${i}</select>
|
|
394
|
-
</div>`}case`multiselect`:{var i;let n=(i=t[e.name])==null?e.defaultValue:i,r=Array.isArray(n)?n:[],a=e.values.map((t,n)=>{var i;return`
|
|
395
|
-
<label class="sim-settings-row">
|
|
396
|
-
<input type="checkbox" data-setting="${e.name}" data-setting-type="multiselect" data-multiselect="${e.name}" value="${Q(t)}" ${r.includes(t)?`checked`:``} />
|
|
397
|
-
<span class="simulator-label">${Q((i=e.displays[n])==null?t:i)}</span>
|
|
398
|
-
</label>`}).join(``);return`
|
|
399
|
-
<div class="simulator-field">
|
|
400
|
-
${Z(e)}
|
|
401
|
-
${a}
|
|
402
|
-
</div>`}case`number`:{var a;let n=(a=t[e.name])==null?e.defaultValue:a,r=e.values.map(e=>`<option value="${e}" ${e===n?`selected`:``}>${e}</option>`).join(``);return`
|
|
403
|
-
<div class="simulator-field">
|
|
404
|
-
${Z(e)}
|
|
405
|
-
<select class="simulator-select" data-setting="${e.name}" data-setting-type="number">${r}</select>
|
|
406
|
-
</div>`}case`text`:{var o,s;let n=String((o=(s=t[e.name])==null?e.defaultValue:s)==null?``:o),r=e.textarea?`<textarea class="simulator-textarea" data-setting="${e.name}">${Q(n)}</textarea>`:`<input class="simulator-input" type="text" data-setting="${e.name}" value="${Q(n)}" />`;return`
|
|
407
|
-
<div class="simulator-field">
|
|
408
|
-
${Z(e)}
|
|
409
|
-
${r}
|
|
410
|
-
</div>`}default:return`<div class="sim-settings-unsupported">Unsupported component type: ${Q(e.type)}</div>`}}function Z(e){let t=e.subtitle?`<div class="sim-settings-subtitle">${Q(e.subtitle)}</div>`:``;return`<span class="simulator-label">${Q(e.title)}</span>${t}`}function kt(e){let t={};for(let n of e)n.type===`split`?Object.assign(t,kt(n.content)):`name`in n&&(t[n.name]=n.defaultValue);return t}function Q(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function At(){let e=[],t=!0,n=()=>e.length===0?`<div class="sound-empty">No cues yet. Play the game to hear from it.</div>`:e.map(e=>`<div class="sound-row"><span class="sound-id">${Mt(e.id)}</span>${e.haptic?`<span class="sound-haptic">${Mt(e.haptic)}</span>`:``}<span class="sound-time">${e.time}</span></div>`).join(``),r=t=>{let r=t.getElement(`#sound-events`);r&&(r.innerHTML=n()),t.updateBadge(`sound`,e.length)};return{id:`sound`,label:`Sound`,render(){return`
|
|
411
|
-
<style>
|
|
412
|
-
#simulator-tab-sound .sound-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-family: monospace; font-size: 11px; }
|
|
413
|
-
#simulator-tab-sound .sound-id { color: var(--accent, #6cf); }
|
|
414
|
-
#simulator-tab-sound .sound-haptic { opacity: 0.7; }
|
|
415
|
-
#simulator-tab-sound .sound-time { opacity: 0.5; }
|
|
416
|
-
#simulator-tab-sound .sound-empty { opacity: 0.5; font-size: 11px; padding: 4px 0; }
|
|
417
|
-
#simulator-tab-sound .sound-controls { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
|
|
418
|
-
#simulator-tab-sound .sound-toggle { font-size: 11px; display: flex; align-items: center; gap: 4px; }
|
|
419
|
-
</style>
|
|
420
|
-
<div class="simulator-section">
|
|
421
|
-
<div class="simulator-section-title">Cues</div>
|
|
422
|
-
<div class="sound-controls">
|
|
423
|
-
<label class="sound-toggle"><input type="checkbox" id="sound-enabled" ${t?`checked`:``} /> Sound enabled</label>
|
|
424
|
-
<button class="simulator-btn" id="sound-clear">Clear</button>
|
|
425
|
-
</div>
|
|
426
|
-
<div id="sound-events">${n()}</div>
|
|
427
|
-
</div>
|
|
428
|
-
`},bind(n){let i=n.getElement(`#sound-clear`);i==null||i.addEventListener(`click`,()=>{e.length=0,r(n)});let a=n.getElement(`#sound-enabled`);a==null||a.addEventListener(`change`,()=>{t=!!a.checked,n.sendToGame(`SOUND_ENABLED`,{enabled:t})}),n.sendToGame(`SOUND_ENABLED`,{enabled:t})},onMessage(n,i,a){var o;if(n===`READY_GAME_LOADED`){a.sendToGame(`SOUND_ENABLED`,{enabled:t});return}n===`SENSORY_EVENT`&&(e.unshift({id:(o=i==null?void 0:i.id)==null?JSON.stringify(i):o,haptic:i==null?void 0:i.haptic,time:jt()}),e.length>100&&e.pop(),r(a))}}}function jt(){return new Date().toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Mt(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}var $=null;function Nt(){return typeof window>`u`?!1:new URLSearchParams(window.location.search).has(`developer`)}var Pt={updateFixtures:()=>{},sendToGame:()=>{},loadPuzzle:function(){var e=t.t(function*(){return null});return function(){return e.apply(this,arguments)}}()};function Ft(n={}){var r,i,a;if(Nt())return console.log(`[Simulator] developer=true in URL — running inside the Puzzmo app, skipping simulator boot`),Pt;if(console.log(`[Simulator] createSimulator called with config:`,{slug:n.slug,hasFixtures:!!n.fixtures}),$)return n.fixtures&&(console.log(`[Simulator] Instance already exists, updating fixtures`),$.updateFixtures(n.fixtures)),$;let o=(r=n.autoStart)==null?!0:r,s=n.fixtures?oe(n.fixtures):null,c=s?Array.from(s.keys()).sort():[],l=me(),u=Ce(),d=[ce(),le(),l,he(),ge(),u,Te(),De(n.hostContextPresets),qe(),ft(),Tt(),Dt(),At(),...(i=n.views)==null?[]:i],f=d.map(e=>e.id),p=ee(n,c,f),m={pause:`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor"><rect x="1" y="1" width="3" height="8"/><rect x="6" y="1" width="3" height="8"/></svg>`,play:`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor"><polygon points="2,1 9,5 2,9"/></svg>`,retry:`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor"><path d="M5 1C2.8 1 1 2.8 1 5s1.8 4 4 4c1.8 0 3.3-1.2 3.8-2.8H7.5c-.4.9-1.3 1.5-2.5 1.5-1.5 0-2.7-1.2-2.7-2.7S3.5 2.3 5 2.3c.7 0 1.4.3 1.9.8L5.5 4.5H9V1L7.6 2.4C6.9 1.5 5.9 1 5 1z"/></svg>`,cog:`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor"><path d="M9.5 5.8l-.8-.5c0-.2.1-.5.1-.8s0-.5-.1-.8l.8-.5c.1-.1.2-.2.1-.4l-.8-1.4c-.1-.1-.2-.2-.4-.1l-1 .3c-.3-.3-.7-.5-1.1-.6L6.1.2C6.1.1 6 0 5.8 0H4.2c-.2 0-.3.1-.3.2l-.2 1c-.4.1-.7.3-1.1.6l-1-.3c-.2 0-.3 0-.4.1l-.8 1.4c-.1.2 0 .3.1.4l.8.5c0 .2-.1.5-.1.8s0 .5.1.8l-.8.5c-.1.1-.2.2-.1.4l.8 1.4c.1.1.2.2.4.1l1-.3c.3.3.7.5 1.1.6l.2 1c0 .1.1.2.3.2h1.6c.2 0 .3-.1.3-.2l.2-1c.4-.1.7-.3 1.1-.6l1 .3c.2 0 .3 0 .4-.1l.8-1.4c.1-.2 0-.3-.1-.4zM5 6.5c-.8 0-1.5-.7-1.5-1.5S4.2 3.5 5 3.5 6.5 4.2 6.5 5 5.8 6.5 5 6.5z"/></svg>`,minimize:`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor"><rect x="1" y="4" width="8" height="2"/></svg>`,expand:`<svg width="8" height="8" viewBox="0 0 8 8" fill="currentColor"><polygon points="1,1 7,4 1,7"/></svg>`},h=document.createElement(`div`);h.id=`simulator`,h.dataset.puzzmoBuild=se,h.innerHTML=`
|
|
429
|
-
<style>
|
|
430
|
-
:root {
|
|
431
|
-
--sim-bg: #1a1a2e;
|
|
432
|
-
--sim-bg-alt: #16213e;
|
|
433
|
-
--sim-panel: #0f0f1a;
|
|
434
|
-
--sim-border: #3a3a5c;
|
|
435
|
-
--sim-border-light: #5a5a8c;
|
|
436
|
-
--sim-accent: #ffd700;
|
|
437
|
-
--sim-accent-hover: #ffed4a;
|
|
438
|
-
--sim-text: #e8e8e8;
|
|
439
|
-
--sim-text-dim: #888899;
|
|
440
|
-
--sim-success: #4ade80;
|
|
441
|
-
--sim-error: #f87171;
|
|
442
|
-
--sim-warning: #fbbf24;
|
|
443
|
-
--sim-blue: #60a5fa;
|
|
444
|
-
}
|
|
445
|
-
#simulator {
|
|
446
|
-
position: fixed;
|
|
447
|
-
bottom: 4px;
|
|
448
|
-
left: 4px;
|
|
449
|
-
z-index: 999999;
|
|
450
|
-
font: 11px/1.4 "Menlo", "Monaco", "Consolas", monospace;
|
|
451
|
-
user-select: none;
|
|
452
|
-
}
|
|
453
|
-
#simulator-panel {
|
|
454
|
-
background: var(--sim-panel);
|
|
455
|
-
border: 2px solid var(--sim-border);
|
|
456
|
-
border-radius: 4px;
|
|
457
|
-
color: var(--sim-text);
|
|
458
|
-
width: 420px;
|
|
459
|
-
max-width: calc(100vw - 8px);
|
|
460
|
-
box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
|
|
461
|
-
}
|
|
462
|
-
#simulator-panel.collapsed {
|
|
463
|
-
width: auto;
|
|
464
|
-
}
|
|
465
|
-
#simulator-header {
|
|
466
|
-
display: flex;
|
|
467
|
-
align-items: center;
|
|
468
|
-
padding: 4px 8px;
|
|
469
|
-
background: var(--sim-bg);
|
|
470
|
-
border-bottom: 2px solid var(--sim-border);
|
|
471
|
-
gap: 0;
|
|
472
|
-
}
|
|
473
|
-
#simulator-panel.collapsed #simulator-header {
|
|
474
|
-
border-bottom: none;
|
|
475
|
-
cursor: pointer;
|
|
476
|
-
}
|
|
477
|
-
#simulator-panel.collapsed #simulator-header:hover {
|
|
478
|
-
background: var(--sim-bg-alt);
|
|
479
|
-
}
|
|
480
|
-
.header-sep {
|
|
481
|
-
color: var(--sim-border-light);
|
|
482
|
-
margin: 0 8px;
|
|
483
|
-
opacity: 0.6;
|
|
484
|
-
}
|
|
485
|
-
.header-spacer {
|
|
486
|
-
flex: 1;
|
|
487
|
-
}
|
|
488
|
-
#simulator-title {
|
|
489
|
-
color: var(--sim-accent);
|
|
490
|
-
text-transform: uppercase;
|
|
491
|
-
letter-spacing: 1px;
|
|
492
|
-
font-size: 10px;
|
|
493
|
-
font-weight: bold;
|
|
494
|
-
}
|
|
495
|
-
#simulator-header-controls {
|
|
496
|
-
display: flex;
|
|
497
|
-
gap: 2px;
|
|
498
|
-
}
|
|
499
|
-
.header-icon-btn {
|
|
500
|
-
width: 20px;
|
|
501
|
-
height: 20px;
|
|
502
|
-
display: flex;
|
|
503
|
-
align-items: center;
|
|
504
|
-
justify-content: center;
|
|
505
|
-
background: transparent;
|
|
506
|
-
border: none;
|
|
507
|
-
border-radius: 2px;
|
|
508
|
-
color: var(--sim-text);
|
|
509
|
-
cursor: pointer;
|
|
510
|
-
padding: 0;
|
|
511
|
-
}
|
|
512
|
-
.header-icon-btn:hover:not(:disabled) {
|
|
513
|
-
background: var(--sim-border);
|
|
514
|
-
color: var(--sim-accent);
|
|
515
|
-
}
|
|
516
|
-
.header-icon-btn:disabled {
|
|
517
|
-
opacity: 0.3;
|
|
518
|
-
cursor: not-allowed;
|
|
519
|
-
}
|
|
520
|
-
.header-icon-btn.active {
|
|
521
|
-
background: var(--sim-accent);
|
|
522
|
-
color: var(--sim-panel);
|
|
523
|
-
}
|
|
524
|
-
#simulator-header-status {
|
|
525
|
-
display: flex;
|
|
526
|
-
align-items: center;
|
|
527
|
-
gap: 4px;
|
|
528
|
-
font-size: 9px;
|
|
529
|
-
color: var(--sim-text-dim);
|
|
530
|
-
}
|
|
531
|
-
#simulator-header-indicator {
|
|
532
|
-
width: 6px;
|
|
533
|
-
height: 6px;
|
|
534
|
-
border-radius: 50%;
|
|
535
|
-
background: var(--sim-text-dim);
|
|
536
|
-
flex-shrink: 0;
|
|
537
|
-
}
|
|
538
|
-
#simulator-header-indicator.ready {
|
|
539
|
-
background: var(--sim-success);
|
|
540
|
-
box-shadow: 0 0 4px var(--sim-success);
|
|
541
|
-
}
|
|
542
|
-
#simulator-header-indicator.waiting {
|
|
543
|
-
background: var(--sim-warning);
|
|
544
|
-
box-shadow: 0 0 4px var(--sim-warning);
|
|
545
|
-
}
|
|
546
|
-
#simulator-header-indicator.paused {
|
|
547
|
-
background: var(--sim-error);
|
|
548
|
-
box-shadow: 0 0 4px var(--sim-error);
|
|
549
|
-
}
|
|
550
|
-
#simulator-header-indicator.complete {
|
|
551
|
-
background: transparent;
|
|
552
|
-
box-shadow: none;
|
|
553
|
-
color: var(--sim-success);
|
|
554
|
-
width: auto;
|
|
555
|
-
height: auto;
|
|
556
|
-
font-size: 11px;
|
|
557
|
-
line-height: 1;
|
|
558
|
-
font-weight: bold;
|
|
559
|
-
}
|
|
560
|
-
#simulator-timer {
|
|
561
|
-
font-size: 11px;
|
|
562
|
-
color: var(--sim-text);
|
|
563
|
-
font-family: "Menlo", monospace;
|
|
564
|
-
font-weight: bold;
|
|
565
|
-
font-variant-numeric: tabular-nums;
|
|
566
|
-
min-width: 38px;
|
|
567
|
-
}
|
|
568
|
-
#simulator-timer .penalty {
|
|
569
|
-
color: var(--sim-error);
|
|
570
|
-
margin-left: 2px;
|
|
571
|
-
}
|
|
572
|
-
/* Collapsed state - show minimal bar */
|
|
573
|
-
#simulator-panel.collapsed .header-sep,
|
|
574
|
-
#simulator-panel.collapsed #simulator-header-controls,
|
|
575
|
-
#simulator-panel.collapsed #simulator-header-status,
|
|
576
|
-
#simulator-panel.collapsed #simulator-header-settings,
|
|
577
|
-
#simulator-panel.collapsed #simulator-toggle {
|
|
578
|
-
display: none;
|
|
579
|
-
}
|
|
580
|
-
#simulator-panel.collapsed #simulator-title {
|
|
581
|
-
cursor: pointer;
|
|
582
|
-
}
|
|
583
|
-
#simulator-panel.collapsed #simulator-timer {
|
|
584
|
-
margin-left: 8px;
|
|
585
|
-
}
|
|
586
|
-
#simulator-body {
|
|
587
|
-
display: flex;
|
|
588
|
-
flex-direction: row;
|
|
589
|
-
}
|
|
590
|
-
#simulator-panel.collapsed #simulator-body {
|
|
591
|
-
display: none;
|
|
592
|
-
}
|
|
593
|
-
#simulator-tabs {
|
|
594
|
-
display: flex;
|
|
595
|
-
flex-direction: column;
|
|
596
|
-
background: var(--sim-bg);
|
|
597
|
-
padding: 4px;
|
|
598
|
-
gap: 2px;
|
|
599
|
-
border-right: 2px solid var(--sim-border);
|
|
600
|
-
}
|
|
601
|
-
.simulator-tab {
|
|
602
|
-
padding: 2px 3px;
|
|
603
|
-
background: var(--sim-bg-alt);
|
|
604
|
-
border: 2px solid var(--sim-border);
|
|
605
|
-
border-radius: 2px;
|
|
606
|
-
color: var(--sim-text-dim);
|
|
607
|
-
cursor: pointer;
|
|
608
|
-
font: inherit;
|
|
609
|
-
text-transform: uppercase;
|
|
610
|
-
font-size: 9px;
|
|
611
|
-
font-weight: bold;
|
|
612
|
-
letter-spacing: 0.5px;
|
|
613
|
-
min-height: 0;
|
|
614
|
-
}
|
|
615
|
-
.simulator-tab:hover {
|
|
616
|
-
color: var(--sim-text);
|
|
617
|
-
background: var(--sim-border);
|
|
618
|
-
}
|
|
619
|
-
.simulator-tab.active {
|
|
620
|
-
color: var(--sim-panel);
|
|
621
|
-
background: var(--sim-accent);
|
|
622
|
-
border-color: var(--sim-accent);
|
|
623
|
-
}
|
|
624
|
-
.simulator-tab {
|
|
625
|
-
position: relative;
|
|
626
|
-
}
|
|
627
|
-
.simulator-tab-badge {
|
|
628
|
-
position: absolute;
|
|
629
|
-
top: -4px;
|
|
630
|
-
right: -4px;
|
|
631
|
-
min-width: 14px;
|
|
632
|
-
height: 14px;
|
|
633
|
-
padding: 0 3px;
|
|
634
|
-
background: var(--sim-blue);
|
|
635
|
-
color: #fff;
|
|
636
|
-
font-size: 8px;
|
|
637
|
-
font-weight: bold;
|
|
638
|
-
border-radius: 7px;
|
|
639
|
-
display: flex;
|
|
640
|
-
align-items: center;
|
|
641
|
-
justify-content: center;
|
|
642
|
-
box-shadow: 0 1px 2px rgba(0,0,0,0.3);
|
|
643
|
-
line-height: 1;
|
|
644
|
-
text-align: center;
|
|
645
|
-
box-sizing: border-box;
|
|
646
|
-
}
|
|
647
|
-
.simulator-tab-badge:empty {
|
|
648
|
-
display: none;
|
|
649
|
-
}
|
|
650
|
-
#simulator-content {
|
|
651
|
-
padding: 6px;
|
|
652
|
-
background: var(--sim-panel);
|
|
653
|
-
height: 500px;
|
|
654
|
-
flex: 1;
|
|
655
|
-
overflow-y: auto;
|
|
656
|
-
}
|
|
657
|
-
#simulator-content.hidden {
|
|
658
|
-
display: none;
|
|
659
|
-
}
|
|
660
|
-
#simulator-content::-webkit-scrollbar {
|
|
661
|
-
width: 8px;
|
|
662
|
-
}
|
|
663
|
-
#simulator-content::-webkit-scrollbar-track {
|
|
664
|
-
background: var(--sim-bg);
|
|
665
|
-
}
|
|
666
|
-
#simulator-content::-webkit-scrollbar-thumb {
|
|
667
|
-
background: var(--sim-border);
|
|
668
|
-
border-radius: 2px;
|
|
669
|
-
}
|
|
670
|
-
.simulator-btn {
|
|
671
|
-
padding: 4px 8px;
|
|
672
|
-
background: var(--sim-bg-alt);
|
|
673
|
-
border: 2px solid var(--sim-border);
|
|
674
|
-
border-radius: 2px;
|
|
675
|
-
color: var(--sim-text);
|
|
676
|
-
font: inherit;
|
|
677
|
-
font-size: 10px;
|
|
678
|
-
font-weight: bold;
|
|
679
|
-
text-transform: uppercase;
|
|
680
|
-
letter-spacing: 1px;
|
|
681
|
-
cursor: pointer;
|
|
682
|
-
}
|
|
683
|
-
.simulator-btn:hover {
|
|
684
|
-
background: var(--sim-border);
|
|
685
|
-
border-color: var(--sim-border-light);
|
|
686
|
-
}
|
|
687
|
-
.simulator-btn:active {
|
|
688
|
-
transform: translate(1px, 1px);
|
|
689
|
-
}
|
|
690
|
-
.simulator-btn.primary {
|
|
691
|
-
background: var(--sim-accent);
|
|
692
|
-
border-color: var(--sim-accent);
|
|
693
|
-
color: var(--sim-panel);
|
|
694
|
-
}
|
|
695
|
-
.simulator-btn.primary:hover {
|
|
696
|
-
background: var(--sim-accent-hover);
|
|
697
|
-
border-color: var(--sim-accent-hover);
|
|
698
|
-
}
|
|
699
|
-
.simulator-btn.danger {
|
|
700
|
-
background: var(--sim-error);
|
|
701
|
-
border-color: var(--sim-error);
|
|
702
|
-
color: #fff;
|
|
703
|
-
}
|
|
704
|
-
.simulator-btn.danger:hover {
|
|
705
|
-
background: #ef4444;
|
|
706
|
-
border-color: #ef4444;
|
|
707
|
-
}
|
|
708
|
-
.simulator-btn:disabled {
|
|
709
|
-
opacity: 0.4;
|
|
710
|
-
cursor: not-allowed;
|
|
711
|
-
transform: none;
|
|
712
|
-
}
|
|
713
|
-
.simulator-btn.subtle {
|
|
714
|
-
background: transparent;
|
|
715
|
-
border-color: transparent;
|
|
716
|
-
color: var(--sim-text-dim);
|
|
717
|
-
}
|
|
718
|
-
.simulator-btn.subtle:hover:not(:disabled) {
|
|
719
|
-
background: var(--sim-bg-alt);
|
|
720
|
-
border-color: var(--sim-border);
|
|
721
|
-
color: var(--sim-text);
|
|
722
|
-
}
|
|
723
|
-
#simulator-status {
|
|
724
|
-
font-size: 10px;
|
|
725
|
-
color: var(--sim-text-dim);
|
|
726
|
-
padding: 4px 0 6px;
|
|
727
|
-
display: flex;
|
|
728
|
-
align-items: center;
|
|
729
|
-
gap: 6px;
|
|
730
|
-
}
|
|
731
|
-
#simulator-status .indicator {
|
|
732
|
-
width: 8px;
|
|
733
|
-
height: 8px;
|
|
734
|
-
border-radius: 2px;
|
|
735
|
-
background: var(--sim-text-dim);
|
|
736
|
-
}
|
|
737
|
-
#simulator-status .indicator.ready {
|
|
738
|
-
background: var(--sim-success);
|
|
739
|
-
box-shadow: 0 0 6px var(--sim-success);
|
|
740
|
-
}
|
|
741
|
-
#simulator-status .indicator.waiting {
|
|
742
|
-
background: var(--sim-warning);
|
|
743
|
-
box-shadow: 0 0 6px var(--sim-warning);
|
|
744
|
-
}
|
|
745
|
-
#simulator-status .indicator.paused {
|
|
746
|
-
background: var(--sim-error);
|
|
747
|
-
box-shadow: 0 0 6px var(--sim-error);
|
|
748
|
-
}
|
|
749
|
-
#simulator-status .indicator.complete {
|
|
750
|
-
background: transparent;
|
|
751
|
-
box-shadow: none;
|
|
752
|
-
color: var(--sim-success);
|
|
753
|
-
width: auto;
|
|
754
|
-
height: auto;
|
|
755
|
-
font-size: 12px;
|
|
756
|
-
line-height: 1;
|
|
757
|
-
font-weight: bold;
|
|
758
|
-
}
|
|
759
|
-
.simulator-row {
|
|
760
|
-
display: flex;
|
|
761
|
-
gap: 4px;
|
|
762
|
-
margin-top: 4px;
|
|
763
|
-
}
|
|
764
|
-
.simulator-row .simulator-btn {
|
|
765
|
-
flex: 1;
|
|
766
|
-
}
|
|
767
|
-
.simulator-divider {
|
|
768
|
-
height: 2px;
|
|
769
|
-
background: var(--sim-border);
|
|
770
|
-
margin: 8px 0;
|
|
771
|
-
}
|
|
772
|
-
.simulator-field {
|
|
773
|
-
margin-bottom: 6px;
|
|
774
|
-
}
|
|
775
|
-
.simulator-select {
|
|
776
|
-
width: 100%;
|
|
777
|
-
padding: 4px 6px;
|
|
778
|
-
background: var(--sim-bg);
|
|
779
|
-
border: 2px solid var(--sim-border);
|
|
780
|
-
border-radius: 2px;
|
|
781
|
-
color: var(--sim-text);
|
|
782
|
-
font: inherit;
|
|
783
|
-
font-size: 10px;
|
|
784
|
-
cursor: pointer;
|
|
785
|
-
}
|
|
786
|
-
.simulator-select:focus {
|
|
787
|
-
outline: none;
|
|
788
|
-
border-color: var(--sim-accent);
|
|
789
|
-
}
|
|
790
|
-
.simulator-select option {
|
|
791
|
-
background: var(--sim-bg);
|
|
792
|
-
color: var(--sim-text);
|
|
793
|
-
}
|
|
794
|
-
.simulator-fixtures {
|
|
795
|
-
margin-bottom: 8px;
|
|
796
|
-
padding-bottom: 8px;
|
|
797
|
-
border-bottom: 2px solid var(--sim-border);
|
|
798
|
-
}
|
|
799
|
-
.simulator-label {
|
|
800
|
-
display: block;
|
|
801
|
-
color: var(--sim-accent);
|
|
802
|
-
text-transform: uppercase;
|
|
803
|
-
font-size: 9px;
|
|
804
|
-
font-weight: bold;
|
|
805
|
-
letter-spacing: 1px;
|
|
806
|
-
margin-bottom: 4px;
|
|
807
|
-
}
|
|
808
|
-
.simulator-override-tag {
|
|
809
|
-
display: inline-block;
|
|
810
|
-
margin-left: 6px;
|
|
811
|
-
padding: 0 4px;
|
|
812
|
-
border-radius: 2px;
|
|
813
|
-
background: var(--sim-accent);
|
|
814
|
-
color: var(--sim-bg);
|
|
815
|
-
font-size: 8px;
|
|
816
|
-
letter-spacing: 0.5px;
|
|
817
|
-
}
|
|
818
|
-
.simulator-override-tag[hidden] {
|
|
819
|
-
display: none;
|
|
820
|
-
}
|
|
821
|
-
.simulator-textarea {
|
|
822
|
-
width: 100%;
|
|
823
|
-
min-height: 40px;
|
|
824
|
-
background: var(--sim-bg);
|
|
825
|
-
border: 2px solid var(--sim-border);
|
|
826
|
-
border-radius: 2px;
|
|
827
|
-
color: var(--sim-text);
|
|
828
|
-
font: 10px/1.4 "Menlo", monospace;
|
|
829
|
-
padding: 4px;
|
|
830
|
-
resize: none;
|
|
831
|
-
box-sizing: border-box;
|
|
832
|
-
overflow-y: auto;
|
|
833
|
-
}
|
|
834
|
-
.simulator-textarea.auto-resize {
|
|
835
|
-
resize: none;
|
|
836
|
-
overflow-y: auto;
|
|
837
|
-
}
|
|
838
|
-
.simulator-textarea:focus {
|
|
839
|
-
outline: none;
|
|
840
|
-
border-color: var(--sim-accent);
|
|
841
|
-
}
|
|
842
|
-
.simulator-input {
|
|
843
|
-
width: 100%;
|
|
844
|
-
background: var(--sim-bg);
|
|
845
|
-
border: 2px solid var(--sim-border);
|
|
846
|
-
border-radius: 2px;
|
|
847
|
-
color: var(--sim-text);
|
|
848
|
-
font: 10px/1.4 "Menlo", monospace;
|
|
849
|
-
padding: 4px 6px;
|
|
850
|
-
box-sizing: border-box;
|
|
851
|
-
}
|
|
852
|
-
.simulator-input:focus {
|
|
853
|
-
outline: none;
|
|
854
|
-
border-color: var(--sim-accent);
|
|
855
|
-
}
|
|
856
|
-
.simulator-input::placeholder {
|
|
857
|
-
color: var(--sim-text-dim);
|
|
858
|
-
}
|
|
859
|
-
.simulator-tab-content {
|
|
860
|
-
display: none;
|
|
861
|
-
}
|
|
862
|
-
.simulator-tab-content.active {
|
|
863
|
-
display: block;
|
|
864
|
-
}
|
|
865
|
-
.msgs-view-container {
|
|
866
|
-
display: flex;
|
|
867
|
-
flex-direction: column;
|
|
868
|
-
height: 100%;
|
|
869
|
-
overflow: hidden;
|
|
870
|
-
}
|
|
871
|
-
.msgs-header {
|
|
872
|
-
display: flex;
|
|
873
|
-
justify-content: space-between;
|
|
874
|
-
align-items: center;
|
|
875
|
-
margin-bottom: 6px;
|
|
876
|
-
flex-shrink: 0;
|
|
877
|
-
}
|
|
878
|
-
#simulator-msgs-log {
|
|
879
|
-
display: flex;
|
|
880
|
-
flex-direction: column;
|
|
881
|
-
gap: 2px;
|
|
882
|
-
flex: 1;
|
|
883
|
-
overflow-y: auto;
|
|
884
|
-
}
|
|
885
|
-
.simulator-msg {
|
|
886
|
-
padding: 3px 4px;
|
|
887
|
-
background: var(--sim-bg);
|
|
888
|
-
border: 1px solid var(--sim-border);
|
|
889
|
-
border-radius: 2px;
|
|
890
|
-
font-size: 10px;
|
|
891
|
-
}
|
|
892
|
-
.simulator-msg.out {
|
|
893
|
-
border-left: 2px solid var(--sim-accent);
|
|
894
|
-
}
|
|
895
|
-
.simulator-msg.in {
|
|
896
|
-
border-left: 2px solid var(--sim-blue);
|
|
897
|
-
}
|
|
898
|
-
.simulator-msg-header {
|
|
899
|
-
display: flex;
|
|
900
|
-
justify-content: space-between;
|
|
901
|
-
align-items: center;
|
|
902
|
-
margin-bottom: 2px;
|
|
903
|
-
}
|
|
904
|
-
.simulator-msg-type {
|
|
905
|
-
font-weight: bold;
|
|
906
|
-
color: var(--sim-text);
|
|
907
|
-
}
|
|
908
|
-
.simulator-msg.out .simulator-msg-type {
|
|
909
|
-
color: var(--sim-accent);
|
|
910
|
-
}
|
|
911
|
-
.simulator-msg.in .simulator-msg-type {
|
|
912
|
-
color: var(--sim-blue);
|
|
913
|
-
}
|
|
914
|
-
.simulator-msg-time {
|
|
915
|
-
color: var(--sim-text-dim);
|
|
916
|
-
font-size: 9px;
|
|
917
|
-
}
|
|
918
|
-
.simulator-msg-data {
|
|
919
|
-
color: var(--sim-text-dim);
|
|
920
|
-
font-size: 9px;
|
|
921
|
-
white-space: pre-wrap;
|
|
922
|
-
word-break: break-all;
|
|
923
|
-
max-height: 60px;
|
|
924
|
-
overflow: hidden;
|
|
925
|
-
cursor: pointer;
|
|
926
|
-
border-radius: 2px;
|
|
927
|
-
padding: 2px 4px;
|
|
928
|
-
background: var(--sim-bg-alt);
|
|
929
|
-
}
|
|
930
|
-
.simulator-msg-data:hover {
|
|
931
|
-
background: var(--sim-border);
|
|
932
|
-
}
|
|
933
|
-
.simulator-msg.expanded {
|
|
934
|
-
flex: 1;
|
|
935
|
-
display: flex;
|
|
936
|
-
flex-direction: column;
|
|
937
|
-
}
|
|
938
|
-
.simulator-msg.expanded .simulator-msg-data {
|
|
939
|
-
max-height: none;
|
|
940
|
-
flex: 1;
|
|
941
|
-
overflow-y: auto;
|
|
942
|
-
}
|
|
943
|
-
.simulator-empty {
|
|
944
|
-
color: var(--sim-text-dim);
|
|
945
|
-
font-size: 10px;
|
|
946
|
-
text-align: center;
|
|
947
|
-
padding: 20px;
|
|
948
|
-
}
|
|
949
|
-
.simulator-share-preview {
|
|
950
|
-
margin: 0;
|
|
951
|
-
padding: 8px;
|
|
952
|
-
text-align: left;
|
|
953
|
-
font-size: 13px;
|
|
954
|
-
line-height: 1.45;
|
|
955
|
-
white-space: pre-wrap;
|
|
956
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
957
|
-
}
|
|
958
|
-
.simulator-segmented {
|
|
959
|
-
display: flex;
|
|
960
|
-
gap: 2px;
|
|
961
|
-
padding: 2px;
|
|
962
|
-
background: var(--sim-bg);
|
|
963
|
-
border: 2px solid var(--sim-border);
|
|
964
|
-
border-radius: 2px;
|
|
965
|
-
margin-bottom: 6px;
|
|
966
|
-
}
|
|
967
|
-
.simulator-segmented-btn {
|
|
968
|
-
flex: 1;
|
|
969
|
-
padding: 4px 8px;
|
|
970
|
-
background: transparent;
|
|
971
|
-
border: 0;
|
|
972
|
-
border-radius: 2px;
|
|
973
|
-
color: var(--sim-text-dim);
|
|
974
|
-
font: inherit;
|
|
975
|
-
font-size: 10px;
|
|
976
|
-
font-weight: bold;
|
|
977
|
-
text-transform: uppercase;
|
|
978
|
-
letter-spacing: 1px;
|
|
979
|
-
cursor: pointer;
|
|
980
|
-
}
|
|
981
|
-
.simulator-segmented-btn:hover:not(.active) {
|
|
982
|
-
color: var(--sim-text);
|
|
983
|
-
}
|
|
984
|
-
.simulator-segmented-btn.active {
|
|
985
|
-
background: var(--sim-border);
|
|
986
|
-
color: var(--sim-text);
|
|
987
|
-
}
|
|
988
|
-
.simulator-share-missing {
|
|
989
|
-
color: var(--sim-text-dim);
|
|
990
|
-
font-size: 11px;
|
|
991
|
-
padding: 12px;
|
|
992
|
-
line-height: 1.4;
|
|
993
|
-
}
|
|
994
|
-
.simulator-share-missing p {
|
|
995
|
-
margin: 0 0 6px;
|
|
996
|
-
}
|
|
997
|
-
.simulator-share-missing code {
|
|
998
|
-
color: var(--sim-text);
|
|
999
|
-
background: var(--sim-bg);
|
|
1000
|
-
padding: 1px 4px;
|
|
1001
|
-
border-radius: 2px;
|
|
1002
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1003
|
-
}
|
|
1004
|
-
.simulator-share-missing pre {
|
|
1005
|
-
margin: 6px 0 0;
|
|
1006
|
-
padding: 8px;
|
|
1007
|
-
background: var(--sim-bg);
|
|
1008
|
-
border: 1px solid var(--sim-border);
|
|
1009
|
-
border-radius: 2px;
|
|
1010
|
-
color: var(--sim-text);
|
|
1011
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1012
|
-
font-size: 10.5px;
|
|
1013
|
-
line-height: 1.45;
|
|
1014
|
-
white-space: pre-wrap;
|
|
1015
|
-
overflow-x: auto;
|
|
1016
|
-
}
|
|
1017
|
-
.simulator-value {
|
|
1018
|
-
color: var(--sim-text);
|
|
1019
|
-
font-size: 10px;
|
|
1020
|
-
padding: 4px;
|
|
1021
|
-
background: var(--sim-bg);
|
|
1022
|
-
border: 1px solid var(--sim-border);
|
|
1023
|
-
border-radius: 2px;
|
|
1024
|
-
}
|
|
1025
|
-
.simulator-deeds {
|
|
1026
|
-
display: flex;
|
|
1027
|
-
flex-direction: column;
|
|
1028
|
-
gap: 2px;
|
|
1029
|
-
}
|
|
1030
|
-
.simulator-deed {
|
|
1031
|
-
display: flex;
|
|
1032
|
-
justify-content: space-between;
|
|
1033
|
-
padding: 3px 4px;
|
|
1034
|
-
background: var(--sim-bg);
|
|
1035
|
-
border: 1px solid var(--sim-border);
|
|
1036
|
-
border-radius: 2px;
|
|
1037
|
-
font-size: 10px;
|
|
1038
|
-
}
|
|
1039
|
-
.simulator-deed-name {
|
|
1040
|
-
color: var(--sim-text);
|
|
1041
|
-
}
|
|
1042
|
-
.simulator-deed-value {
|
|
1043
|
-
color: var(--sim-accent);
|
|
1044
|
-
font-weight: bold;
|
|
1045
|
-
}
|
|
1046
|
-
.thumb-view-container {
|
|
1047
|
-
display: flex;
|
|
1048
|
-
flex-direction: column;
|
|
1049
|
-
height: 100%;
|
|
1050
|
-
overflow: hidden;
|
|
1051
|
-
}
|
|
1052
|
-
.thumb-header {
|
|
1053
|
-
display: flex;
|
|
1054
|
-
justify-content: space-between;
|
|
1055
|
-
align-items: center;
|
|
1056
|
-
margin-bottom: 6px;
|
|
1057
|
-
flex-shrink: 0;
|
|
1058
|
-
}
|
|
1059
|
-
#simulator-thumb-preview {
|
|
1060
|
-
background: var(--sim-thumb-bg, transparent);
|
|
1061
|
-
border: 2px solid var(--sim-border);
|
|
1062
|
-
border-radius: 2px;
|
|
1063
|
-
padding: 8px;
|
|
1064
|
-
display: flex;
|
|
1065
|
-
align-items: center;
|
|
1066
|
-
justify-content: center;
|
|
1067
|
-
aspect-ratio: 1;
|
|
1068
|
-
width: 100%;
|
|
1069
|
-
box-sizing: border-box;
|
|
1070
|
-
}
|
|
1071
|
-
#simulator-thumb-preview svg {
|
|
1072
|
-
width: 100%;
|
|
1073
|
-
height: 100%;
|
|
1074
|
-
max-width: 100%;
|
|
1075
|
-
max-height: 100%;
|
|
1076
|
-
}
|
|
1077
|
-
#simulator-thumb-fn {
|
|
1078
|
-
font-size: 10px;
|
|
1079
|
-
color: var(--sim-text-dim);
|
|
1080
|
-
margin-top: 4px;
|
|
1081
|
-
}
|
|
1082
|
-
.theme-view-container {
|
|
1083
|
-
display: flex;
|
|
1084
|
-
flex-direction: column;
|
|
1085
|
-
height: 100%;
|
|
1086
|
-
overflow: hidden;
|
|
1087
|
-
}
|
|
1088
|
-
.theme-header {
|
|
1089
|
-
display: flex;
|
|
1090
|
-
justify-content: space-between;
|
|
1091
|
-
align-items: center;
|
|
1092
|
-
margin-bottom: 6px;
|
|
1093
|
-
flex-shrink: 0;
|
|
1094
|
-
}
|
|
1095
|
-
.simulator-themes {
|
|
1096
|
-
display: flex;
|
|
1097
|
-
flex-direction: column;
|
|
1098
|
-
gap: 4px;
|
|
1099
|
-
flex: 1;
|
|
1100
|
-
overflow-y: auto;
|
|
1101
|
-
}
|
|
1102
|
-
.simulator-theme-item {
|
|
1103
|
-
display: flex;
|
|
1104
|
-
align-items: center;
|
|
1105
|
-
gap: 8px;
|
|
1106
|
-
padding: 4px;
|
|
1107
|
-
background: var(--sim-bg);
|
|
1108
|
-
border: 2px solid var(--sim-border);
|
|
1109
|
-
border-radius: 2px;
|
|
1110
|
-
cursor: pointer;
|
|
1111
|
-
}
|
|
1112
|
-
.simulator-theme-item:hover {
|
|
1113
|
-
border-color: var(--sim-border-light);
|
|
1114
|
-
}
|
|
1115
|
-
.simulator-theme-item.selected {
|
|
1116
|
-
border-color: var(--sim-accent);
|
|
1117
|
-
background: var(--sim-bg-alt);
|
|
1118
|
-
}
|
|
1119
|
-
.simulator-theme-preview {
|
|
1120
|
-
width: 48px;
|
|
1121
|
-
height: 32px;
|
|
1122
|
-
display: grid;
|
|
1123
|
-
grid-template-columns: repeat(3, 1fr);
|
|
1124
|
-
grid-template-rows: repeat(2, 1fr);
|
|
1125
|
-
gap: 1px;
|
|
1126
|
-
border-radius: 2px;
|
|
1127
|
-
overflow: hidden;
|
|
1128
|
-
flex-shrink: 0;
|
|
1129
|
-
}
|
|
1130
|
-
.simulator-theme-preview-cell {
|
|
1131
|
-
width: 100%;
|
|
1132
|
-
height: 100%;
|
|
1133
|
-
}
|
|
1134
|
-
.simulator-theme-name {
|
|
1135
|
-
font-size: 10px;
|
|
1136
|
-
color: var(--sim-text);
|
|
1137
|
-
flex: 1;
|
|
1138
|
-
}
|
|
1139
|
-
.simulator-theme-type {
|
|
1140
|
-
font-size: 9px;
|
|
1141
|
-
color: var(--sim-text-dim);
|
|
1142
|
-
text-transform: uppercase;
|
|
1143
|
-
}
|
|
1144
|
-
/* Auth tab styles */
|
|
1145
|
-
.simulator-section {
|
|
1146
|
-
margin-bottom: 12px;
|
|
1147
|
-
}
|
|
1148
|
-
.simulator-section-title {
|
|
1149
|
-
color: var(--sim-accent);
|
|
1150
|
-
text-transform: uppercase;
|
|
1151
|
-
font-size: 10px;
|
|
1152
|
-
font-weight: bold;
|
|
1153
|
-
letter-spacing: 1px;
|
|
1154
|
-
margin-bottom: 6px;
|
|
1155
|
-
padding-bottom: 4px;
|
|
1156
|
-
border-bottom: 1px solid var(--sim-border);
|
|
1157
|
-
}
|
|
1158
|
-
.auth-header-row {
|
|
1159
|
-
display: flex;
|
|
1160
|
-
align-items: center;
|
|
1161
|
-
justify-content: space-between;
|
|
1162
|
-
margin-bottom: 6px;
|
|
1163
|
-
}
|
|
1164
|
-
.auth-status {
|
|
1165
|
-
display: flex;
|
|
1166
|
-
align-items: center;
|
|
1167
|
-
gap: 6px;
|
|
1168
|
-
font-size: 10px;
|
|
1169
|
-
color: var(--sim-text-dim);
|
|
1170
|
-
padding: 4px 0;
|
|
1171
|
-
}
|
|
1172
|
-
.auth-status.authenticated {
|
|
1173
|
-
color: var(--sim-success);
|
|
1174
|
-
}
|
|
1175
|
-
.simulator-btn.small {
|
|
1176
|
-
padding: 2px 6px;
|
|
1177
|
-
font-size: 9px;
|
|
1178
|
-
}
|
|
1179
|
-
.simulator-btn.tiny {
|
|
1180
|
-
padding: 3px 2px;
|
|
1181
|
-
font-size: 8px;
|
|
1182
|
-
border-width: 1px;
|
|
1183
|
-
line-height: 1;
|
|
1184
|
-
min-height: 0;
|
|
1185
|
-
height: auto;
|
|
1186
|
-
}
|
|
1187
|
-
.auth-title-row {
|
|
1188
|
-
display: flex;
|
|
1189
|
-
align-items: center;
|
|
1190
|
-
gap: 6px;
|
|
1191
|
-
}
|
|
1192
|
-
.auth-title-row > span:first-child {
|
|
1193
|
-
flex: 1;
|
|
1194
|
-
}
|
|
1195
|
-
.auth-title-row .simulator-btn.active {
|
|
1196
|
-
background: var(--sim-accent);
|
|
1197
|
-
color: black;
|
|
1198
|
-
}
|
|
1199
|
-
.auth-description {
|
|
1200
|
-
font-size: 10px;
|
|
1201
|
-
color: var(--sim-text-dim);
|
|
1202
|
-
margin: 6px 0;
|
|
1203
|
-
line-height: 1.4;
|
|
1204
|
-
}
|
|
1205
|
-
.auth-user-info {
|
|
1206
|
-
font-size: 10px;
|
|
1207
|
-
color: var(--sim-text-dim);
|
|
1208
|
-
padding: 6px;
|
|
1209
|
-
background: var(--sim-bg);
|
|
1210
|
-
border: 1px solid var(--sim-border);
|
|
1211
|
-
border-radius: 2px;
|
|
1212
|
-
margin-bottom: 8px;
|
|
1213
|
-
}
|
|
1214
|
-
.auth-user-info div {
|
|
1215
|
-
margin-bottom: 4px;
|
|
1216
|
-
}
|
|
1217
|
-
.auth-user-info div:last-child {
|
|
1218
|
-
margin-bottom: 0;
|
|
1219
|
-
}
|
|
1220
|
-
.auth-user-info code {
|
|
1221
|
-
color: var(--sim-text);
|
|
1222
|
-
background: var(--sim-bg-alt);
|
|
1223
|
-
padding: 1px 4px;
|
|
1224
|
-
border-radius: 2px;
|
|
1225
|
-
}
|
|
1226
|
-
.auth-warning {
|
|
1227
|
-
color: var(--sim-warning);
|
|
1228
|
-
font-style: italic;
|
|
1229
|
-
}
|
|
1230
|
-
.auth-error {
|
|
1231
|
-
margin-top: 8px;
|
|
1232
|
-
}
|
|
1233
|
-
.auth-error .error,
|
|
1234
|
-
.auth-api-result .error {
|
|
1235
|
-
color: var(--sim-error);
|
|
1236
|
-
font-size: 10px;
|
|
1237
|
-
padding: 6px;
|
|
1238
|
-
background: rgba(248, 113, 113, 0.1);
|
|
1239
|
-
border: 1px solid var(--sim-error);
|
|
1240
|
-
border-radius: 2px;
|
|
1241
|
-
}
|
|
1242
|
-
.auth-api-result {
|
|
1243
|
-
margin-top: 8px;
|
|
1244
|
-
}
|
|
1245
|
-
.auth-api-result pre {
|
|
1246
|
-
font-size: 9px;
|
|
1247
|
-
color: var(--sim-text);
|
|
1248
|
-
background: var(--sim-bg);
|
|
1249
|
-
border: 1px solid var(--sim-border);
|
|
1250
|
-
border-radius: 2px;
|
|
1251
|
-
padding: 6px;
|
|
1252
|
-
margin: 0;
|
|
1253
|
-
white-space: pre-wrap;
|
|
1254
|
-
word-break: break-all;
|
|
1255
|
-
max-height: 150px;
|
|
1256
|
-
overflow-y: auto;
|
|
1257
|
-
}
|
|
1258
|
-
.auth-api-result .loading {
|
|
1259
|
-
font-size: 10px;
|
|
1260
|
-
color: var(--sim-text-dim);
|
|
1261
|
-
padding: 6px;
|
|
1262
|
-
background: var(--sim-bg);
|
|
1263
|
-
border: 1px solid var(--sim-border);
|
|
1264
|
-
border-radius: 2px;
|
|
1265
|
-
}
|
|
1266
|
-
/* Data view styles */
|
|
1267
|
-
.data-view-container {
|
|
1268
|
-
display: flex;
|
|
1269
|
-
flex-direction: column;
|
|
1270
|
-
height: 100%;
|
|
1271
|
-
overflow: hidden;
|
|
1272
|
-
}
|
|
1273
|
-
.data-subtabs {
|
|
1274
|
-
display: flex;
|
|
1275
|
-
gap: 2px;
|
|
1276
|
-
margin-bottom: 8px;
|
|
1277
|
-
flex-shrink: 0;
|
|
1278
|
-
}
|
|
1279
|
-
.data-subtab {
|
|
1280
|
-
padding: 4px 10px;
|
|
1281
|
-
background: var(--sim-bg-alt);
|
|
1282
|
-
border: 1px solid var(--sim-border);
|
|
1283
|
-
border-radius: 2px;
|
|
1284
|
-
color: var(--sim-text-dim);
|
|
1285
|
-
cursor: pointer;
|
|
1286
|
-
font: inherit;
|
|
1287
|
-
font-size: 9px;
|
|
1288
|
-
font-weight: bold;
|
|
1289
|
-
text-transform: uppercase;
|
|
1290
|
-
letter-spacing: 0.5px;
|
|
1291
|
-
}
|
|
1292
|
-
.data-subtab:hover {
|
|
1293
|
-
color: var(--sim-text);
|
|
1294
|
-
background: var(--sim-border);
|
|
1295
|
-
}
|
|
1296
|
-
.data-subtab.active {
|
|
1297
|
-
color: var(--sim-panel);
|
|
1298
|
-
background: var(--sim-accent);
|
|
1299
|
-
border-color: var(--sim-accent);
|
|
1300
|
-
}
|
|
1301
|
-
.data-subtab-content {
|
|
1302
|
-
display: none;
|
|
1303
|
-
flex: 1;
|
|
1304
|
-
overflow-y: auto;
|
|
1305
|
-
overflow-x: hidden;
|
|
1306
|
-
}
|
|
1307
|
-
.data-subtab-content.active {
|
|
1308
|
-
display: flex;
|
|
1309
|
-
flex-direction: column;
|
|
1310
|
-
}
|
|
1311
|
-
/* History tab styles */
|
|
1312
|
-
.history-header {
|
|
1313
|
-
display: flex;
|
|
1314
|
-
justify-content: space-between;
|
|
1315
|
-
align-items: center;
|
|
1316
|
-
margin-bottom: 6px;
|
|
1317
|
-
flex-shrink: 0;
|
|
1318
|
-
}
|
|
1319
|
-
.history-list {
|
|
1320
|
-
display: flex;
|
|
1321
|
-
flex-direction: column;
|
|
1322
|
-
gap: 4px;
|
|
1323
|
-
flex: 1;
|
|
1324
|
-
overflow-y: auto;
|
|
1325
|
-
}
|
|
1326
|
-
.history-item {
|
|
1327
|
-
padding: 6px;
|
|
1328
|
-
background: var(--sim-bg);
|
|
1329
|
-
border: 1px solid var(--sim-border);
|
|
1330
|
-
border-radius: 2px;
|
|
1331
|
-
display: flex;
|
|
1332
|
-
flex-direction: row;
|
|
1333
|
-
gap: 8px;
|
|
1334
|
-
}
|
|
1335
|
-
.history-item:hover {
|
|
1336
|
-
border-color: var(--sim-border-light);
|
|
1337
|
-
}
|
|
1338
|
-
.history-item-thumb {
|
|
1339
|
-
width: 80px;
|
|
1340
|
-
height: 80px;
|
|
1341
|
-
flex-shrink: 0;
|
|
1342
|
-
background: var(--history-thumb-bg, var(--sim-bg-alt));
|
|
1343
|
-
border: 1px solid var(--sim-border);
|
|
1344
|
-
border-radius: 2px;
|
|
1345
|
-
display: flex;
|
|
1346
|
-
align-items: center;
|
|
1347
|
-
justify-content: center;
|
|
1348
|
-
overflow: hidden;
|
|
1349
|
-
}
|
|
1350
|
-
.history-item-thumb svg {
|
|
1351
|
-
width: 100%;
|
|
1352
|
-
height: 100%;
|
|
1353
|
-
}
|
|
1354
|
-
.history-item-thumb:empty {
|
|
1355
|
-
display: none;
|
|
1356
|
-
}
|
|
1357
|
-
.history-item-content {
|
|
1358
|
-
flex: 1;
|
|
1359
|
-
min-width: 0;
|
|
1360
|
-
display: flex;
|
|
1361
|
-
flex-direction: column;
|
|
1362
|
-
gap: 4px;
|
|
1363
|
-
}
|
|
1364
|
-
.history-item-header {
|
|
1365
|
-
display: flex;
|
|
1366
|
-
align-items: center;
|
|
1367
|
-
gap: 6px;
|
|
1368
|
-
}
|
|
1369
|
-
.history-item-num {
|
|
1370
|
-
color: var(--sim-accent);
|
|
1371
|
-
font-weight: bold;
|
|
1372
|
-
font-size: 9px;
|
|
1373
|
-
}
|
|
1374
|
-
.history-item-time {
|
|
1375
|
-
color: var(--sim-text-dim);
|
|
1376
|
-
font-size: 9px;
|
|
1377
|
-
flex: 1;
|
|
1378
|
-
}
|
|
1379
|
-
.history-item-preview {
|
|
1380
|
-
font-size: 9px;
|
|
1381
|
-
color: var(--sim-text);
|
|
1382
|
-
word-break: break-all;
|
|
1383
|
-
line-height: 1.3;
|
|
1384
|
-
background: var(--sim-bg-alt);
|
|
1385
|
-
padding: 3px 4px;
|
|
1386
|
-
border-radius: 2px;
|
|
1387
|
-
flex: 1;
|
|
1388
|
-
overflow: hidden;
|
|
1389
|
-
}
|
|
1390
|
-
/* Saves tab styles */
|
|
1391
|
-
.save-new {
|
|
1392
|
-
display: flex;
|
|
1393
|
-
gap: 4px;
|
|
1394
|
-
margin-bottom: 8px;
|
|
1395
|
-
flex-shrink: 0;
|
|
1396
|
-
}
|
|
1397
|
-
.save-new .simulator-input {
|
|
1398
|
-
flex: 1;
|
|
1399
|
-
}
|
|
1400
|
-
.saves-list {
|
|
1401
|
-
display: flex;
|
|
1402
|
-
flex-direction: column;
|
|
1403
|
-
gap: 4px;
|
|
1404
|
-
flex: 1;
|
|
1405
|
-
overflow-y: auto;
|
|
1406
|
-
}
|
|
1407
|
-
.save-item {
|
|
1408
|
-
padding: 6px;
|
|
1409
|
-
background: var(--sim-bg);
|
|
1410
|
-
border: 1px solid var(--sim-border);
|
|
1411
|
-
border-radius: 2px;
|
|
1412
|
-
}
|
|
1413
|
-
.save-item:hover {
|
|
1414
|
-
border-color: var(--sim-border-light);
|
|
1415
|
-
}
|
|
1416
|
-
.save-item-header {
|
|
1417
|
-
display: flex;
|
|
1418
|
-
justify-content: space-between;
|
|
1419
|
-
align-items: center;
|
|
1420
|
-
margin-bottom: 4px;
|
|
1421
|
-
}
|
|
1422
|
-
.save-item-name {
|
|
1423
|
-
color: var(--sim-text);
|
|
1424
|
-
font-weight: bold;
|
|
1425
|
-
font-size: 10px;
|
|
1426
|
-
}
|
|
1427
|
-
.save-item-time {
|
|
1428
|
-
color: var(--sim-text-dim);
|
|
1429
|
-
font-size: 9px;
|
|
1430
|
-
}
|
|
1431
|
-
.save-item-actions {
|
|
1432
|
-
display: flex;
|
|
1433
|
-
gap: 4px;
|
|
1434
|
-
}
|
|
1435
|
-
/* Features view styles */
|
|
1436
|
-
.features-view-container {
|
|
1437
|
-
display: flex;
|
|
1438
|
-
flex-direction: column;
|
|
1439
|
-
height: 100%;
|
|
1440
|
-
overflow: hidden;
|
|
1441
|
-
}
|
|
1442
|
-
.features-slug-input {
|
|
1443
|
-
display: flex;
|
|
1444
|
-
gap: 4px;
|
|
1445
|
-
margin-bottom: 8px;
|
|
1446
|
-
}
|
|
1447
|
-
.features-slug-input .simulator-input {
|
|
1448
|
-
flex: 1;
|
|
1449
|
-
}
|
|
1450
|
-
.features-content {
|
|
1451
|
-
flex: 1;
|
|
1452
|
-
overflow-y: auto;
|
|
1453
|
-
}
|
|
1454
|
-
.features-loading {
|
|
1455
|
-
color: var(--sim-text-dim);
|
|
1456
|
-
font-size: 10px;
|
|
1457
|
-
text-align: center;
|
|
1458
|
-
padding: 20px;
|
|
1459
|
-
}
|
|
1460
|
-
.features-error {
|
|
1461
|
-
color: var(--sim-error);
|
|
1462
|
-
font-size: 10px;
|
|
1463
|
-
padding: 8px;
|
|
1464
|
-
background: rgba(248, 113, 113, 0.1);
|
|
1465
|
-
border: 1px solid var(--sim-error);
|
|
1466
|
-
border-radius: 2px;
|
|
1467
|
-
}
|
|
1468
|
-
.features-empty {
|
|
1469
|
-
color: var(--sim-text-dim);
|
|
1470
|
-
font-size: 10px;
|
|
1471
|
-
text-align: center;
|
|
1472
|
-
padding: 20px;
|
|
1473
|
-
}
|
|
1474
|
-
.features-auth-required {
|
|
1475
|
-
color: var(--sim-text-dim);
|
|
1476
|
-
font-size: 10px;
|
|
1477
|
-
padding: 12px;
|
|
1478
|
-
background: var(--sim-bg);
|
|
1479
|
-
border: 1px solid var(--sim-border);
|
|
1480
|
-
border-radius: 2px;
|
|
1481
|
-
line-height: 1.5;
|
|
1482
|
-
}
|
|
1483
|
-
.features-auth-required p {
|
|
1484
|
-
margin: 0 0 8px 0;
|
|
1485
|
-
}
|
|
1486
|
-
.features-auth-required p:last-child {
|
|
1487
|
-
margin-bottom: 0;
|
|
1488
|
-
}
|
|
1489
|
-
.features-game-name {
|
|
1490
|
-
color: var(--sim-accent);
|
|
1491
|
-
font-size: 11px;
|
|
1492
|
-
font-weight: bold;
|
|
1493
|
-
margin-bottom: 8px;
|
|
1494
|
-
padding-bottom: 4px;
|
|
1495
|
-
border-bottom: 1px solid var(--sim-border);
|
|
1496
|
-
}
|
|
1497
|
-
.feature-group {
|
|
1498
|
-
margin-bottom: 12px;
|
|
1499
|
-
}
|
|
1500
|
-
.feature-group-title {
|
|
1501
|
-
color: var(--sim-text);
|
|
1502
|
-
font-size: 10px;
|
|
1503
|
-
font-weight: bold;
|
|
1504
|
-
text-transform: uppercase;
|
|
1505
|
-
letter-spacing: 0.5px;
|
|
1506
|
-
margin-bottom: 6px;
|
|
1507
|
-
padding-bottom: 2px;
|
|
1508
|
-
border-bottom: 1px solid var(--sim-border);
|
|
1509
|
-
}
|
|
1510
|
-
.feature-group-items {
|
|
1511
|
-
display: flex;
|
|
1512
|
-
flex-direction: column;
|
|
1513
|
-
gap: 2px;
|
|
1514
|
-
}
|
|
1515
|
-
.feature-item {
|
|
1516
|
-
display: flex;
|
|
1517
|
-
align-items: center;
|
|
1518
|
-
gap: 8px;
|
|
1519
|
-
padding: 4px 6px;
|
|
1520
|
-
background: var(--sim-bg);
|
|
1521
|
-
border: 1px solid var(--sim-border);
|
|
1522
|
-
border-radius: 2px;
|
|
1523
|
-
cursor: pointer;
|
|
1524
|
-
transition: all 0.15s ease;
|
|
1525
|
-
}
|
|
1526
|
-
.feature-item:hover {
|
|
1527
|
-
border-color: var(--sim-border-light);
|
|
1528
|
-
background: var(--sim-bg-alt);
|
|
1529
|
-
}
|
|
1530
|
-
.feature-item.updating {
|
|
1531
|
-
opacity: 0.5;
|
|
1532
|
-
pointer-events: none;
|
|
1533
|
-
}
|
|
1534
|
-
.feature-status {
|
|
1535
|
-
font-size: 14px;
|
|
1536
|
-
width: 18px;
|
|
1537
|
-
text-align: center;
|
|
1538
|
-
flex-shrink: 0;
|
|
1539
|
-
}
|
|
1540
|
-
.feature-item.enabled .feature-status {
|
|
1541
|
-
color: var(--sim-success);
|
|
1542
|
-
}
|
|
1543
|
-
.feature-item.disabled .feature-status {
|
|
1544
|
-
color: var(--sim-error);
|
|
1545
|
-
opacity: 0.5;
|
|
1546
|
-
}
|
|
1547
|
-
.feature-title {
|
|
1548
|
-
font-size: 10px;
|
|
1549
|
-
color: var(--sim-text);
|
|
1550
|
-
flex: 1;
|
|
1551
|
-
}
|
|
1552
|
-
.feature-item.disabled .feature-title {
|
|
1553
|
-
color: var(--sim-text-dim);
|
|
1554
|
-
}
|
|
1555
|
-
/* Checkpoints view styles */
|
|
1556
|
-
.checkpoints-view-container {
|
|
1557
|
-
display: flex;
|
|
1558
|
-
flex-direction: column;
|
|
1559
|
-
height: 100%;
|
|
1560
|
-
overflow: hidden;
|
|
1561
|
-
}
|
|
1562
|
-
.checkpoints-header {
|
|
1563
|
-
display: flex;
|
|
1564
|
-
justify-content: space-between;
|
|
1565
|
-
align-items: center;
|
|
1566
|
-
margin-bottom: 6px;
|
|
1567
|
-
flex-shrink: 0;
|
|
1568
|
-
}
|
|
1569
|
-
.checkpoints-list {
|
|
1570
|
-
display: flex;
|
|
1571
|
-
flex-direction: column;
|
|
1572
|
-
gap: 4px;
|
|
1573
|
-
flex: 1;
|
|
1574
|
-
overflow-y: auto;
|
|
1575
|
-
}
|
|
1576
|
-
.checkpoint-item {
|
|
1577
|
-
padding: 6px;
|
|
1578
|
-
background: var(--sim-bg);
|
|
1579
|
-
border: 1px solid var(--sim-border);
|
|
1580
|
-
border-left: 3px solid var(--sim-accent);
|
|
1581
|
-
border-radius: 2px;
|
|
1582
|
-
}
|
|
1583
|
-
.checkpoint-item:hover {
|
|
1584
|
-
border-color: var(--sim-border-light);
|
|
1585
|
-
border-left-color: var(--sim-accent);
|
|
1586
|
-
}
|
|
1587
|
-
.checkpoint-header {
|
|
1588
|
-
display: flex;
|
|
1589
|
-
justify-content: space-between;
|
|
1590
|
-
align-items: center;
|
|
1591
|
-
}
|
|
1592
|
-
.checkpoint-item .simulator-deeds {
|
|
1593
|
-
margin-top: 4px;
|
|
1594
|
-
}
|
|
1595
|
-
.checkpoint-name {
|
|
1596
|
-
color: var(--sim-accent);
|
|
1597
|
-
font-weight: bold;
|
|
1598
|
-
font-size: 10px;
|
|
1599
|
-
}
|
|
1600
|
-
.checkpoint-time {
|
|
1601
|
-
color: var(--sim-text-dim);
|
|
1602
|
-
font-size: 9px;
|
|
1603
|
-
}
|
|
1604
|
-
/* Keyboard view styles */
|
|
1605
|
-
.keyboard-view-container {
|
|
1606
|
-
padding: 4px;
|
|
1607
|
-
}
|
|
1608
|
-
.sim-kb-empty {
|
|
1609
|
-
color: var(--sim-text-dim);
|
|
1610
|
-
text-align: center;
|
|
1611
|
-
padding: 16px 8px;
|
|
1612
|
-
font-size: 10px;
|
|
1613
|
-
line-height: 1.6;
|
|
1614
|
-
}
|
|
1615
|
-
.sim-kb-empty code {
|
|
1616
|
-
background: var(--sim-bg);
|
|
1617
|
-
padding: 1px 4px;
|
|
1618
|
-
border-radius: 2px;
|
|
1619
|
-
font-size: 10px;
|
|
1620
|
-
}
|
|
1621
|
-
.sim-kb {
|
|
1622
|
-
display: flex;
|
|
1623
|
-
flex-direction: column;
|
|
1624
|
-
gap: 4px;
|
|
1625
|
-
}
|
|
1626
|
-
.sim-kb-row {
|
|
1627
|
-
display: flex;
|
|
1628
|
-
justify-content: center;
|
|
1629
|
-
gap: 3px;
|
|
1630
|
-
}
|
|
1631
|
-
.sim-kb-key {
|
|
1632
|
-
min-width: 28px;
|
|
1633
|
-
height: 30px;
|
|
1634
|
-
padding: 0 4px;
|
|
1635
|
-
border: 1px solid var(--sim-border);
|
|
1636
|
-
border-radius: 3px;
|
|
1637
|
-
background: var(--sim-bg);
|
|
1638
|
-
color: var(--sim-text);
|
|
1639
|
-
font: inherit;
|
|
1640
|
-
font-size: 11px;
|
|
1641
|
-
text-transform: uppercase;
|
|
1642
|
-
cursor: pointer;
|
|
1643
|
-
display: flex;
|
|
1644
|
-
align-items: center;
|
|
1645
|
-
justify-content: center;
|
|
1646
|
-
}
|
|
1647
|
-
.sim-kb-key:hover {
|
|
1648
|
-
background: var(--sim-bg-alt);
|
|
1649
|
-
border-color: var(--sim-border-light);
|
|
1650
|
-
}
|
|
1651
|
-
.sim-kb-key:active {
|
|
1652
|
-
background: var(--sim-accent);
|
|
1653
|
-
color: var(--sim-panel);
|
|
1654
|
-
}
|
|
1655
|
-
.sim-kb-key.highlight {
|
|
1656
|
-
background: var(--sim-bg-alt);
|
|
1657
|
-
border-color: var(--sim-accent);
|
|
1658
|
-
color: var(--sim-accent);
|
|
1659
|
-
font-size: 9px;
|
|
1660
|
-
}
|
|
1661
|
-
.sim-kb-key.highlight:active {
|
|
1662
|
-
background: var(--sim-accent);
|
|
1663
|
-
color: var(--sim-panel);
|
|
1664
|
-
}
|
|
1665
|
-
.sim-kb-key.l {
|
|
1666
|
-
min-width: 40px;
|
|
1667
|
-
}
|
|
1668
|
-
.sim-kb-key.xl {
|
|
1669
|
-
min-width: 52px;
|
|
1670
|
-
}
|
|
1671
|
-
.sim-kb-key.grow {
|
|
1672
|
-
flex: 1;
|
|
1673
|
-
}
|
|
1674
|
-
.sim-kb-key.disabled {
|
|
1675
|
-
opacity: 0.3;
|
|
1676
|
-
cursor: default;
|
|
1677
|
-
}
|
|
1678
|
-
/* Settings view styles */
|
|
1679
|
-
.settings-view-container {
|
|
1680
|
-
display: flex;
|
|
1681
|
-
flex-direction: column;
|
|
1682
|
-
height: 100%;
|
|
1683
|
-
overflow-y: auto;
|
|
1684
|
-
}
|
|
1685
|
-
.sim-settings-empty {
|
|
1686
|
-
color: var(--sim-text-dim);
|
|
1687
|
-
font-size: 10px;
|
|
1688
|
-
text-align: center;
|
|
1689
|
-
padding: 20px;
|
|
1690
|
-
line-height: 1.5;
|
|
1691
|
-
}
|
|
1692
|
-
.sim-settings-heading {
|
|
1693
|
-
color: var(--sim-text);
|
|
1694
|
-
font-size: 11px;
|
|
1695
|
-
font-weight: bold;
|
|
1696
|
-
text-transform: uppercase;
|
|
1697
|
-
letter-spacing: 1px;
|
|
1698
|
-
margin: 6px 0 4px;
|
|
1699
|
-
}
|
|
1700
|
-
.sim-settings-subheading {
|
|
1701
|
-
color: var(--sim-text);
|
|
1702
|
-
font-size: 10px;
|
|
1703
|
-
font-weight: bold;
|
|
1704
|
-
margin: 4px 0 2px;
|
|
1705
|
-
}
|
|
1706
|
-
.sim-settings-paragraph {
|
|
1707
|
-
color: var(--sim-text-dim);
|
|
1708
|
-
font-size: 10px;
|
|
1709
|
-
margin: 2px 0 6px;
|
|
1710
|
-
line-height: 1.4;
|
|
1711
|
-
}
|
|
1712
|
-
.sim-settings-subtitle {
|
|
1713
|
-
color: var(--sim-text-dim);
|
|
1714
|
-
font-size: 9px;
|
|
1715
|
-
margin: -2px 0 3px;
|
|
1716
|
-
line-height: 1.3;
|
|
1717
|
-
}
|
|
1718
|
-
.sim-settings-row {
|
|
1719
|
-
display: flex;
|
|
1720
|
-
align-items: baseline;
|
|
1721
|
-
gap: 6px;
|
|
1722
|
-
cursor: pointer;
|
|
1723
|
-
}
|
|
1724
|
-
.sim-settings-row .simulator-label {
|
|
1725
|
-
margin-bottom: 0;
|
|
1726
|
-
}
|
|
1727
|
-
.sim-settings-split {
|
|
1728
|
-
display: flex;
|
|
1729
|
-
gap: 8px;
|
|
1730
|
-
}
|
|
1731
|
-
.sim-settings-split > * {
|
|
1732
|
-
flex: 1;
|
|
1733
|
-
}
|
|
1734
|
-
.sim-settings-unsupported {
|
|
1735
|
-
color: var(--sim-text-dim);
|
|
1736
|
-
font-size: 9px;
|
|
1737
|
-
font-style: italic;
|
|
1738
|
-
margin: 4px 0;
|
|
1739
|
-
}
|
|
1740
|
-
.sim-settings-actions {
|
|
1741
|
-
margin-top: 8px;
|
|
1742
|
-
padding-top: 8px;
|
|
1743
|
-
border-top: 2px solid var(--sim-border);
|
|
1744
|
-
}
|
|
1745
|
-
</style>
|
|
1746
|
-
<div id="simulator-panel" class="${p.isCollapsed?`collapsed`:``}">
|
|
1747
|
-
<div id="simulator-header">
|
|
1748
|
-
<span id="simulator-title">PUZZMO SIMULATOR</span>
|
|
1749
|
-
<span class="header-sep">|</span>
|
|
1750
|
-
<div id="simulator-timer">--:--</div>
|
|
1751
|
-
<span class="header-sep">|</span>
|
|
1752
|
-
<div id="simulator-header-controls">
|
|
1753
|
-
<button id="simulator-header-pause" class="header-icon-btn" title="Pause" disabled>${m.pause}</button>
|
|
1754
|
-
<button id="simulator-header-retry" class="header-icon-btn" title="Retry" disabled>${m.retry}</button>
|
|
1755
|
-
</div>
|
|
1756
|
-
<span class="header-sep">|</span>
|
|
1757
|
-
<div id="simulator-header-status">
|
|
1758
|
-
<span id="simulator-header-indicator" class="waiting"></span>
|
|
1759
|
-
<span id="simulator-header-status-text">Waiting...</span>
|
|
1760
|
-
</div>
|
|
1761
|
-
<span class="header-spacer"></span>
|
|
1762
|
-
<button id="simulator-header-settings" class="header-icon-btn" title="Settings">${m.cog}</button>
|
|
1763
|
-
<button id="simulator-toggle" class="header-icon-btn" title="Minimize">${m.minimize}</button>
|
|
1764
|
-
</div>
|
|
1765
|
-
<div id="simulator-body">
|
|
1766
|
-
<div id="simulator-tabs">
|
|
1767
|
-
${d.filter(e=>e.id!==`auth`).map(e=>`<button class="simulator-tab" data-tab="${e.id}">${e.label}<span class="simulator-tab-badge" data-badge="${e.id}"></span></button>`).join(``)}
|
|
1768
|
-
</div>
|
|
1769
|
-
<div id="simulator-content" class="hidden">
|
|
1770
|
-
${d.map(e=>`<div id="simulator-tab-${e.id}" class="simulator-tab-content">${e.render()}</div>`).join(``)}
|
|
1771
|
-
</div>
|
|
1772
|
-
</div>
|
|
1773
|
-
</div>
|
|
1774
|
-
`,document.body.appendChild(h);let g=h.querySelector(`#simulator-panel`),_=h.querySelector(`#simulator-header`),v=h.querySelector(`#simulator-header-indicator`),y=h.querySelector(`#simulator-header-status-text`),b=h.querySelector(`#simulator-header-pause`),x=h.querySelector(`#simulator-header-retry`),S=h.querySelector(`#simulator-header-settings`),C=h.querySelector(`#simulator-toggle`),w=h.querySelector(`#simulator-timer`),T=h.querySelector(`#simulator-tabs`),E=h.querySelector(`#simulator-content`),D=e=>h.querySelector(e),O=e=>{b.innerHTML=e?m.play:m.pause,b.title=e?`Resume`:`Pause`},k=(e,t)=>{let n=D(`#simulator-status .text`),r=D(`#simulator-status .indicator`),i=t===`complete`?`✓`:``;n&&(n.textContent=e),r&&(r.className=`indicator ${t}`,r.textContent=i),v.className=t,v.textContent=i,y.textContent=e},A=(e,t)=>{t&&t!==`0`?w.innerHTML=`${e}<span class="penalty">+${t}</span>`:w.textContent=e},j=e=>{var t;p.activeTab=e,E.classList.remove(`hidden`),ne(e),T.querySelectorAll(`.simulator-tab`).forEach(t=>{t.classList.toggle(`active`,t.getAttribute(`data-tab`)===e)}),h.querySelectorAll(`.simulator-tab-content`).forEach(t=>{t.classList.toggle(`active`,t.id===`simulator-tab-${e}`)}),S.classList.toggle(`active`,e===`auth`);let n=d.find(t=>t.id===e);n==null||(t=n.onActivate)==null||t.call(n,R)},M=e=>{p.isCollapsed=e,g.classList.toggle(`collapsed`,e),te(e),e?(E.classList.add(`hidden`),T.querySelectorAll(`.simulator-tab`).forEach(e=>e.classList.remove(`active`))):j(p.activeTab)},N=()=>{u.updatePreview(R)},P=function(){var e=t.t(function*(){var e,t;if(p.appliedPuzzleOverride!==null)return p.appliedPuzzleOverride;if(p.puzzleData)return p.puzzleData;if(!s||s.size===0)throw Error(`No fixtures configured. Add puzzle fixture files (.json or .toml) to a fixtures directory and pass fixturesGlob to the simulator.`);let n=(e=p.selectedCategory)==null?c[0]:e,r=n?s.get(n):void 0;if(!r||r.size===0)throw Error(`No puzzles found in fixture category "${n}"`);let i=(t=p.selectedPuzzle)==null?r.keys().next().value:t,a=i?r.get(i):void 0;if(!a)throw Error(`Puzzle "${i}" not found in category "${n}"`);p.puzzleData=a,console.log(`Simulator: Puzzle loaded from fixtures`,{category:n,puzzle:i}),p.originalPuzzle=a;let o=D(`#simulator-puzzle`);return o&&(o.value=p.originalPuzzle),p.activeTab===`thumb`&&N(),p.puzzleData});return function(){return e.apply(this,arguments)}}(),F=re(e=>{l.addLogEntry(e,R)}),I=(e,t)=>{ie(e,t,F)},L=(e,t)=>{let n=h.querySelector(`[data-badge="${e}"]`);n&&(n.textContent=t&&t>0?String(t):``)},R={state:p,getElement:D,sendToGame:I,logMessage:F.log,loadPuzzle:P,updateStatus:k,updateTimer:A,setCollapsed:M,switchTab:j,updateThumbnail:N,updateBadge:L,fixtures:s,fixtureCategories:c,gameSlug:(a=n.slug)==null?null:a};console.log(`[Simulator] Context created with gameSlug:`,R.gameSlug),d.forEach(e=>e.bind(R)),T.querySelectorAll(`.simulator-tab`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.getAttribute(`data-tab`);j(t),L(t,0)})}),C.addEventListener(`click`,e=>{e.stopPropagation(),M(!0)}),b.addEventListener(`click`,e=>{e.stopPropagation(),p.isPaused?(I(`RESUME_GAME`,{}),p.isPaused=!1,O(!1),k(`Running`,`ready`)):(I(`PAUSE_GAME`,{}),p.isPaused=!0,O(!0),k(`Paused`,`paused`));let t=D(`#simulator-pause`);t&&(t.textContent=p.isPaused?`Resume`:`Pause`)}),x.addEventListener(`click`,e=>{e.stopPropagation(),I(`RETRY_PUZZLE`,{}),p.hasStarted=!1,p.isPaused=!1,O(!1),b.disabled=!0,k(`Ready to retry`,`ready`);let t=D(`#simulator-pause`),n=D(`#simulator-start`);t&&(t.disabled=!0,t.textContent=`Pause`),n&&(n.textContent=`Start`)}),S.addEventListener(`click`,e=>{e.stopPropagation(),p.isCollapsed&&M(!1),j(`auth`)}),_.addEventListener(`click`,e=>{p.isCollapsed&&e.target!==C&&M(!1)}),p.isCollapsed||j(p.activeTab);let z=new URLSearchParams(window.location.search);(z.has(`code`)||z.has(`error`))&&(M(!1),j(`auth`));let B=e=>{let t={additionalTimeAddedSecs:0,boardState:p.currentInputStr,combinedTimeSecs:0,completed:!1,createdAt:new Date().toISOString(),elapsedTimeSecs:0,id:`simulator-gameplay-${Date.now()}`,ownerID:`simulator-owner`,pointsAwarded:0,slug:`simulator-game`,viewerOwnsPuzzle:!0},n={id:`simulator-puzzle`,name:`Proto Jig Puzzle`,puzzle:e,mostRecentDaily:null};return{userState:{gameSettings:{"proto-game":p.gameSettings},id:`simulator-user`,ownerID:`simulator-owner`},currentUser:{id:`simulator-user`,name:`Simulator`,username:`simulator`,usernameID:`0000`,type:`User`,roles:``},game:It,session:{gameplay:t,puzzle:n},theme:p.selectedTheme,hostContext:p.hostContext,appRuntimeContract:`1.0`}},V=function(){var n=t.t(function*(t){k(`Loading puzzle...`,`waiting`);try{let n=e.t(e.t({},B(yield P())),{},{appRuntimeContract:t});k(`Sending READY_DATA...`,`waiting`),I(`READY_DATA`,n),k(`Waiting for game to load...`,`waiting`)}catch(e){k(`Error: ${e}`,`paused`)}});return function(e){return n.apply(this,arguments)}}(),H=()=>{console.log(`Simulator: Game loaded, ready to start`),x.disabled=!1,d.forEach(e=>{var t;return(t=e.onMessage)==null?void 0:t.call(e,`READY_GAME_LOADED`,void 0,R)}),o&&!p.hasStarted&&setTimeout(()=>{let e=D(`#simulator-start`);e==null||e.click(),b.disabled=!1,p.hasStarted=!0,k(`Running`,`ready`)},100)};return ae((e,t)=>{var n,r;if(e===`READY`){console.log(`Simulator: Received READY from game`),V((t==null?void 0:t.runtimeContract)===`1.1`?`1.1`:`1.0`);return}if(e===`READY_GAME_LOADED`){H();return}if(e===`TIMER_TICK`){if(t!=null&&t.display){let[e,n]=t.display;A(e,n)}return}if(e===`TIMER_SYNC`)return;if(e===`SIDEBAR_UPDATE`){console.log(`Simulator: Sidebar update`,t);return}d.forEach(n=>{var r;return(r=n.onMessage)==null?void 0:r.call(n,e,t,R)});let i=(n=t==null||(r=t.input)==null?void 0:r.boardState)==null?t==null?void 0:t.boardState:n;e===`UPLOAD_NEW_GAME_STATE`&&i&&(p.currentInputStr=i,p.activeTab===`thumb`&&N(),console.log(`Simulator: Game state uploaded`,t)),e===`GAME_COMPLETED`&&(console.log(`Simulator: Game completed!`,t),b.disabled=!0,p.hasStarted=!1,k(`Completed!`,`complete`))},F),console.log(`Simulator initialized`),$={updateFixtures:e=>{s=oe(e),c=Array.from(s.keys()).sort(),R.fixtures=s,R.fixtureCategories=c;let t=localStorage.getItem(`simulator-fixture-category`);if(!p.selectedCategory||!c.includes(p.selectedCategory)){var n;p.selectedCategory=t&&c.includes(t)?t:(n=c[0])==null?null:n}let r=d.find(e=>e.id===`ctrl`);r==null||r.bind(R),console.log(`Simulator: Fixtures updated`,{categories:c,selectedCategory:p.selectedCategory})},sendToGame:I,loadPuzzle:P},$}var It={id:`simulator-game`,slug:`proto-game`,stableSlug:`proto-game`,displayName:`Proto Game`,version:{id:`simulator-version`,label:null,featuresArr:[0],flagsArr:[0],runtime:{id:`simulator-runtime`,version:null}}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Ft}});
|
|
1775
|
-
//# sourceMappingURL=createSimulator-PNeBoNux.cjs.map
|