planche 0.8.2 → 0.8.4

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.
Files changed (149) hide show
  1. package/app/assets/1qhRpHKv.js +1 -0
  2. package/app/assets/2sxOfzyn.js +959 -0
  3. package/app/assets/3tVT9YMh.js +1 -0
  4. package/app/assets/{postgresql-erqhE-5Q.js → 5E2RYjEs.js} +1 -1
  5. package/app/assets/7D95fvkQ.js +1 -0
  6. package/app/assets/8OZbP3hw.js +1 -0
  7. package/app/assets/B2VNJYl8.js +1 -0
  8. package/app/assets/B3LyCSVJ.js +1 -0
  9. package/app/assets/B4qi_yRV.js +1 -0
  10. package/app/assets/B6gKGoJk.js +1 -0
  11. package/app/assets/BBSxV90W.js +1 -0
  12. package/app/assets/BCZ2DwDi.js +1 -0
  13. package/app/assets/BM5G_YA7.js +1 -0
  14. package/app/assets/BQ74FNAM.js +1 -0
  15. package/app/assets/BXX-BtBa.js +2 -0
  16. package/app/assets/B_0rFJQl.js +1 -0
  17. package/app/assets/BdPEUnLq.js +6 -0
  18. package/app/assets/Bfuq7Ecs.js +2 -0
  19. package/app/assets/Bfw0mW2q.js +1 -0
  20. package/app/assets/BmSO6bVX.js +27 -0
  21. package/app/assets/Brk9GcZh.js +1 -0
  22. package/app/assets/BrwCR6-9.js +1 -0
  23. package/app/assets/BxOkJTYb.js +1 -0
  24. package/app/assets/BziT-o8V.js +2 -0
  25. package/app/assets/C-MJZp-k.js +3 -0
  26. package/app/assets/{dbms-BwnatOMe.js → C1RY7wUM.js} +13 -13
  27. package/app/assets/C3uDTQB5.js +1 -0
  28. package/app/assets/CCBE6CSG.js +1 -0
  29. package/app/assets/CChaTOPr.js +1 -0
  30. package/app/assets/CKOS5Y-e.js +1 -0
  31. package/app/assets/{storage-worker-DEIYmjYK.js → CM41Cs80.js} +3 -3
  32. package/app/assets/CWY0kZPK.js +2 -0
  33. package/app/assets/CZQ1r4zz.js +41 -0
  34. package/app/assets/{error-hints-9kGurk72.js → CfsL8_WC.js} +3 -3
  35. package/app/assets/Clm7zeUD.js +1 -0
  36. package/app/assets/ClyAuDY9.js +2 -0
  37. package/app/assets/CmJ3siBN.js +1 -0
  38. package/app/assets/Cw_LYT6k.js +1 -0
  39. package/app/assets/D-RWduy5.js +1 -0
  40. package/app/assets/D2AdQhHv.js +1 -0
  41. package/app/assets/D8nrOvmh.js +2 -0
  42. package/app/assets/D98JmiqU.js +2 -0
  43. package/app/assets/DAFA-E1-.js +1 -0
  44. package/app/assets/DCkfyKy4.js +1 -0
  45. package/app/assets/{dist-Roudme38.js → DD58tsa9.js} +2 -2
  46. package/app/assets/{mariadb-BT1adDMU.js → DOeLCbYG.js} +1 -1
  47. package/app/assets/DTxGpkJp.js +1 -0
  48. package/app/assets/DURNOOys.js +2 -0
  49. package/app/assets/DbRMSZEW.js +1 -0
  50. package/app/assets/DeB5sJfy.js +1 -0
  51. package/app/assets/DkdStXtl.js +1 -0
  52. package/app/assets/{sqlite3-worker1-CVKz6JuG.js → DlWwFXlb.js} +1 -1
  53. package/app/assets/DxuXBECK.js +1 -0
  54. package/app/assets/MdnUPkBs.js +1 -0
  55. package/app/assets/OQSC6nip.js +7 -0
  56. package/app/assets/{mysql-BEg8tI_S.js → R93pYE1w.js} +1 -1
  57. package/app/assets/XzPc-eVf.js +1 -0
  58. package/app/assets/ZV96pIZb.css +2 -0
  59. package/app/assets/aL0ab6hA.js +1 -0
  60. package/app/assets/eFSiW0Lh.js +1 -0
  61. package/app/assets/{transactsql-BVCsopZt.js → eRZ39OKr.js} +1 -1
  62. package/app/assets/f1Yh3VFu.js +1 -0
  63. package/app/assets/g4S828aR.js +1 -0
  64. package/app/assets/nij0MMY5.js +1 -0
  65. package/app/assets/oSIomP-s.js +1 -0
  66. package/app/assets/q4qvsmm4.js +1 -0
  67. package/app/assets/rcI4Fmt0.js +1 -0
  68. package/app/assets/u80owQsI.js +2 -0
  69. package/app/assets/vIgrQ7V1.js +1 -0
  70. package/app/index.html +23 -27
  71. package/app/landing.css +4 -2
  72. package/dist/chunk-2Z2E3JGN.js +3733 -0
  73. package/dist/embed.js +21 -0
  74. package/dist/index.js +211 -3895
  75. package/package.json +4 -1
  76. package/app/assets/AboutDialog-3SX5EV22.js +0 -1
  77. package/app/assets/AiSettingsDialog-DIhTViGS.js +0 -1
  78. package/app/assets/BigInteger-BlV0QR66.js +0 -1
  79. package/app/assets/ConnectDialog-B9B2pmBd.js +0 -1
  80. package/app/assets/CopyDatabaseDialog-DV7zQRd2.js +0 -1
  81. package/app/assets/CopyTableDialog-1A2wKslg.js +0 -1
  82. package/app/assets/CreateDatabaseDialog-CLiJJQgN.js +0 -1
  83. package/app/assets/CreateSchemaDialog-DD_28Eub.js +0 -1
  84. package/app/assets/DataDiffDialog-hIvWJqmh.js +0 -1
  85. package/app/assets/DownloadToCSVDialog-CLpJ8bDP.js +0 -3
  86. package/app/assets/EditSchemaDialog-B8ONt2sC.js +0 -2
  87. package/app/assets/FindReplaceDialog-H1fQsF0u.js +0 -1
  88. package/app/assets/FlushDialog-Cu_3tGcK.js +0 -1
  89. package/app/assets/GeneralSettingsDialog-xgxhF9Gn.js +0 -1
  90. package/app/assets/GroupByDialog-BCDcazzJ.js +0 -1
  91. package/app/assets/LicenseDialog-DQHhxdtR.js +0 -1
  92. package/app/assets/LinkColumnDialog-V430TeVp.js +0 -1
  93. package/app/assets/LocalHistoryDialog-BA_7Fo9B.js +0 -1
  94. package/app/assets/McpSetupDialog-BFoqHq0W.js +0 -1
  95. package/app/assets/ProcessListDialog-C580troj.js +0 -1
  96. package/app/assets/QuerySettingsDialog-CxaKHHfo.js +0 -1
  97. package/app/assets/QuickCommandPalette-DI4_5uY6.js +0 -1
  98. package/app/assets/RowFormDialog-DXK8CWzh.js +0 -2
  99. package/app/assets/SafetySettingsDialog-D5yLNWsA.js +0 -1
  100. package/app/assets/SchemaDiffDialog-DsXAMyhh.js +0 -7
  101. package/app/assets/SchemaToHTMLDialog-CDrt2YXj.js +0 -27
  102. package/app/assets/StatusDialog-CnIJeQpO.js +0 -1
  103. package/app/assets/SyncDialog-DXLRjtc3.js +0 -1
  104. package/app/assets/TermsDialog-D4K_QWCp.js +0 -1
  105. package/app/assets/UserAddDialog-DPBPQ90W.js +0 -1
  106. package/app/assets/UserManagerDialog-_slF5p1Y.js +0 -1
  107. package/app/assets/VariablesDialog-IdnBQyHZ.js +0 -1
  108. package/app/assets/app-storage-C_1RLCyI.js +0 -1
  109. package/app/assets/button-B2EsmMJs.js +0 -1
  110. package/app/assets/chevron-up-CBnVjNE1.js +0 -1
  111. package/app/assets/connection-store-D-Lp5EFj.js +0 -1
  112. package/app/assets/database-CfYjCIA2.js +0 -1
  113. package/app/assets/de-U48bWKTK.js +0 -2
  114. package/app/assets/dialog-FBpgH0QJ.js +0 -1
  115. package/app/assets/dist-BUXw8brT.js +0 -1
  116. package/app/assets/dist-BYhFWvmC.js +0 -41
  117. package/app/assets/dist-BrzYmjQV.js +0 -1
  118. package/app/assets/dist-C2vlTGNz.js +0 -1
  119. package/app/assets/editor-registry-ukUyoekH.js +0 -1
  120. package/app/assets/engine-Ja9hkC7I.js +0 -1
  121. package/app/assets/fr-B_almVyv.js +0 -2
  122. package/app/assets/i18n-BQcNT-sS.js +0 -2
  123. package/app/assets/ja-BS_mc_Gc.js +0 -2
  124. package/app/assets/ko-DgeKS5Bf.js +0 -2
  125. package/app/assets/main-BwM1zx0B.js +0 -959
  126. package/app/assets/main-D2x95iIF.css +0 -2
  127. package/app/assets/pro-upsell-BH-enstO.js +0 -1
  128. package/app/assets/pro-usage-D4Iv3hEs.js +0 -1
  129. package/app/assets/query-execution-_bzhSmJm.js +0 -2
  130. package/app/assets/query-store-Cf_KUo80.js +0 -1
  131. package/app/assets/schema-nodes-MgIiKfpG.js +0 -1
  132. package/app/assets/select-CtfiGpCP.js +0 -1
  133. package/app/assets/settings-controls-DyukG7E2.js +0 -1
  134. package/app/assets/settings-store-DzQ3BP5e.js +0 -1
  135. package/app/assets/table-copy-JytHH7NG.js +0 -1
  136. package/app/assets/tunneling-C--CCnwy.js +0 -6
  137. package/app/assets/ui-store-5IssrgmG.js +0 -1
  138. package/app/assets/user-store-DOy2VMsT.js +0 -1
  139. package/app/assets/zh-CoZStBZ6.js +0 -2
  140. /package/app/assets/{sqlite3-BVKGSWc-.wasm → BVKGSWc-.wasm} +0 -0
  141. /package/app/assets/{editor.worker-BboMRUer.js → BboMRUer.js} +0 -0
  142. /package/app/assets/{hmr-singleton-Bit0Kfog.js → Bit0Kfog.js} +0 -0
  143. /package/app/assets/{table-definition-Bs5VSn0X.js → Bs5VSn0X.js} +0 -0
  144. /package/app/assets/{file-name-CnYBZPf9.js → CnYBZPf9.js} +0 -0
  145. /package/app/assets/{sqlite3-opfs-async-proxy-D_xnb1D8.js → D_xnb1D8.js} +0 -0
  146. /package/app/assets/{sql-NEE52Syq.js → NEE52Syq.js} +0 -0
  147. /package/app/assets/{rolldown-runtime-hePW80VL.js → hePW80VL.js} +0 -0
  148. /package/app/assets/{contract-neLPq0_M.js → neLPq0_M.js} +0 -0
  149. /package/app/assets/{codicon-ngg6Pgfi.ttf → ngg6Pgfi.ttf} +0 -0
@@ -0,0 +1,2 @@
1
+ import{d as e,p as t}from"./XzPc-eVf.js";var n=e=>typeof e==`string`,r=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},i=e=>e==null?``:String(e),a=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},o=/###/g,s=e=>e&&e.includes(`###`)?e.replace(o,`.`):e,c=e=>!e||n(e),l=(e,t,r)=>{let i=n(t)?t.split(`.`):t,a=0;for(;a<i.length-1;){if(c(e))return{};let t=s(i[a]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return c(e)?{}:{obj:e,k:s(i[a])}},u=(e,t,n)=>{let{obj:r,k:i}=l(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=l(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=l(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},d=(e,t,n,r)=>{let{obj:i,k:a}=l(e,t,Object);i[a]=i[a]||[],i[a].push(n)},f=(e,t)=>{let{obj:n,k:r}=l(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},p=(e,t,n)=>{let r=f(e,n);return r===void 0?f(t,n):r},m=(e,t,r)=>{for(let i in t)i!==`__proto__`&&i!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,i)?n(e[i])||e[i]instanceof String||n(t[i])||t[i]instanceof String?r&&(e[i]=t[i]):m(e[i],t[i],r):e[i]=t[i]);return e},h=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),g={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},_=e=>n(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e,v=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},y=[` `,`,`,`?`,`!`,`;`],b=new v(20),x=(e,t,n)=>{t||=``,n||=``;let r=y.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=b.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},S=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},C=e=>e?.replace(/_/g,`-`),w={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},T=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||w,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,r,i){return i&&!this.debug?null:(e=e.map(e=>n(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),n(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},E=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},D=class extends E{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,i={}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=i.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:i.ignoreJSONStructure,s;e.includes(`.`)?s=e.split(`.`):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):n(r)&&a?s.push(...r.split(a)):s.push(r)));let c=f(this.data,s);return!c&&!t&&!r&&e.includes(`.`)&&(e=s[0],t=s[1],r=s.slice(2).join(`.`)),c||!o||!n(r)?c:S(this.data?.[e]?.[t],r,a)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),u(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,r,i={silent:!1}){for(let i in r)(n(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});i.silent||this.emit(`added`,e,t,r)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=f(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?m(s,n,i):s={...s,...n},u(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},k=Symbol(`i18next/PATH_KEY`);function A(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===k?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function j(e,t){let{[k]:n}=e(A()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var M=e=>!n(e)&&typeof e!=`boolean`&&typeof e!=`number`,N=class e extends E{constructor(e,t={}){super(),a([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=T.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=M(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let r=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;r===void 0&&(r=`:`);let i=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,a=t.ns||this.options.defaultNS||[],o=r&&e.includes(r),s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!x(e,r,i);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:n(a)?[a]:a};let o=e.split(r);(r!==i||r===i&&this.options.ns.includes(o[0]))&&(a=o.shift()),e=o.join(i)}return{key:e,namespaces:n(a)?[a]:a}}translate(t,r,i){let a=typeof r==`object`?{...r}:r;if(typeof a!=`object`&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a==`object`&&(a={...a}),a||={},t==null)return``;typeof t==`function`&&(t=j(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?j(e,{...this.options,...a}):String(e));let o=a.returnDetails===void 0?this.options.returnDetails:a.returnDetails,s=a.keySeparator===void 0?this.options.keySeparator:a.keySeparator,{key:c,namespaces:l}=this.extractFromKey(t[t.length-1],a),u=l[l.length-1],d=a.nsSeparator===void 0?this.options.nsSeparator:a.nsSeparator;d===void 0&&(d=`:`);let f=a.lng||this.language,p=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?o?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${d}${c}`:o?{res:c,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:c;let m=this.resolve(t,a),h=m?.res,g=m?.usedKey||c,_=m?.exactUsedKey||c,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=a.joinArrays===void 0?this.options.joinArrays:a.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=a.count!==void 0&&!n(a.count),S=e.hasDefaultValue(a),C=x?this.pluralResolver.getSuffix(f,a.count,a):``,w=a.ordinal&&x?this.pluralResolver.getSuffix(f,a.count,{ordinal:!1}):``,T=x&&!a.ordinal&&a.count===0,E=T&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${C}`]||a[`defaultValue${w}`]||a.defaultValue,D=h;b&&!h&&S&&(D=E);let O=M(D),k=Object.prototype.toString.apply(D);if(b&&D&&O&&!v.includes(k)&&!(n(y)&&Array.isArray(D))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,D,{...a,ns:l}):`key '${c} (${this.language})' returned an object instead of string.`;return o?(m.res=e,m.usedParams=this.getUsedParamsDetails(a),m):e}if(s){let e=Array.isArray(D),t=e?[]:{},n=e?_:g;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${s}${e}`;t[e]=S&&!h?this.translate(r,{...a,defaultValue:M(E)?E[e]:void 0,joinArrays:!1,ns:l}):this.translate(r,{...a,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=D[e])}h=t}}else if(b&&n(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,a,i);else{let e=!1,n=!1;!this.isValidLookup(h)&&S&&(e=!0,h=E),this.isValidLookup(h)||(n=!0,h=c);let r=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,o=S&&E!==h&&this.options.updateMissing;if(n||e||o){if(this.logger.log(o?`updateKey`:`missingKey`,f,u,x&&!o?`${c}${this.pluralResolver.getSuffix(f,a.count,a)}`:c,o?E:h),s){let e=this.resolve(c,{...a,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let n=(e,t,n)=>{let i=S&&n!==h?n:r;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,i,o,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,i,o,a),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,a);T&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],c+t,a[`defaultValue${t}`]||E)})}):n(e,c,E))}h=this.extendTranslation(h,t,a,m,i),n&&h===c&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${c}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,e?h:void 0,a))}return o?(m.res=h,m.usedParams=this.getUsedParamsDetails(a),m):h}extendTranslation(e,t,r,i,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let o=n(e)&&(r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables),s;if(o){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=r.replace&&!n(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,r.lng||this.language||i.usedLng,r),o){let t=e.match(this.interpolator.nestingRegexp),n=t&&t.length;s<n&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>a?.[0]===e[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,s=n(o)?[o]:o;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=O.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,i,a,o,s;return n(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?j(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(r))return;let c=this.extractFromKey(e,t),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=t.count!==void 0&&!n(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(n(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(s=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(n=>{if(this.isValidLookup(r))return;o=n;let i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(a)&&i.push(l+e.replace(a,this.options.pluralSeparator)),i.push(l+e),f&&i.push(l+r)),p){let n=`${l}${this.options.contextSeparator||`_`}${t.context}`;i.push(n),d&&(t.ordinal&&e.startsWith(a)&&i.push(n+e.replace(a,this.options.pluralSeparator)),i.push(n+e),f&&i.push(n+r))}}let s;for(;s=i.pop();)this.isValidLookup(r)||(a=s,r=this.getResource(n,e,s,t))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],r=e.replace&&!n(e.replace),i=r?e.replace:e;if(r&&e.count!==void 0&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(let e of t)delete i[e]}return i}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},P=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=C(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=C(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(n(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),n(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||=e[this.getScriptPartFromCode(t)],r||=e[this.formatLanguageCode(t)],r||=e[this.getLanguagePartFromCode(t)],r||=e.default,r||[]}toResolveHierarchy(e,t){let r=this.options.fallbackLng,i=Array.isArray(r)?r.join(`|`):r;i!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=i);let a=t===void 0||t===!1||n(t),o=t===void 0&&typeof this.options.fallbackLng==`function`,s=n(e)&&a&&!o,c=null;if(s){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,c=`${e.length}:${e}|${n}`}if(c!==null){let e=this.resolveHierarchyCache[c];if(e!==void 0)return e.slice()}let l=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return n(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&d(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&d(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&d(this.getLanguagePartFromCode(e))):n(e)&&d(this.formatLanguageCode(e)),l.forEach(e=>{u.includes(e)||d(this.formatLanguageCode(e))}),c===null?u:(this.resolveHierarchyCache[c]=u,u.slice())}},F={zero:0,one:1,two:2,few:3,many:4,other:5},I={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},L=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=T.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=C(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),I;if(!e.match(/-|_/))return I;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>F[e]-F[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},R=(e,t,r,i=`.`,a=!0)=>{let o=p(e,t,r);return!o&&a&&n(r)&&(o=S(e,r,i),o===void 0&&(o=S(t,r,i))),o},ee=e=>e.replace(/\$/g,`$$$$`),z=class{constructor(e={}){this.logger=T.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:y}=e.interpolation;this.escape=t===void 0?_:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?h(i):a||`{{`,this.suffix=o?h(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?h(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?h(l):``,this.nestingPrefix=d?h(d):f||h(`$t(`),this.nestingSuffix=p?h(p):m||h(`)`),this.nestingOptionsSeparator=g||`,`,this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,a){let o,s,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let n=R(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,void 0,r,{...a,...t,interpolationkey:e}):n}let n=e.split(this.formatSeparator),i=n.shift().trim(),o=n.join(this.formatSeparator).trim();return this.format(R(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,r,{...a,...t,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let d=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=a?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:a.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(c=0;o=t.regex.exec(e);){let r=o[1].trim();if(s=u(r),s===void 0){if(typeof d==`function`){let t=d(e,o,a);s=n(t)?t:``}else if(a&&Object.prototype.hasOwnProperty.call(a,r))s=``;else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),s=``}else!n(s)&&!this.useRawValueToEscape&&(s=i(s));let l=t.safeValue(s);if(e=e.replace(o[0],ee(l)),f?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t,r={}){let a,o,s,c=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${h(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,s);let a=i.match(/'/g),o=i.match(/"/g);((a?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let l=[];s={...r},s=s.replace&&!n(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=/{.*}/s.test(a[1])?a[1].lastIndexOf(`}`)+1:a[1].indexOf(this.formatSeparator);if(u!==-1&&(l=a[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),o=t(c.call(this,a[1].trim(),s),s),o&&a[0]===e&&!n(o))return o;n(o)||(o=i(o)),o||=(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),``),l.length&&(o=l.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}},B=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},V=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(C(r),i),t[o]=s),s(n)}},te=e=>(t,n,r)=>e(C(n),r)(t),ne=class{constructor(e={}){this.logger=T.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?V:te;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=V(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=B(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},re=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ie=class extends E{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=T.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{d(n.loaded,[i],a),re(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,r={},i){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),i&&i();n(e)&&(e=this.languageUtils.toResolveHierarchy(e)),n(t)&&(t=[t]);let a=this.queueLoad(e,t,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},H=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),n(e[1])&&(t.defaultValue=e[1]),n(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),U=e=>(n(e.ns)&&(e.ns=[e.ns]),n(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),n(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),W=()=>{},G=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},K=class e extends E{constructor(e={},t){if(super(),this.options=U(e),this.services={},this.logger=T,this.modules={external:[]},G(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(n(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let i=H();this.options={...i,...this.options,...U(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);let a=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?T.init(a(this.modules.logger),this.options):T.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ne;let t=new P(this.options);this.store=new D(this.options.resources,this.options);let n=this.services;n.logger=T,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new L(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=a(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new z(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new ie(a(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=a(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=a(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new N(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=W,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=r(),s=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),o.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),o}loadResources(e,t=W){let r=t,i=n(e)?e:this.language;if(typeof e==`function`&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return r();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,n){let i=r();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=W,this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&O.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=r();this.emit(`languageChanging`,e);let a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(n,r)=>{r?this.isLanguageChangingTo===e&&(a(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,r),this.logger.log(`languageChanged`,r)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(n,(...e)=>this.t(...e))},s=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let r=n(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(n(t)?[t]:t);i&&(this.language||a(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,t,r,i){let a=i?.scopeNs,o=(e,t,...n)=>{let i;i=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(n)),i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs;let s=i.ns!==void 0&&i.ns!==null;i.ns=i.ns||o.ns,i.keyPrefix!==``&&(i.keyPrefix=i.keyPrefix||r||o.keyPrefix);let c={...this.options,...i};Array.isArray(a)&&!s&&(c.ns=a),typeof i.keyPrefix==`function`&&(i.keyPrefix=j(i.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return i.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=j(e,c)),`${i.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=j(e,c)),u=i.keyPrefix?`${i.keyPrefix}${l}${e}`:e),this.t(u,i)};return n(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let i=r();return this.options.ns?(n(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=r();n(e)&&(e=[e]);let a=this.options.preload||[],o=e.filter(e=>!a.includes(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new P(H());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=W){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new D(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...H().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new z(n)}return a.translator=new N(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();K.createInstance,K.dir,K.init,K.loadResources,K.reloadResources,K.use,K.changeLanguage,K.getFixedT,K.t,K.exists,K.setDefaultNamespace,K.hasLoadedNamespace,K.loadNamespaces,K.loadLanguages;var q={type:`3rdParty`,init(n){t(n.options.react),e(n)}},J={app:{reconnecting:`Reconnecting…`,dropSqlite:`Drop to open the SQLite file`,dropSqliteHint:`Opened in your browser with WebAssembly — the file stays on your computer. Drop the -wal sidecar together with it if there is one.`,dropFailedTitle:`Could not open the dropped file`,dropNotSqlite:`{{name}} is not a SQLite database file.`,crashTitle:`Something went wrong`,crashBody:`The app hit an unexpected error. Reloading restores your connections and tabs; unsaved grid edits are lost.`,crashReload:`Reload`},language:{auto:`System language ({{name}})`,en:`English`,ko:`한국어`,zh:`中文(简体)`,ja:`日本語`,de:`Deutsch`,fr:`Français`},settings:{title:`Safety`,description:`Guard rails against accidental data loss. Read-only, environment colour and transaction mode are set per connection.`,language:`Language`,languageHint:`Applies immediately. "System language" follows your browser.`,resetDefaults:`Reset to defaults`,done:`Done`,analytics:`Share anonymous usage statistics`,analyticsHint:`Sends anonymous usage events (engine, feature, statement type) to Google Analytics. Never SQL text, host names, table or user names.`,analyticsUnavailableHint:`Not active in this build (no measurement id configured).`,persistHistory:`Keep query history across reloads`,persistHistoryHint:`Statement text is stored in this browser (password literals are masked; the open editor tabs themselves are always kept). Off: history and versions live only until the tab closes.`,ai:{intro:`Planche can ask a model why a statement failed or why a plan is slow. The question is put together here in the app and sent by your local agent to the provider below — nothing about your SQL or your schema reaches planche.dev.`,provider:`Provider`,openaiCompatible:`OpenAI-compatible`,model:`Model`,baseUrl:`Base URL`,baseUrlHint:`Leave empty for the provider's own endpoint. Any OpenAI-compatible server works — Azure, OpenRouter, a local Ollama.`,key:`API key`,keyHint:`Handed to the local agent and used there. It is never kept in this browser and never sent to planche.dev.`,remember:`Remember this key on this machine`,rememberHint:`Writes it to {{path}}, readable only by you. Without this the key lives in the running agent and is gone when it stops.`,save:`Save`,forget:`Forget key`,saved:`Saved.`,none:`No key set.`,configuredSession:`A key is set for this agent session only.`,configuredFile:`A key is stored at {{path}}.`,configuredEnv:`This agent's AI settings come from its environment and cannot be changed here.`,unreachable:`The agent is not reachable, so AI settings cannot be changed.`,title:`AI explanations`,description:`Which model explains a failure or a plan, and whose key pays for it.`,cli:`Local CLI (no key)`,cliCommand:`Command`,cliHint:`Runs an agent CLI already installed and signed in on this machine, so there is no key to enter. It explains failures and plans; the AI panel needs a provider that can call tools.`,cliNone:`No agent CLI was found on this machine. Install Claude Code or Codex, or pick another provider.`,profile:`Anthropic (this machine's login)`,profileHint:"Uses the credential this machine is already signed in with — the SDK finds it on its own after `ant auth login`. Nothing to paste, and unlike a local CLI this is the real API, so the AI panel works too.",profileNone:"No Anthropic credential was found on this machine. Run `ant auth login`, or set a key instead.",configuredChoice:`Using {{provider}} — no key held; the choice is kept in {{path}}.`},query:{title:`Query`,description:`How a statement is run: what F9 executes, how many rows come back, and what is previewed first.`},general:{title:`General`,description:`Language, what survives a reload, and what leaves this machine.`}},menu:{settings:{safety:`Safety…`,language:`Language`,title:`Settings`,theme:`Theme`,query:`Query…`,general:`General…`,ai:`AI…`},help:{gettingStarted:`Getting Started`,about:`About Planche`,title:`Help`,documentation:`Documentation`,learn:`Learn SQL`,terms:`Terms of Use`,license:`Licence`,support:`Contact support`,mcp:`Connect an AI agent (MCP)…`,privacy:`Privacy policy`},connection:{title:`Connection`,connect:`Connect`,disconnect:`Disconnect`,readOnly:`Read-only`,manualTransactions:`Manual Transactions`,saveDatabaseFile:`Save Database File`,saveDatabaseFileBlocked:`Save Database File (load -wal first)`,exit:`Exit`,sync:`Connection sync`},query:{title:`Query`,execute:`Execute`,executeStatementAtCursor:`Execute Statement at Cursor`,executeWholeScript:`Execute Whole Script`,newQueryTab:`New Query Tab`,findReplace:`Find & Replace`,localHistory:`Local History…`,explainPlan:`Explain Plan`,explainAnalyze:`Explain Analyze (runs the statement)`,structure:`Query Structure`},edit:{title:`Edit`,undo:`Undo`,redo:`Redo`,cut:`Cut`,copy:`Copy`,paste:`Paste`,selectAll:`Select All`},database:{title:`Database`,create:`Create Database`,alter:`Alter Database`,drop:`Drop Database`,copy:`Copy Database`,compare:`Compare Schemas…`,truncate:`Truncate Database`,compareData:`Compare Data…`,groupBy:`Group and Count…`},table:{title:`Table`,create:`Create Table`,alter:`Alter Table`,drop:`Drop Table`,rename:`Rename Table`,truncate:`Truncate Table`,duplicateStructure:`Duplicate Table Structure`},export:{title:`Export`,csv:`Download to CSV`,tsv:`Download to TSV`,schemaHtml:`Schema to HTML`,links:`Export column links…`,importLinks:`Import column links…`},tools:{title:`Tools`,userManager:`User Manager`,processList:`Process List`,variables:`Variables`,status:`Status`,flush:`Flush`,quickCommand:`Quick Command`,viewErd:`View ERD`,scratchpad:`Scratchpad (in-browser SQLite)`,federated:`Federated query (join across connections)…`,federatedTab:`Federated {{n}}`,ai:`AI assistant`},messages:{databaseFileSaved:`Database file saved`,databaseExported:`Database exported as download`,databaseExportedWithReason:`Database exported as download — {{reason}}`,errorSavingDatabase:`Error saving database: {{message}}`,noDatabaseSelected:`No database selected`,noTableSelected:`No table selected`,noActiveConnection:`No active connection`,databaseDropped:`Database "{{database}}" dropped successfully`,errorDroppingDatabase:`Error dropping database: {{message}}`,noTablesInDatabase:`No tables found in database "{{database}}"`,databaseTruncated_one:`All {{count}} table in "{{database}}" truncated successfully`,databaseTruncated_other:`All {{count}} tables in "{{database}}" truncated successfully`,errorTruncatingDatabase:`Error truncating database: {{message}}`,tableDropped:`Table "{{table}}" dropped successfully`,errorDroppingTable:`Error dropping table: {{message}}`,tableTruncated:`Table "{{table}}" truncated successfully`,errorTruncatingTable:`Error truncating table: {{message}}`,renameTablePrompt:`Rename table "{{table}}" to:`,tableRenamed:`Table "{{table}}" renamed to "{{newName}}" successfully`,errorRenamingTable:`Error renaming table: {{message}}`,truncateDatabaseTitle:`Truncate all tables in "{{name}}"?`,truncateDatabaseDescription:`Every row in {{count}} table(s) of "{{name}}" will be deleted. Table structures are kept. This cannot be undone.`,truncateDatabaseConfirm:`Truncate all tables`,renameTableTitle:`Rename table`,renameTableConfirm:`Rename`,noLinksToExport:`No column links to export.`,linksExported:`Exported {{count}} column links.`,linksImported:`Imported {{count}} column links.`,linksImportedPartial:`Imported {{count}} column links; no matching profile for: {{profiles}}`,linksImportFailed:`Could not import column links: {{reason}}`}},about:{title:`About Planche`,tagline:`A database client for MySQL, MariaDB, PostgreSQL and SQLite.`,version:`Version`,website:`Website`,licenses:`Licenses`,licensesLink:`Third-party notices`,disclaimer:`Planche is provided "as is", without warranty of any kind. The authors are not liable for any damage or data loss arising from its use. Back up your data before running destructive statements.`,rights:`All rights reserved.`,legal:`Legal`,terms:`Terms`,privacy:`Privacy`,refund:`Refunds`},connection:JSON.parse('{"dialog":{"title":"Connect to Database","firstQueryTab":"Query 1","colHostName":"Host Name","colTarget":"Target","colDbms":"DBMS","noSaved":"No saved connections","unnamed":"(unnamed)","pickOnConnect":"(pick on connect)","noFile":"(no file)","selectPrompt":"Select a connection or add a new one","addNew":"Add New","delete":"Delete","testConnection":"Test Connection","connect":"Connect","close":"Close","unknownError":"Unknown error","browserTestHint":"In-browser SQLite connections open a local file when you click Connect.","testSuccess":"Connection successful","restoredUnsaved":"{{file}}: restored unsaved changes from the cached copy","restoredUnsavedDiskChanged":"{{file}}: restored unsaved changes from the cached copy — note the file on disk changed since","walPending":"{{file}} is in WAL mode: recent changes may still be in its -wal file. Use \\"Load -wal file\\" above to include them.","walApplied":"{{file}} opened with its -wal changes applied","connectFailedTitle":"Connection failed","testSuccessDescription":"The server accepted the credentials.","testFailedTitle":"Connection test failed","privacy":"Nothing you enter here is sent to or stored on planche.dev servers. Connection profiles live only in this browser\'s local storage; queries go straight from the local agent to your database.","hostKeyTitle":"Unknown SSH host key","hostKeyDescription":"{{host}}:{{port}} presented a {{type}} key with fingerprint {{fingerprint}}. Compare it with the fingerprint your server administrator gave you; accepting the wrong key lets an attacker read your traffic.","hostKeyAccept":"Trust this host","gatewayTitle":"Gateway profiles","gatewayAdd":"Add","gatewayAdded":"Added gateway profile {{name}}.","gatewayReadOnly":"read-only","gatewayWritable":"writable","gatewayProfileHint":"This connection uses the profile \\"{{name}}\\" held by the gateway; there is nothing to configure here.","gatewayLoadFailed":"Could not load the gateway profiles: {{error}}"},"form":{"hostName":"Host Name","hostNamePlaceholder":"My Connection","dataSource":"Data Source","openVia":"Open Via","viaBrowser":"Browser (local file)","viaAgent":"Local agent","viaBrowserHint":"Nothing to install. Best for files no other program is using: the browser works on an in-memory copy and cannot lock the file, so edits made elsewhere while it is open are not seen and Save overwrites them.","viaAgentHint":"Opens the file with SQLite itself via npx planche — proper locking and WAL, safe alongside other programs using the same database.","databaseFile":"Database File","changeFile":"Change file","filePickerHint":"A file picker opens when you click Connect (tip: ⌘⇧. shows hidden files, ⌘⇧G lets you type a path).","fileRememberedHint":"The chosen file is remembered (Chromium) so reconnecting only asks for permission. Use Connection > Save Database File to write changes back.","authToken":"Auth Token","authTokenPlaceholder":"Leave empty to use the paired agent token","filePathPlaceholder":"/path/to/database.sqlite or :memory:","createIfMissing":"Create If Missing","createIfMissingHint":"Path is resolved on the tunneling server host","host":"Host","port":"Port","database":"Database","serviceName":"Service name","user":"User","password":"Password","savePassword":"Save password","savePasswordHint":"Off: the password is kept only for this browser session and never written to disk.","charset":"Charset","autoConnection":"Auto Connection","safety":"Safety","environment":"Environment","environmentHint":"tints the tab and workspace","readOnly":"Read-only","readOnlyHint":"Refuse statements that modify data or schema","transactions":"Transactions","txAuto":"Auto-commit","txManual":"Manual — Commit / Rollback from the toolbar","ssh":"SSH","sshTunnel":"SSH tunnel","sshTunnelHint":"Reach the database through an SSH jump host (opened by the local agent)","sshHost":"SSH Host","sshPort":"SSH port","sshUser":"SSH User","sshAuth":"SSH Auth","sshAuthKey":"Private key","sshAuthPassword":"Password","sshAuthAgent":"ssh-agent","sshAuthAgentHint":"Uses the keys loaded in the ssh-agent of the machine running npx planche (SSH_AUTH_SOCK).","sshPassword":"SSH Password","sshKey":"Private Key","sshKeyPick":"Choose key file…","sshKeyLoaded":"Key loaded","sshKeyHint":"Leave empty to use the IdentityFile from ~/.ssh/config (or ~/.ssh/id_*) on the agent\'s machine; a picked key is stored with this profile","sshPassphrase":"Passphrase","sshPassphrasePlaceholder":"Leave empty if the key has none","sshSecretsHint":"The SSH password, private key and passphrase follow the \\"Save password\\" setting above. Unknown host keys are shown for you to verify before the first connection and saved to ~/.planche/known_hosts on the agent\'s machine.","sshHostPlaceholder":"bastion.example.com or a Host alias from ~/.ssh/config","sshUserPlaceholder":"Leave empty to use ~/.ssh/config","sshTargetHint":"The database host and port are resolved on the jump host — use the database\'s real address (e.g. the RDS endpoint), not localhost or a local port forward.","connectionString":"Connection string","connectionStringApplied":"Applied to the fields below. The string itself is not saved — only the fields are.","connectionStringInvalid":"Not a PostgreSQL URI (expected postgresql://user:password@host/database).","neonHint":"Paste the URI from the Neon console (Connect > Connection string); the fields below are filled in from it.","supabaseHint":"Paste the URI from Supabase (Connect > Session pooler or Direct connection); the fields below are filled in from it.","supabasePoolerWarning":"Port 6543 is the transaction-mode pooler: each statement may run on a different backend, so switching schemas, temp tables, prepared statements and manual transactions do not work. Use the session pooler (port 5432) or the direct connection.","managedTlsHint":"TLS is always on for this service; the connection goes straight from the local agent to the service (no SSH tunnel).","d1AccountId":"Account ID","d1DatabaseId":"Database ID","d1ApiToken":"API Token","d1Hint":"Account ID: Cloudflare dashboard, right side of the account home. Database ID: Storage & Databases > D1 > your database. Token: My Profile > API Tokens > Create Token with the \\"D1 Edit\\" permission (or \\"D1 Read\\" for read-only). The local agent calls the Cloudflare API with it.","d1LimitsHint":"D1 runs each request on its own and auto-commits, so manual transactions are unavailable; the database appears as the single schema \\"main\\".","doDevUrl":"wrangler dev URL","doHint":"Start `wrangler dev` in your Worker project and paste the URL it prints (the port is 8787 unless you changed it). The local agent reads the Durable Objects of that session — including other `wrangler dev` sessions running at the same time.","doLimitsHint":"Local development only: deployed Durable Objects are reachable only from a Worker, so Cloudflare offers no API to query them. Each object appears as a database named \\"<namespace>/<object>\\"; every request auto-commits, so manual transactions are unavailable.","tls":"TLS","tlsEnable":"Encrypt the connection","tlsVerify":"Verify server certificate","tlsVerifyHint":"Off: self-signed certificates are accepted (encrypted, but the server is not authenticated). Not available over an SSH tunnel.","d1DevUrl":"Local dev URL","d1DevUrlHint":"Leave empty to use a Cloudflare account. Filled in, Planche reads the database that `wrangler dev` is running on this machine — no account and no API token, and the account fields below are ignored. Leave the Database ID empty when the dev server binds only one.","d1PickDatabase":"Pick a database"},"agent":{"copy":"Copy","looking":"Looking for the Planche agent…","online":"Agent <b>v{{version}}</b> is running at <mono>{{url}}</mono>","outdated":"Agent v{{version}} speaks protocol {{protocol}}, but this app needs a newer one. Restart it with <cmd/>","unauthorized":"Agent <b>v{{version}}</b> is running at <mono>{{url}}</mono>, but this app is not paired with it (the token changes on every start). Open the link printed in the agent\'s terminal, or paste the token under Configure.","offline":"No agent at <mono>{{url}}</mono>. Start it in a terminal — it opens this app already paired.","close":"Close","configure":"Configure","checkAgain":"Check again","urlLabel":"Agent URL","urlPlaceholder":"http://127.0.0.1:8888 (default)","tokenLabel":"Token","tokenPlaceholder":"Printed by the agent","reset":"Reset","save":"Save","remoteWarning":"This agent is not on your computer ({{host}}): every connection sends its passwords and SSH keys there.","remoteRefusedTitle":"Remote agent not allowed","remoteRefused":"The agent must run on this computer (127.0.0.1 or localhost). To use one on another machine, forward its port with `ssh -L 8888:127.0.0.1:8888 user@host` and keep the URL at http://127.0.0.1:8888.","gateway":"Gateway \\"{{name}}\\": {{count}} server-side profiles. Credentials stay on the gateway; pick a profile below."},"tab":{"noConnections":"No connections open. Press Connect to get started.","theSqliteFile":"the SQLite file","reopened":"Reopened {{file}}","reopenFailed":"Could not reopen file: {{message}}","reopenPrompt":"The browser needs your permission again to read <b>{{file}}</b>.","reopenFile":"Reopen file","closeConnection":"Close connection","reconnected":"Reconnected {{file}}","accessNotGranted":"File access was not granted; Save will export a download instead.","detachedPrompt":"Working on a cached copy of <b>{{file}}</b>. Reconnect the file to save changes in place.","reconnectFile":"Reconnect file","detachedHide":"Hide (Save will ask for the file when needed)","walFramesApplied_one":"Applied {{count}} WAL frame from {{file}}-wal","walFramesApplied_other":"Applied {{count}} WAL frames from {{file}}-wal","walNoChanges":"The -wal file had no committed changes","walLoadFailed":"Could not load -wal file: {{message}}","walPrompt":"<b>{{file}}</b> is in WAL mode: it may not show the latest data until its <mono>{{file}}-wal</mono> file is loaded, and saving is disabled until then. If no such file exists next to it (the database was closed cleanly), confirm that instead. If another program is still using this database, open it through the local agent (<mono>npx planche</mono>) instead: the browser cannot share the file safely.","loadWal":"Load -wal file","noWalHint":"I checked: there is no -wal file next to the database","noWal":"No -wal file","dismiss":"Dismiss","walHide":"Hide (saving stays disabled)","readOnlyBadge":"read-only"}}'),toolbar:{connect:`Connect (Alt+N)`,disconnect:`Disconnect`,newQueryTab:`New Query Tab (Alt+T)`,execute:`Execute (F9)`,executeStatement:`Execute statement at cursor / selection (Ctrl+Enter)`,commit:`Commit`,commitHint:`Commit the open transaction`,noOpenTransaction:`No open transaction`,rollback:`Rollback`,rollbackHint:`Discard the open transaction`,readOnlyBadge:`read-only`,readOnlyHint:`This connection refuses statements that modify data or schema`,userManager:`User Manager (Alt+U)`,quickCommand:`Quick Command`,processList:`Process List`,variables:`Variables`,status:`Status`,flush:`Flush`,fullscreen:`Fullscreen`},footer:{readOnly:`read-only`,txOpen:`tx open`,manualTx:`manual tx`},palette:{title:`Quick Command`,description:`Search for a command to run...`,inputPlaceholder:`Type a command or search...`,empty:`No commands found.`,groups:{connection:`Connection`,query:`Query`,database:`Database`,table:`Table`,tools:`Tools`},commands:{connect:`Connect`,disconnect:`Disconnect`,executeQuery:`Execute Query`,newQueryTab:`New Query Tab`,createDatabase:`Create Database`,dropDatabase:`Drop Database`,createTable:`Create Table`,alterTable:`Alter Table`,dropTable:`Drop Table`,processList:`Process List`,serverVariables:`Server Variables`,serverStatus:`Server Status`,flush:`Flush`,userManager:`User Manager`}},welcome:{title:`Welcome to Planche`,intro:`A SQL client that runs in your browser. Your databases are reached through a small agent on your machine, so credentials and data never leave your computer.`,skip:`Skip`,skipTitle:`Hide this screen (Help > Getting Started brings it back)`,copy:`Copy`,copied:`Copied`,sampleOpenFailed:`Could not open the sample database: {{message}}`,steps:{agent:{title:`Run the local agent`,body:`Run one of these in a terminal. It starts the agent and pairs it with this page.`},connection:{title:`Add a connection`,body:`Pick your database to open the connection form with the right defaults.`},sample:{title:`No database at hand? Try the sample`,body:`Load a sample web-shop database (24 tables, ~50k rows, views and triggers) into the browser to try the editor, grid and schema tree.`,loading:`Loading sample…`,button:`Try the sample database`}},terms:{title:`Before you start`,local:`Everything runs locally: credentials, queries and results stay on your machine and are never sent to us.`,asIs:`Planche is provided as is, without warranty. The safeguards (destructive confirms, read-only mode) are conveniences, not guarantees.`,dataLoss:`You are responsible for every statement executed through Planche. Back up your data before running anything destructive.`,agree:`I have read and agree to the Terms of Use.`,accepted:`You accepted the Terms of Use.`,readFull:`Read the full terms`}},schema:{treeLabel:`Schema`,unreachableHint:`Not the database this connection is bound to; create a profile for it to browse it`,objectType:{table:`Table`,view:`View`,procedure:`Procedure`,function:`Function`,trigger:`Trigger`,event:`Event`},menu:{showCreate:`Show Create {{type}}`,alter:`Alter {{type}}`,drop:`Drop {{type}}`,create:`Create {{type}}`,refresh:`Refresh`,unreachable:`Connect with a profile bound to this database to browse it`,openDatabase:`Open Database`,createSchema:`Create Schema…`,createTable:`Create Table`,dropDatabase:`Drop Database`,openSchema:`Open Schema`,dropSchema:`Drop Schema`,newQueryTab:`New Query Tab`,generateSql:`Generate SQL`,openTable:`Open Table`,alterTable:`Alter Table`,showCreateTable:`Show Create Table`,duplicateStructure:`Duplicate Structure`,copyTable:`Copy Table to…`,compare:`Compare {{type}}…`,truncateTable:`Truncate Table`,dropTable:`Drop Table`,exportCsv:`Export to CSV`,exportTsv:`Export to TSV…`,openView:`Open View`,alterView:`Alter View`,showCreateView:`Show Create View`,dropView:`Drop View`,compareData:`Compare Data…`,groupBy:`Group and Count…`},actions:{createStatementUnavailable:`-- Could not retrieve CREATE statement for {{type}} {{name}}`,getCreateFailed:`Failed to get CREATE {{type}}: {{message}}`,createTabTitle:`Create {{type}}`,createSchemaTabTitle:`Create Schema`,generateSqlFailed:`Could not generate SQL: {{message}}`,dropTableTitle:`Drop table "{{name}}"?`,dropTableDescription:`This permanently deletes the table and every row in it{{from}}. This cannot be undone.`,dropTableConfirm:`Drop table`,dropObjectTitle:`Drop {{type}} "{{name}}"?`,dropObjectDescription:`The {{type}} definition will be removed{{from}}. This cannot be undone.`,dropObjectConfirm:`Drop {{type}}`,fromDatabase:` from database "{{database}}"`,dropped:`Dropped {{type}} {{name}}`,dropFailed:`Failed to drop {{type}}`,dropDatabaseTitle:`Drop database "{{name}}"?`,dropDatabaseDescription:`This permanently deletes the database with all of its tables and data. This cannot be undone.`,dropDatabaseConfirm:`Drop database`,droppedDatabase:`Dropped database {{name}}`,dropDatabaseFailed:`Failed to drop database`,dropSchemaTitle:`Drop schema "{{name}}"?`,dropSchemaDescription:`This permanently deletes the schema with all of its tables and data. This cannot be undone.`,dropSchemaConfirm:`Drop schema`,droppedSchema:`Dropped schema {{name}}`,dropSchemaFailed:`Failed to drop schema`,truncateTitle:`Truncate table "{{name}}"?`,truncateDescription:`Every row in "{{name}}" will be deleted. The table structure is kept. This cannot be undone.`,truncateConfirm:`Truncate table`,truncated:`Truncated {{name}}`,truncateFailed:`Failed to truncate`},tree:{loadDatabasesFailed:`Failed to load databases: {{message}}`}},query:{editor:{destructiveMarker:`Destructive: {{action}} {{names}}`,readOnlyMarker:`Connection is read-only; this statement modifies data or schema`,actionExecute:`Execute (per settings)`,actionExecuteStatement:`Execute Statement at Cursor / Selection`,actionExecuteScript:`Execute Whole Script`,actionExplainPlan:`Explain Plan`,actionQueryStructure:`Query Structure`},tabs:{newQuery:`New Query`,queryTitle:`Query {{n}}`,erdViewer:`ERD Viewer`,close:`Close`,closeOthers:`Close Others`,closeLeft:`Close Tabs to the Left`,closeRight:`Close Tabs to the Right`,closeAll:`Close All`},executor:{noActiveConnection:`No active connection`,uncommittedTitle:`Uncommitted transaction`,uncommittedDescription:`This connection has an open transaction. Disconnecting will roll back its changes.`,uncommittedConfirm:`Rollback and disconnect`,unsavedTitle:`Unsaved changes`,unsavedDescription:`{{file}} has changes that were not saved to its file. Disconnecting discards them (use Connection > Save Database File first to keep them).`,theSqliteDatabase:`The SQLite database`,unsavedConfirm:`Discard and disconnect`}},result:JSON.parse('{"tabs":{"message":"Message","info":"Info","history":"History","result":"Result","resultN":"Result {{n}}","plan":"Plan","structure":"Structure","structureN":"Structure {{n}}"},"message":{"executing":"Executing query...","error":"Error: {{message}}","total":" (Total: {{ms}}ms)","ready":"Ready.","log":"Execution log","statementN":"Statement {{n}}","limitedBadge":"limit hit","insertId":"insert id {{id}}","failed":"Failed","failedStatement":"Failed statement","summary":"{{ok}} succeeded · {{failed}} failed · {{ms}} total","copy":"Copy","copied":"Copied","showSql":"Show SQL","hideSql":"Hide SQL"},"hints":{"title":"Hint","unknownColumn":"No column named {{name}} here. Did you mean {{suggestions}}?","unknownTable":"No table named {{name}} here. Did you mean {{suggestions}}?","syntaxSwap":"{{engine}} writes {{expected}} where this uses {{found}}.","doubleQuotedLiteral":"{{engine}} reads \\"{{value}}\\" as a column name, not text. Write \'{{value}}\' for a string."},"ai":{"title":"AI explanation","explain":"Explain with AI","thinking":"Reading the failure…","by":"by {{model}}","applyFix":"Open the fix in a new tab","failed":"Could not explain this: {{message}}","noFailure":"There is no failed statement to explain.","noPack":"The prompt could not be fetched from planche.dev.","badShape":"The model did not answer in the expected shape.","noPlan":"There is no plan to explain yet.","explainPlan":"Explain this plan"},"info":{"empty":"No query information available.","resultN":"Result {{n}}","metadata":"Query Metadata","executionTime":"Execution Time","notAvailable":"N/A","affectedRows":"Affected Rows","fields":"Fields","fieldDetails":"Field Details","colName":"Name","colType":"Type","colTable":"Table","resultSets":"Result Sets","rowsReturned":"Rows Returned","insertId":"Last Insert ID","lastQuery":"Last executed statement","copy":"Copy","copied":"Copied","colOrigin":"Origin","primaryKey":"Primary key","rowsAndFields":"{{rows}} rows × {{fields}} fields","noFields":"This statement returned no columns."},"rowForm":{"colColumn":"Column","colValue":"Value","insertTitle":"Insert row","editTitle":"Edit row","loading":"Loading columns...","preview":"Statement","nothingToWrite":"Nothing to write","insert":"Insert","update":"Update","stageInsert":"Add as pending row","stageEdit":"Apply to grid","stageHint":"Put the values in the grid without running anything; commit later with the other edits.","inserted":"Row inserted into {{table}}","updated":"Row updated in {{table}}","confirmInsertTitle":"Insert a row into {{table}}?","confirmUpdateTitle":"Update a row in {{table}}?","inTransaction":"Runs inside the open transaction","pickDate":"Pick a date","now":"Now","formatJson":"Format","binaryUnsupported":"Binary columns cannot be edited here; leave NULL / DEFAULT or set them with SQL.","generateUuid":"Generate UUID","defaultValue":"Default value","clickToChange":"Click to change","empty":"(empty)","autoHint":"Generated by the server","mode":{"keep":"Keep","auto":"Auto","value":"Value"},"invalid":{"integer":"Enter a whole number","unsigned":"This column does not accept negative numbers","number":"Enter a number","json":"Invalid JSON","date":"Use YYYY-MM-DD","datetime":"Use YYYY-MM-DD HH:MM:SS","time":"Use HH:MM:SS","length":"At most {{max}} characters"}},"history":{"copied":"Copied to clipboard","searchPlaceholder":"Search history...","all":"All","success":"Succeeded","failed":"Failed","thisTab":"This tab only","noMatch":"No entries match.","count":"{{count}} entries","clear":"Clear","clearTitle":"Clear query history?","clearDescription":"All {{count}} entries for this connection will be removed. This cannot be undone.","clearConfirm":"Clear history","insert":"Insert into editor","inserted":"Inserted into the editor","copy":"Copy","rows":"{{count}} rows","affected":"{{count}} affected","today":"Today","yesterday":"Yesterday","empty":"No query history."},"json":{"arrayLength":"Array[{{count}}]","keys_one":"{{count}} key","keys_other":"{{count}} keys","invalid":"Invalid JSON","clickToView":"Click to view JSON","expandAll":"Expand all","collapseAll":"Collapse all","edit":"Edit","view":"View","copied":"Copied","copy":"Copy","shortcutHint":"{{mod}}+Enter to save · Esc to cancel","cancel":"Cancel","save":"Save"},"text":{"clickToView":"Click to view text","size":"{{chars}} chars · {{lines}} lines","wrap":"Wrap"},"grid":{"readOnlyConnection":"Read-only connection","readOnlyWal":"Read-only: -wal file not loaded","readOnlyNoPk":"Read-only: table has no primary key","commitTitle":"Commit {{count}} change(s) to {{table}}?","commitDescription":"The following statements will be executed.","commitConfirm":"Commit","rowPrefix":"Row {{row}}:","cancelled":"cancelled","commitFailed":"Commit failed: {{message}}","executedInTransaction":"Executed {{count}} change(s) inside the open transaction — press Commit in the toolbar to make them permanent (reloading rolls them back)","committed":"Committed {{count}} change(s) to {{table}}","noData":"No data to display.","commit":"Commit","discard":"Discard","addRow":"Add row","removeNewRow":"Cancel this new row","addRowForm":"Add with form","addRowFormHint":"Open a form with an input per column (committed as INSERT)","editRowForm":"Edit this row in a form","addRowHint":"Add a new row (committed as INSERT)","delete":"Delete","deleteCount":"Delete ({{count}})","deleteHint":"Delete the selected rows (committed as DELETE). Select rows with the row-number column.","field":"Field","searchPlaceholder":"Search...","orderBy":"Order by","none":"None","refresh":"Refresh","dismiss":"Dismiss","clearSelection":"Clear selection","columns":"Columns","showAllColumns":"Show all","hideAllColumns":"Hide all","resetWidths":"Reset widths","selectAll":"Select all rows","emptyTable":"This table has no rows.","noRows":"No rows returned.","addARow":"Add a row","markedForDeletion":"Marked for deletion — click to restore","newRow":"New row","clickToSelect":"Click to select; Shift/Ctrl for multiple","rows":"Rows: {{count}}","rowsWithNew":"Rows: {{count}} (+{{added}})","sortedBy":"Sorted by: {{column}} {{direction}}","pageRange":"Rows {{from}}–{{to}}","firstPage":"First page","prevPage":"Previous page","nextPage":"Next page","lastPage":"Last page","pagingBlocked":"Commit or discard your changes before changing page","selected":"{{count}} selected","cellsModified":"{{count}} cell(s) modified","newCount":"{{count}} new","toDelete":"{{count}} to delete","searchMode":"Match mode","contains":"contains","equals":"equals","followLink":"Open {{table}} where {{column}} = value","linkColumn":"Link \\"{{column}}\\" to another table…","editLink":"Edit link of \\"{{column}}\\"…","removeLink":"Remove link","copyValue":"Copy value","filterByValue":"Filter: {{column}} = this value","clearFilter":"Clear filter","copyColumnName":"Copy column name","editCell":"Edit cell","setNull":"Set NULL","setEmpty":"Set empty string","restoreRow":"Restore row","hideColumn":"Hide column \\"{{column}}\\"","copyRowsTsv_one":"Copy row as TSV (with header)","copyRowsTsv_other":"Copy {{count}} rows as TSV (with header)","copyRowsCsv_one":"Copy row as CSV","copyRowsCsv_other":"Copy {{count}} rows as CSV","copyRowsJson_one":"Copy row as JSON","copyRowsJson_other":"Copy {{count}} rows as JSON","copyRowsInsert_one":"Copy row as INSERT","copyRowsInsert_other":"Copy {{count}} rows as INSERT","deleteRowsPending_one":"Delete row (pending until Commit)","deleteRowsPending_other":"Delete {{count}} rows (pending until Commit)","sendRowsToScratchpad_one":"Send row to scratchpad","sendRowsToScratchpad_other":"Send {{count}} rows to scratchpad","sendAllToScratchpad":"Send all {{count}} loaded rows to scratchpad","sentToScratchpad":"{{count}} rows copied into scratchpad table {{table}}.","changesSince":"Since last load: {{changed}} changed · {{added}} new · {{gone}} gone","changesToggle":"Toggle highlighting of what changed since the previous load","changesDismiss":"Forget these changes","previousValue":"Previous value: {{value}}","groupByValue":"Group and count by {{column}}"},"link":{"title":"Link column to another table","source":"Column","hint":"Values of this column become links: clicking one opens the target table filtered to the matching row(s). Real foreign keys are linked automatically.","targetDatabase":"Target database","targetTable":"Target table","targetColumn":"Target column","pickTable":"Choose a table","pickColumn":"Choose a column","remove":"Remove link","cancel":"Cancel","save":"Save link","targetConnection":"Target connection","targetNotConnected":"The linked connection is not open. Connect it first."},"running":{"label":"Querying…","elapsed":"{{seconds}}s","stop":"Stop","stopping":"Stopping…","cannotCancel":"This engine cannot interrupt a statement once it is running.","agentOutdated":"The local agent is too old to stop a query. Update it with `npx planche@latest` (or `planche upgrade`) and reconnect.","cancelFailed":"The agent could not be reached to stop the query.","abandoned":"Stopped waiting for the request. This engine has no cancel of its own, so the query may still finish upstream."},"plan":{"empty":"Run Explain Plan (Ctrl+Shift+E) to see how the engine will execute the statement at the cursor.","unreadable":"The plan could not be read as a tree; the engine output is shown as-is.","estimated":"Estimated","analyzed":"Measured","estimatedHint":"The planner’s estimates. The statement was not executed.","analyzedHint":"The statement was executed; row counts and timings are real.","totalCost":"Highest node cost","totalTime":"Slowest node","rows":"Estimated rows","actualRows":"Actual rows","cost":"Cost","time":"Time","showRaw":"Raw output","showTree":"Plan tree","selectNode":"Select a node to see what the engine reported about it.","noDetails":"The engine reported nothing else about this node.","warnings":{"fullScan":"Full scan","noIndex":"No index","estimateOff":"Estimate off","temporary":"Temp table","filesort":"Sort"},"hints":{"fullScan":"Every row of the table is read. An index on the filtered columns would avoid it.","noIndex":"The engine found no usable index for this access.","estimateOff":"The planner expected a very different number of rows. Refreshing table statistics often fixes the plan.","temporary":"Rows are materialized into a temporary table before the next step.","filesort":"Rows are sorted outside an index. An index matching the ORDER BY would remove the sort."}},"structure":{"empty":"Show Query Structure (Ctrl+Shift+G) to see where the rows of the statement at the cursor come from.","notQuery":"Only SELECT statements have a structure graph.","unsupported":"{{engine}} statements cannot be read as a structure graph.","parseError":"The statement could not be parsed: {{message}}","columns_one":"{{count}} column","columns_other":"{{count}} columns","columnsUnknown":"width unknown","fit":"Fit","reveal":"Select this in the editor","notDrawn":"Not drawn: {{what}}","kindTable":"TABLE","kindCte":"CTE","kindCteRef":"REF","kindDerived":"SUBQUERY","kindScalar":"SCALAR","kindSetop":"SET","kindResult":"RESULT","fullscreen":"Fullscreen","exitFullscreen":"Exit fullscreen"}}'),confirm:{defaultDescription:`This action cannot be undone.`,typeToConfirm:`Type <name/> to confirm`,cancel:`Cancel`,confirm:`Confirm`,ok:`OK`},table:{dialog:{createTitle:`Create Table`,alterTitle:`Alter Table`,duplicateTitle:`Duplicate Table Structure`,create:`Create`,alter:`Alter`,cancel:`Cancel`,tableName:`Table Name`,tableNamePlaceholder:`Enter table name...`,loading:`Loading table schema...`,tabSchema:`Schema`,tabIndexes:`Indexes`,tabProperties:`Properties`,applying:`Applying…`,cannotAlterColumns:`{{engine}} cannot change a column that already exists ({{columns}}). Adding, dropping and renaming columns and changing indexes all work; to change a column definition, recreate the table.`},schema:{colField:`Field Name`,colType:`Datatype`,colLength:`Length`,colDefault:`Default`,colPk:`PK`,colNotNull:`Not Null`,colUnsigned:`Unsigned`,colAutoIncrement:`Auto Incr`,colZerofill:`Zerofill`,colComment:`Comment`,empty:`No columns defined. Click "Add Column" to add one.`,add:`Add Column`,remove:`Remove Column`},indexes:{colName:`Index Name`,colType:`Index Type`,colColumns:`Columns`,empty:`No indexes defined. Click "Add Index" to add one.`,add:`Add Index`,remove:`Remove Index`},index:{addTitle:`Add Index`,editTitle:`Edit Index`,name:`Index Name`,namePlaceholder:`Enter index name`,type:`Index Type`,columns:`Columns`,noColumns:`No columns available. Define columns in the Schema tab first.`,unnamed:`(unnamed)`,cancel:`Cancel`,ok:`OK`},properties:{engine:`Engine`,charset:`Charset`,collation:`Collation`,autoIncrement:`Auto Increment`,autoIncrementPlaceholder:`Default`,comment:`Comment`},info:{engine:`Engine`,version:`Version`,rowFormat:`Row Format`,rows:`Rows`,avgRowLength:`Avg Row Length`,dataLength:`Data Length`,createTime:`Create Time`,updateTime:`Update Time`,collation:`Collation`,comment:`Comment`},copy:{title:`Copy Table`,source:`Source`,targetConnection:`Target connection`,targetDatabase:`Target database`,targetTable:`Target table name`,what:`Copy`,structureAndData:`Structure & data`,structureOnly:`Structure only`,ifExists:`If the target table exists`,abort:`Abort (default)`,dropAndRecreate:`Drop and recreate (asks to retype the name)`,preview:`CREATE TABLE on the target (editable)`,crossEngineHint:`The target is {{engine}}: review the types below, MySQL-specific attributes were dropped.`,readOnly:`read-only`,loading:`Loading…`,progressCreate:`Creating table…`,progressCount:`Counting rows…`,progressRows:`Copied {{copied}} of {{total}} rows`,progressDone:`Done`,doneTitle:`Table copied`,doneRows:`{{count}} rows copied into {{table}}.`,doneStructure:`Structure of {{table}} created.`,noColumns:`The source table has no columns.`,exists:`Table {{table}} already exists in the target. Choose another name or "Drop and recreate".`,dropTitle:`Drop existing table {{table}}?`,dropDescription:`The target table and all of its rows will be dropped before the copy. This cannot be undone.`,dropConfirm:`Drop and copy`,cancelled:`Copy cancelled.`,stop:`Stop`,cancel:`Cancel`,copy:`Copy`}},database:{copy:{title:`Copy Database`,source:`Source Database`,target:`Target Database Name`,targetPlaceholder:`Enter target database name`,options:`Options`,structureAndData:`Structure & Data`,structureOnly:`Structure Only`,cancel:`Cancel`,copy:`Copy`,creating:`Creating {{database}}…`,copying:`Copying {{table}} ({{index}} of {{total}})…`},diff:{title:`Compare Schemas`,source:`Source`,target:`Target`,pickConnection:`Connection`,pickDatabase:`Database`,crossEngineHint:`Different engines: type names differ by dialect, so most columns will show a type change.`,sameSide:`Source and target are the same database.`,summary:`{{changed}} changed, {{missingTarget}} missing in target, {{missingSource}} only in target, {{identical}} identical`,showIdentical:`Show identical tables`,identicalAll:`The tables are identical.`,column:`Column`,index:`Index`,object:`Object`,selectTable:`Select a table to see its differences.`,missingInTarget:`{{table}} does not exist in the target; the script creates it.`,missingInSource:`{{table}} exists only in the target; the script drops it (commented out unless DROPs are included).`,includeDrops:`Include DROP statements as live SQL (default: commented out)`,tabTitle:`Sync {{database}}`,close:`Close`,compare:`Compare`,comparing:`Comparing…`,openScript:`Open script in editor`,noDefinition:`No CREATE statement available`},create:{title:`Create Database`,name:`Database Name`,namePlaceholder:`Enter database name`,charset:`Character Set`,collation:`Collation`,cancel:`Cancel`,create:`Create`},csv:{title:`Download to {{format}}`,target:`Target`,targetQueryResult:`Current Query Result`,targetTableData:`Table Data`,tableName:`Table Name`,tableNamePlaceholder:`Enter table name`,delimiter:`Delimiter`,delimiterComma:`Comma (,)`,delimiterTab:`Tab (\\t)`,delimiterSemicolon:`Semicolon (;)`,delimiterPipe:`Pipe (|)`,includeHeaders:`Include Headers`,cancel:`Cancel`,download:`Download`,downloading:`Downloading...`,progress:`{{loaded}} of {{total}} rows written`,progressUnknown:`{{loaded}} rows written`,stop:`Stop`,done:`Exported {{count}} rows of {{table}} to {{format}}.`,database:`Database`,databasePlaceholder:`Choose a database`},html:{title:`Schema to HTML`,database:`Database`,selectDatabase:`Select database`,tables:`Tables to Include`,selectAll:`Select All`,deselectAll:`Deselect All`,noTables:`No tables available.`,include:`Include`,includeColumns:`Columns`,includeIndexes:`Indexes`,includeProperties:`Properties`,cancel:`Cancel`,generate:`Generate`,generating:`Generating...`,sectionColumns:`Columns`,sectionIndexes:`Indexes`,sectionProperties:`Properties`,docTitle:`Schema: {{database}}`,heading:`Database: {{database}}`,summary:`Tables: {{count}} | Generated: {{date}}`,footer:`Generated by Planche 2026`},dataDiff:{title:`Compare Data`,pickTable:`Table`,hint:`Rows are matched by the source table's primary key and compared as text. Up to {{cap}} rows per side are loaded; narrow big tables with a filter first.`,sameSide:`Source and target are the same table.`,noPrimaryKey:`{{table}} has no primary key; the comparison needs one to match rows.`,keyMissingInTarget:`The target table lacks the key column(s): {{columns}}`,summary:`Key: {{key}} — {{added}} missing in target, {{changed}} different, {{removed}} only in target, {{identical}} identical`,capped:`Only the first {{cap}} rows of each side were compared.`,ignoredColumns:`Columns ignored (one side only): {{columns}}`,added_one:`{{count}} missing in target`,added_other:`{{count}} missing in target`,changed_one:`{{count}} different`,changed_other:`{{count}} different`,removed_one:`{{count}} only in target`,removed_other:`{{count}} only in target`,none:`Nothing in this group.`,more:`… {{count}} more not listed`,includeDeletes:`Include DELETE statements as live SQL (default: commented out)`,tabTitle:`Sync data {{table}}`,loading:`Loading rows — source: {{source}}, target: {{target}}`},schema:{createTitle:`Create Schema`,name:`Schema name`,namePlaceholder:`Enter schema name`,create:`Create`,cancel:`Cancel`},groupBy:{title:`Group and Count`,description:`Count rows of {{table}} by the columns you pick.`,columns:`Group by`,aggregate:`Extra aggregate`,countOnly:`Count only`,column:`Column`,minCount:`Minimum rows per group`,useFilter:`Apply the grid's current filter`,noIndexWarning:`No grouped column leads an index, so the database has to read and sort the whole table. On a large table that can take a while.`,preview:`Query`,pickColumn:`Pick at least one column to group by.`,openInTab:`Open in new tab`,run:`Run`,tabTitle:`Group {{table}}`,indexed:`Leads an index`,connection:`Connection`,database:`Database`,table:`Table`}},user:{manager:{title:`User Manager`,addUser:`Add User`,removeUser:`Remove User`,noUsers:`No users loaded`,grantScope:`Grant Scope`,apply:`Apply`,close:`Close`,removed:`User '{{user}}'@'{{host}}' removed`,selectUserFirst:`Please select a user first`,applied:`Changes applied successfully`,noChanges:`No privilege changes to apply.`},add:{title:`Add User`,username:`Username`,usernamePlaceholder:`Enter username`,host:`Host`,password:`Password`,passwordPlaceholder:`Enter password`,confirmPassword:`Confirm Password`,confirmPasswordPlaceholder:`Confirm password`,plugin:`Plugin`,cancel:`Cancel`,add:`Add`,usernameRequired:`Username is required`,passwordMismatch:`Passwords do not match`,added:`User '{{user}}'@'{{host}}' added`},privileges:{globalTitle:`Global Privileges`,databaseTitle:`Database Privileges`,tableTitle:`Table Privileges`,checkAll:`Check All`,uncheckAll:`Uncheck All`,categoryData:`Data`,categoryStructure:`Structure`,categoryAdministration:`Administration`},grantTree:{globalPrivileges:`Global Privileges`}},command:{close:`Close`,noActiveConnection:`No active connection`,variableName:`Variable Name`,value:`Value`,scope:{session:`Session`,global:`Global`},findReplace:{findPlaceholder:`Find`,replacePlaceholder:`Replace`,found:`{{count}} found`,noResults:`No results`,previous:`Previous`,next:`Next`,close:`Close`,replace:`Replace`,all:`All`,caseSensitive:`Case Sensitive`,regex:`Regex`,wholeWord:`Whole Word`},flush:{title:`Flush`,executed:`Executed: {{command}}`,executeError:`Error executing {{command}}: {{message}}`},localHistory:{title:`Local History`,description:`Versions of the editor text for this connection: on each run, after a pause in typing, and when a tab is closed.`,empty:`No versions recorded yet.`,noMatch:`No version matches this search.`,notPersisted:`“Keep query history across reloads” is off in Settings > Safety, so versions are kept for this session only.`,searchPlaceholder:`Search versions`,scopeTab:`This tab`,scopeAll:`All tabs`,compareCurrent:`vs current`,comparePrevious:`vs previous`,diffAgainstCurrent:`Compared with the current editor text`,diffAgainstPrevious:`Compared with the version from {{time}}`,noPrevious:`No earlier version of this tab to compare with`,restored:`Editor content restored from local history`,restore:`Restore this version`,openInNewTab:`Open in new tab`,openedInTab:`Version opened in a new tab`,delete:`Delete this version`,clearAll:`Clear history`,chars:`{{count}} chars`,reason:{execute:`before run`,edit:`while editing`,replaced:`before overwrite`,restore:`before restore`,close:`before close`}},processList:{title:`Process List`,refresh:`Refresh`,autoRefresh:`Auto-refresh`,empty:`No processes to display`,kill:`Kill`,killProcess:`Kill Process`,selectToKill:`Please select a process to kill`,killed:`Process {{id}} killed successfully`,killError:`Error killing process: {{message}}`,loadError:`Error loading process list: {{message}}`,updatedAt:`updated {{time}}`,filterPlaceholder:`Filter by user, host, db, SQL...`,hideIdle:`Hide idle`,noMatch:`No processes match the filter`,self:`me`,selfHint:`This is Planche's own session`,statementOf:`Statement of #{{id}}`,noStatement:`No statement`,copy:`Copy`,copied:`Copied`,killConfirmTitle:`Kill process {{id}}?`,killConfirmDescription:`The session of {{user}}@{{host}} will be terminated and its running statement aborted. An open transaction is rolled back.`,stats:{total:`Total`,active:`Active`,idle:`Idle`,longest:`Longest running`},columns:{id:`Id`,user:`User`,host:`Host`,db:`db`,command:`Command`,time:`Time`,state:`State`,info:`Info`,action:`Action`}},status:{title:`Server Status`,filterPlaceholder:`Filter status variables...`,empty:`No status variables to display`,loadError:`Error loading status: {{message}}`},variables:{title:`Server Variables`,filterPlaceholder:`Filter variables...`,empty:`No variables to display`,loadError:`Error loading variables: {{message}}`}},erd:{empty:{title:`Open a Prisma schema file (.prisma) to view the ERD`,description:`Models, enums, and relations will be automatically analyzed`,openFile:`Open .prisma File`,dropHint:`or drag and drop a file onto this area`},entity:{enumBadge:`ENUM`,modelBadge:`MODEL`,columns:{value:`Value`,comment:`Comment`,type:`Type`,column:`Column`},linkBadge:`LINK`,externalTitle:`Linked table on {{location}} (column link, not a real foreign key)`,nullable:`Nullable column`},toolbar:{refresh:`Refresh`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,resetView:`Reset View`,center:`Center`,fitAll:`Fit All`,spreadAll:`Untangle`,resetLayout:`Reset Layout`,legendOneToMany:`1:N (FK)`,tables:`Tables:`,relations:`Relations:`,columns:`Columns:`,fullscreen:`Fullscreen`,exitFullscreen:`Exit fullscreen`},viewer:{noServerConnection:`No active server connection`,loading:`Loading schema from {{database}}...`,loadFailed:`Failed to load ERD`,noDatabase:`No database selected.`,selectDatabaseHint:`Select a database in the Schema Tree, then open View ERD.`}},services:{runAnyway:`Run anyway`,query:{rowsReturned:`{{count}} row(s) returned`,rowsAffected:`{{count}} row(s) affected`,rowsReturnedLimited:`{{count}} row(s) returned (limited to {{limit}}; add LIMIT to fetch more)`,notConnected:`Not connected`,fileNotOpen:`The SQLite file is not open yet — click "Reopen file" above to grant access again.`,failed:`Query failed`,nothingToExecute:`Nothing to execute`,dryRunMismatch:`Dry run expected {{predicted}} rows, {{actual}} were changed. The data may have changed since the preview was read; if it did not, the preview did not match this statement.`},destructive:{title_one:`Run destructive statement?`,title_other:`Run {{count}} destructive statements?`,description:`The following will permanently modify or delete data. This cannot be undone.`,unknownTarget:`(unknown)`,deleteAll:`DELETE all rows from {{target}}`,updateAll:`UPDATE all rows in {{target}}`,alterDrop:`DROP COLUMN/PARTITION on {{target}}`},readOnly:{refused:`Connection "{{label}}" is read-only. {{count}} statement(s) would modify data or schema.`,title:`"{{label}}" is read-only`,description:`These statements modify data or schema. Run them on this connection anyway?`},transaction:{startFailed:`Could not start transaction`,started:`Transaction started — Commit or Rollback when done`,implicitCommit:`{{kind}} caused an implicit COMMIT of the open transaction`,committed:`Transaction committed`,rolledBack:`Transaction rolled back`,commandFailed:`{{name}} failed`,commandFailedWith:`{{name}} failed: {{message}}`},save:{notBrowserSqlite:`Not a browser SQLite connection.`,inMemory:`In-memory database: it can only be exported as a download.`,noFileSystemAccess:`This browser has no File System Access API (Chrome/Edge only): the database is exported as a download instead of written in place.`,noWritableHandle:`The file was opened without a writable handle: it is exported as a download.`},agent:{devProxyUrl:`{{url}} (via dev proxy)`,notPlanche:`Something answered, but it is not a Planche agent`,unreachable:"Planche agent unreachable at {{url}} — run `npx planche` ({{message}})",httpError:`HTTP error: {{status}} {{statusText}}`,emptyResponse:`Tunneling server returned an empty response`,reconnected:`Reconnected to {{name}} — the agent had dropped the connection (restart or idle timeout).`},sample:{profileName:`Sample shop (in-browser)`,downloadFailed:`Could not download the sample database ({{status}})`,tabTitle:`Query 1`},sqliteFile:{tooSmall:`File is too small to be a SQLite database.`,notSqlite:`Not a SQLite database (or an encrypted one, e.g. SQLCipher). The 16-byte header does not read "SQLite format 3".`,badPageSize:`Corrupt SQLite header: invalid page size {{size}}.`,unreadable:`SQLite could not read the file: {{message}}`,pickerDescription:`SQLite database`,walNotLoaded:`This database is in WAL mode and its -wal file was not loaded. Load it, or confirm in the banner that no -wal file exists, before saving.`,changedOnDisk:`{{name}} changed on disk after it was loaded (another program wrote to it). Saving would overwrite those changes — reopen the file and redo your edits, or use the tunneling server.`,walHasChanges:`{{name}}-wal contains new changes; load it before saving.`,walChangedOnDisk:`{{name}}-wal was written by another program after it was loaded; reopen the file before saving.`,writeDenied:`Write access to {{name}} was not granted. Allow it in the browser prompt, or export as a download instead.`},environment:{none:`None`,green:`Green (dev)`,blue:`Blue`,yellow:`Yellow (staging)`,orange:`Orange`,red:`Red (production)`,purple:`Purple`},scratchpad:{profileName:`Scratchpad`,namePromptTitle:`Scratchpad table name`,namePromptDescription:`A table named {{table}} already exists in the scratchpad. Choose another name.`,nameTaken:`Table {{table}} already exists.`},federated:{pulling:`Pulling {{table}} from {{connection}}…`,capped:`{{table}}: only the first {{limit}} rows were pulled.`,templateLine1:`Reference a table of any open connection as "Connection name".database.table; it is copied into this scratchpad before the statement runs.`,templateLine2:`Tables are capped at {{limit}} rows. The query itself runs in SQLite (in your browser).`,templateConnections:`Open connections: {{names}}`,templateNone:`No other connection is open yet. Connect one, then reference it here.`,done:`Pulled {{rows}} rows from {{tables}} remote tables into the scratchpad.`,pullingProgress:`Pulling {{table}} from {{connection}}: {{loaded}} / {{total}} rows…`},paged:{noColumns:`{{table}} has no columns.`,cancelled:`Cancelled.`}},terms:{title:`Terms of Use`,version:`Version {{version}}`,englishOnly:`The terms are provided in English. The summary on the welcome screen is available in your language.`,privacyLink:`Privacy policy`,refundLink:`Refund policy`,online:`Read on planche.dev`,updated:`Last updated {{date}}`},dryRun:{title:`{{kind}} would affect {{count}} rows`,titleUnknown:`{{kind}} — affected rows unknown`,description:`These are the rows the statement would touch right now, read with a SELECT. Nothing has been written yet.`,previewFailed:`The preview query failed: {{error}}
2
+ You can still run the statement.`,noRows:`No rows match — the statement would change nothing.`,truncated:`Showing the first {{shown}} of {{count}} rows.`,previewQuery:`Preview query`,run:`Run {{kind}} ({{count}} rows)`,runAnyway:`Run anyway`},pro:{badge:`PRO`,tooltip:`Requires a Pro licence.`,noticeTitle:`Pro features`,notice:`Features marked PRO need a Pro licence.`,licenseTitle:`Planche Pro`,licenseDescription:`Paste the licence key from your purchase email. It is checked on this computer; nothing is sent anywhere.`,blocked:`{{feature}} needs a Pro licence.`,keyLabel:`Licence key`,activate:`Activate`,remove:`Remove licence`,active:`Pro is active.`,licensedTo:`Licensed to {{email}}`,validUntil:`Valid until {{date}}`,expiredOn:`This licence ran out on {{date}}. Renew it to keep using Pro features.`,invalidKey:`That is not a Planche licence key.`,notConfigured:`This build cannot check licence keys. Please report it.`,noWebcrypto:`This browser cannot check licence keys.`,pricing:`See pricing`,features:{ssh_tunnel:`SSH tunnels`,compare_schemas:`Compare Schemas`,compare_data:`Compare Data`,copy_table:`Copy Table`,dry_run:`Dry run`,federated:`Federated queries`,scratchpad:`Scratchpad`,column_link:`Column links`,sync:`Connection sync`,ai_explain:`AI explanations`},included:`Pro includes`,haveKey:`Already have a licence key?`,perMonth:`/ month`,priceNote:`Billed {{annual}} once a year. Month to month is {{monthly}}.`,featureDetails:{sync:`Your profiles on every computer, encrypted in the browser before they leave it`,ssh_tunnel:`Reach a database behind a jump host with a password, a key or ssh-agent`,compare_schemas:`Diff two open connections and get the ALTER script`,compare_data:`Diff rows between two tables and get the INSERT and UPDATE script`,copy_table:`Rebuild a table on another connection, or another engine`,dry_run:`See how many rows an UPDATE or DELETE changes, and which, before it runs`,federated:`Join tables that live in different connections`,scratchpad:`A local SQLite database for working data`,column_link:`Virtual foreign keys you can follow in the grid`,ai_explain:`Ask a model why a statement failed, or why a plan is slow — with your schema attached`}},install:{npxNote:`Needs Node.js 22 or newer. Nothing is installed permanently — npx runs the agent straight from the npm registry.`,installNote:`No Node.js needed. It installs under your home directory without an administrator; afterwards the planche command starts it any time.`},explain:{unsupported:`{{engine}} does not report query plans.`,oneStatement:`Explain works on one statement at a time. Put the cursor in the statement to explain, or select it.`},ai:{title:`AI assistant`,intro:`Ask for a query, or tell it what to do — it reads the schema, writes SQL into a tab and runs it. It works on the connection you have open, and each one keeps its own conversation.`,privacy:`What the tools read — including sample rows — is sent to your provider. Nothing reaches planche.dev.`,placeholder:`e.g. build a monthly revenue query on the demo database`,send:`Send`,stop:`Stop`,clear:`New conversation`,working:`Working…`,tabTitle:`AI query`,approvalTitle:`This one writes. Run it?`,approve:`Run`,reject:`Skip`,rejected:`The user declined to run this.`,notConfigured:`No AI key is set on the agent. Add one in Settings ▸ AI.`,needsAgent:`This local agent cannot run tools yet. Update it and pair again.`,failed:`Failed`,empty:`Nothing asked yet.`,steps:`{{count}} steps`,tooManySteps:`Stopped after {{count}} steps without reaching an answer.`,collapse:`Collapse`,planWarningTitle:`That query is a full scan. Run it anyway?`,interrupted:`Interrupted by a reload.`,external:`Asked for from outside Planche`},mcp:{title:`Connect an AI agent (MCP)`,description:`Let an AI agent that speaks MCP use Planche's tools.`,readsLabel:`Reads`,reads:`It reads the open database, and the results go to that program.`,writesLabel:`Writes`,writes:`A statement that writes data needs your approval. DROP and TRUNCATE it cannot run.`,needsLabel:`Needs`,needs:`The AI panel has to be open.`,tokenLabel:`Token`,token:`One token, shared by every program you give it to. Revoking it disconnects them all.`,command:`Add to Claude Code`,json:`Configure by hand`,stored:`Stored at {{path}}.`,revoke:`Revoke token`,revoked:`Revoked. Open this again to issue a new one.`},sync:{title:`Connection sync`,description:`Your connection profiles, encrypted in this browser and kept on planche.dev so your other computers can use them.`,stored:`The service stores one encrypted blob. It cannot read your hosts, users, passwords or SSH keys.`,unavailable:`Sync runs on planche.dev only. This copy of Planche is served by your local agent, which is not allowed to reach out to the internet.`,signIn:`Sign in with GitHub`,signedInAs:`Signed in as {{email}}`,signOut:`Sign out`,createTitle:`Choose a passphrase`,createHint:`This passphrase is what encrypts your profiles. It never reaches the server, so if you lose it the stored copy cannot be recovered — only re-created from a computer that still has your profiles.`,passphrase:`Passphrase`,confirm:`Confirm passphrase`,mismatch:`The two passphrases do not match.`,tooShort:`Use at least {{count}} characters.`,enable:`Turn on sync`,unlockTitle:`Unlock your profiles`,unlockHint:`Enter the passphrase you chose when you turned sync on.`,unlock:`Unlock`,wrongPassphrase:`Wrong passphrase, or the stored copy is damaged.`,syncNow:`Sync now`,lastSynced:`Last synced {{when}}`,neverSynced:`Not synced yet`,profiles_one:`{{count}} profile`,profiles_other:`{{count}} profiles`,changePassphrase:`Change passphrase`,deleteVault:`Delete from server`,deleteVaultConfirm:`Remove the encrypted copy from planche.dev? The profiles on this computer are not touched.`,offline:`Cannot reach planche.dev.`,working:`Working…`,serverError:`planche.dev could not complete that. Try again in a moment.`,signInShort:`Sign in`,needsPro:`You are signed in. Syncing your profiles needs a Pro licence — it starts working as soon as you have one.`,deleteAccount:`Delete account`,deleteAccountConfirm:`Delete your account? The stored copy and your sign-in go with it. The profiles on this computer are not touched.`,notDeployed:`Connection sync is not switched on for this site yet.`}},ae=`modulepreload`,Y=function(e){return`/`+e},X={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Y(t,n),t=s(t),t in X)return;X[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Q=[`en`,`ko`,`zh`,`ja`,`de`,`fr`];function $(e=navigator.languages??[navigator.language]){for(let t of e){let e=t.toLowerCase().split(`-`)[0];if(Q.includes(e))return e}return`en`}function oe(e){return e===`auto`?$():e}var se={ko:()=>Z(()=>import(`./BziT-o8V.js`),[]),zh:()=>Z(()=>import(`./D8nrOvmh.js`),[]),ja:()=>Z(()=>import(`./BXX-BtBa.js`),[]),de:()=>Z(()=>import(`./CWY0kZPK.js`),[]),fr:()=>Z(()=>import(`./u80owQsI.js`),[])};K.use(q).init({lng:`en`,fallbackLng:`en`,resources:{en:{translation:J}},interpolation:{escapeValue:!1},returnNull:!1});async function ce(e){let t=oe(e);if(t!==`en`&&!K.hasResourceBundle(t,`translation`)){let e=await se[t]();K.addResourceBundle(t,`translation`,e.default,!0,!0)}K.language!==t&&await K.changeLanguage(t),document.documentElement.lang=t}export{K as a,Z as i,ce as n,j as o,$ as r,Q as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./CKOS5Y-e.js";var t=e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{c as e,n as t,r as n}from"./XzPc-eVf.js";import{a as r,i}from"./ClyAuDY9.js";import{i as a,n as o,r as s,t as c}from"./eFSiW0Lh.js";import{f as l,t as u}from"./DTxGpkJp.js";import{T as d,i as f,l as p,n as ee,s as m,t as te,u as h,w as ne}from"./BdPEUnLq.js";import{t as g}from"./Bit0Kfog.js";import{n as re}from"./CChaTOPr.js";function _(e,t,n){return e.map(e=>e.id===t?n(e):e.children.length>0?{...e,children:_(e.children,t,n)}:e)}function ie(e,t){for(let n of e){if(n.id===t)return n;let e=ie(n.children,t);if(e)return e}return null}function v(e,t,n){let r=new Set(e??[]);if(n)r.add(t);else for(let e of r)(e===t||e.startsWith(`${t}/`))&&r.delete(e);return[...r]}var y=n()(a(e=>({trees:{},selectedNodeId:{},expandedIds:{},setTree:(t,n)=>e(e=>({trees:{...e.trees,[t]:n}})),setChildren:(t,n,r)=>e(e=>{let i=e.trees[t];return i?{expandedIds:{...e.expandedIds,[t]:v(e.expandedIds[t],n,!0)},trees:{...e.trees,[t]:_(i,n,e=>({...e,children:r,isLoading:!1,isExpanded:!0,metadata:{...e.metadata,count:r.length}}))}}:e}),setNodeMetadata:(t,n,r)=>e(e=>{let i=e.trees[t];return i?{trees:{...e.trees,[t]:_(i,n,e=>({...e,metadata:{...e.metadata,...r}}))}}:e}),toggleExpanded:(t,n)=>e(e=>{let r=e.trees[t];if(!r)return e;let i=!ie(r,n)?.isExpanded;return{expandedIds:{...e.expandedIds,[t]:v(e.expandedIds[t],n,i)},trees:{...e.trees,[t]:_(r,n,e=>({...e,isExpanded:i}))}}}),setExpanded:(t,n,r)=>e(e=>{let i=e.trees[t];return i?{expandedIds:{...e.expandedIds,[t]:v(e.expandedIds[t],n,r)},trees:{...e.trees,[t]:_(i,n,e=>({...e,isExpanded:r}))}}:e}),setSelected:(t,n)=>e(e=>({selectedNodeId:{...e.selectedNodeId,[t]:n}})),setLoading:(t,n,r)=>e(e=>{let i=e.trees[t];return i?{trees:{...e.trees,[t]:_(i,n,e=>({...e,isLoading:r}))}}:e}),removeTree:t=>e(e=>{let n={...e.trees},r={...e.selectedNodeId};return delete n[t],delete r[t],{trees:n,selectedNodeId:r}})}),{name:`planche-schema`,storage:c(),partialize:e=>({selectedNodeId:e.selectedNodeId,expandedIds:e.expandedIds})})),b=32,x=24,ae=931071618,oe=931071619,S=(e,t)=>(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0,se=(e,t)=>(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0;function C(e,t,n,r,i=0,a=0){let o=r?S:se;for(let r=t;r<t+n;r+=8)i=i+o(e,r)+a>>>0,a=a+o(e,r+4)+i>>>0;return[i,a]}function ce(e){if(e.byteLength<b)return null;let t=S(e,0);if(t!==ae&&t!==oe)return null;let n=t===oe,r=S(e,8);if(r<512||r>65536||r&r-1)return null;let i=S(e,16),a=S(e,20),[o,s]=C(e,0,24,n);if(o!==S(e,24)||s!==S(e,28))return null;let c=x+r,l=new Map,u=new Map,d=0,f=0,p=0;for(let t=b;t+c<=e.byteLength&&!(S(e,t+8)!==i||S(e,t+12)!==a||([o,s]=C(e,t,8,n,o,s),[o,s]=C(e,t+x,r,n,o,s),o!==S(e,t+16)||s!==S(e,t+20)));t+=c){let n=S(e,t),r=S(e,t+4);if(n===0)break;if(u.set(n,e.subarray(t+x,t+c)),p++,r>0){for(let[e,t]of u)l.set(e,t);u.clear(),d=r,f+=p,p=0}}return{pageSize:r,dbSizePages:d,pages:l,committedFrames:f}}function le(e,t){let n=ce(t);if(!n||n.committedFrames===0)return{bytes:e,appliedFrames:0};let{pageSize:r,dbSizePages:i,pages:a}=n,o=Math.max(i*r,e.byteLength-e.byteLength%r),s=new Uint8Array(o);s.set(e.subarray(0,Math.min(e.byteLength,o)));for(let[e,t]of a){let n=(e-1)*r;n+r<=o&&s.set(t,n)}return{bytes:i>0?s.subarray(0,i*r):s,appliedFrames:n.committedFrames}}var ue=`planche-file-handles`,w=`handles`;function de(){return new Promise((e,t)=>{if(typeof indexedDB>`u`){t(Error(`IndexedDB unavailable`));return}let n=indexedDB.open(ue,1);n.onupgradeneeded=()=>n.result.createObjectStore(w),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}function T(e,t){return de().then(n=>new Promise((r,i)=>{let a=t(n.transaction(w,e).objectStore(w));a.onsuccess=()=>r(a.result),a.onerror=()=>i(a.error)}))}var E=e=>`${e}:wal`;async function D(e,t){try{await T(`readwrite`,n=>n.put(t,e))}catch{}}async function O(e){try{return await T(`readonly`,t=>t.get(e))??null}catch{return null}}async function k(e){try{await T(`readwrite`,t=>t.delete(e))}catch{}}async function A(e,t){let n=e,r={mode:`readwrite`};try{if(n.queryPermission&&await n.queryPermission(r)===`granted`)return!0;if(t&&n.requestPermission)return await n.requestPermission(r)===`granted`}catch{}return!1}var j=e=>`dbcache-meta:${e}`,M=e=>`${e}.sqlite3`;async function fe(e){try{let t=await s.getItem(j(e));if(!t)return null;let n=JSON.parse(t),r=await o.get(M(e));return r?{bytes:new Uint8Array(r),meta:n}:null}catch{return null}}async function pe(e,t,n){try{let r=t.slice().buffer;return await o.set(M(e),r)?(await s.setItem(j(e),JSON.stringify(n)),!0):!1}catch(e){return console.warn(`[db-cache] write failed:`,e),!1}}async function me(e,t){try{let n=await s.getItem(j(e));if(!n)return;await s.setItem(j(e),JSON.stringify({...JSON.parse(n),...t}))}catch{}}async function N(e){try{await o.remove(M(e)),await s.removeItem(j(e))}catch{}}var he=`browser:`;function P(e){return typeof e==`string`&&e.startsWith(`browser:`)}var ge=750;function _e(e){let t=z.get(e);t?.profileId&&(t.flushTimer&&clearTimeout(t.flushTimer),t.flushTimer=setTimeout(()=>{t.flushTimer=null,F(e)},ge))}async function F(e){let t=z.get(e);if(t?.profileId)try{let n=await J(e);await pe(t.profileId,n,I(t))}catch(e){console.warn(`[browser-sqlite] cache flush failed:`,e)}}function I(e){return{name:e.source.name,lastModified:e.fileMeta.lastModified,size:e.fileMeta.size,dirty:e.dirty,cachedAt:Date.now()}}var L=g(`browserSqliteVisibilityListener`,()=>({installed:!1}));typeof document<`u`&&!L.installed&&(L.installed=!0,document.addEventListener(`visibilitychange`,()=>{if(document.visibilityState===`hidden`)for(let[e,t]of z)t.flushTimer&&(clearTimeout(t.flushTimer),t.flushTimer=null,F(e))}));function R(e){return e.toLowerCase().endsWith(`-wal`)}var z=g(`browserSqliteDatabases`,()=>new Map),B=g(`browserSqliteModule`,()=>({promise:null}));async function V(){return B.promise||=i(()=>import(`./DD58tsa9.js`).then(e=>e.default()),[]),B.promise}function H(e){let t=z.get(e);if(!t)throw Error(`Browser connection not found: ${e}`);return t}function ve(e){if(!(e.byteLength>=100&&e[0]===83&&e[15]===0)||e[18]!==2&&e[19]!==2)return{bytes:e,wal:!1};let t=new Uint8Array(e);return t[18]=1,t[19]=1,{bytes:t,wal:!0}}var ye=`SQLite format 3\0`;function be(e){if(e.byteLength===0)return null;if(e.byteLength<100)return r.t(`services.sqliteFile.tooSmall`);if(String.fromCharCode(...e.subarray(0,16))!==ye)return r.t(`services.sqliteFile.notSqlite`);let t=e[16]<<8|e[17],n=t===1?65536:t;return n<512||n&n-1?r.t(`services.sqliteFile.badPageSize`,{size:n}):null}async function xe(e){let t=be(e);if(t)throw Error(t);let n=await V(),i=new n.oo1.DB;if(e.byteLength===0)return i;let a=n.wasm.allocFromTypedArray(e),o=n.capi,s=o.SQLITE_DESERIALIZE_FREEONCLOSE??1,c=o.SQLITE_DESERIALIZE_RESIZEABLE??2,l=n.capi.sqlite3_deserialize(i.pointer,`main`,a,e.byteLength,e.byteLength,s|c);i.checkRc(l);try{i.exec(`SELECT count(*) FROM sqlite_master`)}catch(e){throw i.close(),Error(r.t(`services.sqliteFile.unreadable`,{message:e instanceof Error?e.message:String(e)}))}return i}async function U(e){let t=window.showOpenFilePicker;if(t)try{let n=await t({multiple:e.multiple,types:e.sqliteOnly?[{description:r.t(`services.sqliteFile.pickerDescription`),accept:{"application/vnd.sqlite3":[`.sqlite`,`.sqlite3`,`.db`,`.db3`]}}]:void 0,excludeAcceptAllOption:!1});return Promise.all(n.map(async e=>({file:await e.getFile(),handle:e})))}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return[];throw e}return new Promise(t=>{let n=document.createElement(`input`);n.type=`file`,n.multiple=e.multiple,e.sqliteOnly&&(n.accept=`.sqlite,.sqlite3,.db,.db3,application/vnd.sqlite3`),n.onchange=()=>t(Array.from(n.files??[]).map(e=>({file:e}))),n.oncancel=()=>t([]),n.click()})}async function Se(){let e=await U({multiple:!0,sqliteOnly:!1}),t=e.find(e=>!R(e.file.name));return t?{main:t,wal:e.find(e=>R(e.file.name)&&e.file.name.toLowerCase()===`${t.file.name.toLowerCase()}-wal`)??e.find(e=>R(e.file.name))}:null}async function Ce(){let[e]=await U({multiple:!1,sqliteOnly:!1});return e??null}async function W(e,t,n={}){let{bytes:r,wal:i}=ve(e),a=await xe(r),o=`${he}${crypto.randomUUID()}`,s={...t,wal:i};return z.set(o,{db:a,source:s,rawBytes:e,profileId:n.profileId,fileMeta:n.fileMeta??{lastModified:0,size:e.byteLength},dirty:n.dirty??!1,flushTimer:null}),{connectionId:o,source:s}}async function G(e,t,n,r={}){let i=e?new Uint8Array(await e.arrayBuffer()):new Uint8Array,a=i,o=!1;n&&(a=le(i,new Uint8Array(await n.file.arrayBuffer())).bytes,o=!0);let s=await W(a,{name:e?.name??`:memory:`,handle:t,walApplied:o,walHandle:n?.handle},{profileId:r.profileId,fileMeta:{lastModified:Math.max(e?.lastModified??0,n?.file.lastModified??0),size:i.byteLength}});return z.get(s.connectionId).rawBytes=i,r.profileId&&F(s.connectionId),s}async function K(e,t,n,r){return await W(t,{name:n.name,handle:r,walApplied:!0},{profileId:e,fileMeta:{lastModified:n.lastModified,size:n.size},dirty:n.dirty})}function we(e,t){let n=H(e);n.source={...n.source,handle:t}}function Te(e){return z.get(e)?.dirty??!1}async function Ee(e,t){let n=H(e),r=le(n.rawBytes,new Uint8Array(await t.file.arrayBuffer())),i=await W(r.bytes,{...n.source,walApplied:!0,walHandle:t.handle},{profileId:n.profileId,fileMeta:n.fileMeta});return z.get(i.connectionId).rawBytes=n.rawBytes,X(e),n.profileId&&F(i.connectionId),{...i,appliedFrames:r.appliedFrames}}function q(e){return z.get(e)?.source??null}function De(e){return e&&e.trim().toLowerCase().replace(/\(.*$/,``).trim()||null}function Oe(e){return e==null?`null`:typeof e==`number`?Number.isInteger(e)?`integer`:`real`:typeof e==`bigint`?`bigint`:e instanceof Uint8Array?`blob`:`text`}function ke(e){return typeof e==`bigint`?Number(e):e instanceof Uint8Array?{type:`Buffer`,data:Array.from(e)}:e}async function Ae(e,t){let{db:n}=H(e),r=await V(),i=performance.now(),a=H(e),o=Number(r.capi.sqlite3_total_changes(n.pointer)),s=n.prepare(t);try{if(s.columnCount===0){s.step();let c=Number(n.changes()),l=Number(r.capi.sqlite3_last_insert_rowid(n.pointer)),u=/^\s*(BEGIN|COMMIT|END|ROLLBACK|SAVEPOINT|RELEASE)\b/i.test(t);return(c>0||Number(r.capi.sqlite3_total_changes(n.pointer))!==o||!u)&&(a.dirty=!0,_e(e)),{success:!0,fields:[],records:[],affectedRows:c,insertId:l,isResultQuery:!1,execTime:Math.round(performance.now()-i)}}let c=[];for(;s.step();)c.push(s.get([]).map(ke));let l=s.getColumnNames(),u=r.capi,d=s.pointer;return{success:!0,fields:l.map((e,t)=>{let n=De(u.sqlite3_column_decltype(d,t)),r=u.sqlite3_column_table_name(d,t)??``;return{name:e,orgName:u.sqlite3_column_origin_name(d,t)??e,type:n??Oe(je(c,t)),table:r,orgTable:r,db:u.sqlite3_column_database_name(d,t)??``,maxLength:0}}),records:c,affectedRows:0,insertId:0,isResultQuery:!0,execTime:Math.round(performance.now()-i)}}finally{s.finalize()}}function je(e,t){for(let n of e){let e=n[t];if(e!=null)return e}return null}async function J(e){let{db:t}=H(e);return(await V()).capi.sqlite3_js_db_export(t.pointer)}function Y(e){let t=z.get(e);if(!t?.source.handle)return null;let{source:n}=t;return n.wal&&!n.walApplied&&!n.walAcknowledged?r.t(`services.sqliteFile.walNotLoaded`):null}function Me(e){let t=H(e);t.source={...t.source,walAcknowledged:!0}}async function Ne(e){let{source:t,fileMeta:n}=e;if(!t.handle)return;let i=await t.handle.getFile();if(n.lastModified&&(i.lastModified!==n.lastModified||i.size!==n.size))throw Error(r.t(`services.sqliteFile.changedOnDisk`,{name:t.name}));if(t.walHandle)try{let e=await t.walHandle.getFile();if(e.size>0&&!t.walApplied)throw Error(r.t(`services.sqliteFile.walHasChanges`,{name:t.name}));if(e.size>0&&t.walApplied&&e.lastModified>n.lastModified)throw Error(r.t(`services.sqliteFile.walChangedOnDisk`,{name:t.name}))}catch(e){if(e instanceof Error&&!(e instanceof DOMException))throw e}}async function Pe(e){let t=H(e),{source:n}=t,i=Y(e);if(i)throw Error(i);n.handle&&await Ne(t);let a=await J(e);if(n.handle){if(!await A(n.handle,!0))throw Error(r.t(`services.sqliteFile.writeDenied`,{name:n.name}));let t=await n.handle.createWritable();await t.write(a),await t.close(),n.walHandle&&await(await n.walHandle.createWritable()).close();let i=H(e);i.dirty=!1;try{let e=await n.handle.getFile();i.fileMeta={lastModified:e.lastModified,size:e.size}}catch{i.fileMeta={lastModified:Date.now(),size:a.byteLength}}return i.profileId&&me(i.profileId,{...I(i)}),`in-place`}let o=new Blob([a],{type:`application/vnd.sqlite3`}),s=URL.createObjectURL(o),c=document.createElement(`a`);return c.href=s,c.download=n.name===`:memory:`?`database.sqlite`:n.name,c.click(),URL.revokeObjectURL(s),`download`}function X(e){let t=z.get(e);t&&(t.flushTimer&&clearTimeout(t.flushTimer),t.db.close(),z.delete(e))}function Z(e){return z.get(e)?.profileId}async function Fe(e){await k(e),await k(E(e)),await N(e)}async function Ie(e,t){let n=await O(e);if(!n)return null;if(!await A(n,t))return`denied`;try{return{handle:n,file:await n.getFile()}}catch(t){if(t instanceof DOMException&&(t.name===`NotFoundError`||t.name===`NotAllowedError`))return await k(e),null;throw t}}async function Le(e,t){let n=await O(E(e));if(!(!n||!await A(n,t)))try{return{file:await n.getFile(),handle:n}}catch{await k(E(e));return}}async function Re(e,t){let n={remembered:!0,fromCache:!1,restoredUnsaved:!1,fileDetached:!1,diskChanged:!1},r=await fe(e),i=await Ie(e,t.interactive),a=i&&i!==`denied`?i.handle:void 0,o=i&&i!==`denied`?i.file:null;if(r?.meta.dirty){let{connectionId:t,source:i}=await K(e,r.bytes,r.meta,a),s=o?o.lastModified!==r.meta.lastModified||o.size!==r.meta.size:!1;return{...n,connectionId:t,fileName:i.name,wal:i.wal,walApplied:i.walApplied,fromCache:!0,restoredUnsaved:!0,fileDetached:!a,diskChanged:s}}if(o&&a){let{connectionId:r,source:i}=await G(o,a,await Le(e,t.interactive),{profileId:e});return{...n,connectionId:r,fileName:i.name,wal:i.wal,walApplied:i.walApplied}}if(r){let{connectionId:t,source:i}=await K(e,r.bytes,r.meta);return{...n,connectionId:t,fileName:i.name,wal:i.wal,walApplied:i.walApplied,fromCache:!0,fileDetached:!0}}if(!t.interactive)return null;let s=await Se();if(!s)return null;let{connectionId:c,source:l}=await G(s.main.file,s.main.handle,s.wal,{profileId:e});return s.main.handle?await D(e,s.main.handle):await k(e),s.wal?.handle?await D(E(e),s.wal.handle):await k(E(e)),{...n,connectionId:c,fileName:l.name,wal:l.wal,walApplied:l.walApplied,remembered:!1}}var ze=`SQLite format 3\0`;async function Be(e){if(e.size===0)return!0;if(e.size<100)return!1;let t=new Uint8Array(await e.slice(0,16).arrayBuffer());return String.fromCharCode(...t)===ze}async function Ve(e,t){try{let n=await O(e);return n?await n.isSameEntry(t):!1}catch{return!1}}async function He(n){let i=n.find(e=>!R(e.file.name));if(!i)return;if(!await Be(i.file))throw Error(r.t(`app.dropNotSqlite`,{name:i.file.name}));let a=n.find(e=>R(e.file.name)&&e.file.name.toLowerCase()===`${i.file.name.toLowerCase()}-wal`),o=u.getState(),s;for(let e of o.savedConnections)if(!(e.dbms!==`sqlite`||(e.transport??`browser`)!==`browser`||e.sample||e.file!==i.file.name)&&i.handle&&await Ve(e.id,i.handle)){s=e;break}let c=s??{id:crypto.randomUUID(),hostName:i.file.name.replace(/\.(db|sqlite|sqlite3|db3)$/i,``),host:``,user:``,pass:``,charset:`utf8`,port:0,dbms:`sqlite`,transport:`browser`,file:i.file.name,autoConnection:!1,savePassword:!0,authToken:``};e(`sqlite_file_drop`,{reused:!!s,wal:!!a,handle:!!i.handle});let d=o.activeConnections.some(e=>e.id===c.id),f=o.activeConnections.find(e=>e.id===c.id)?.serverConnectionId,{connectionId:p}=await G(i.file,i.handle,a,{profileId:c.id});f&&f!==p&&P(f)&&X(f),i.handle?await D(c.id,i.handle):await k(c.id),a?.handle?await D(E(c.id),a.handle):await k(E(c.id)),s||o.addSavedConnection(c),o.openConnection({...c,serverConnectionId:p}),o.setPendingReopen(c.id,!1),o.setFileDetached(c.id,!1),y.getState().removeTree(c.id),l(c.id),d||re.getState().addQueryTab(c.id,{id:`tab-${Date.now()}`,title:r.t(`connection.dialog.firstQueryTab`),query:``,database:``,isExecuting:!1,results:[],error:null,executionTime:null}),t.getState().setWelcomeVisible(!1)}async function Ue(e,t){let n=await Ie(e,!0);return!n||n===`denied`?!1:(we(t,n.handle),!0)}async function We(e){let t=Z(e),n=q(e);return n&&!n.handle&&t&&await Ue(t,e),Pe(e)}function Ge(e){let t=q(e);return t?t.name===`:memory:`?r.t(`services.save.inMemory`):typeof window<`u`&&!(`showOpenFilePicker`in window)?r.t(`services.save.noFileSystemAccess`):!t.handle&&!Z(e)?r.t(`services.save.noWritableHandle`):null:r.t(`services.save.notBrowserSqlite`)}async function Ke(e,t){let n=await Ce();if(!n)return null;let r=await Ee(t,n);return n.handle&&await D(E(e),n.handle),{connectionId:r.connectionId,appliedFrames:r.appliedFrames}}function qe(e){if(!P(e))return null;let t=q(e);return t?{wal:t.wal,walApplied:t.walApplied,walAcknowledged:t.walAcknowledged??!1}:null}function Je(e){return e.dbms===`sqlite`&&e.transport===`browser`?`browser`:`tunnel`}async function Ye(e,t){return m(e,t)}async function Xe(e,t){return ne(e,t)}async function Ze(e,t,n){let r=e=>({success:!1,fields:[],records:[],affectedRows:0,insertId:0,isResultQuery:!1,execTime:0,message:e instanceof Error?e.message:String(e)});if(P(e))try{return await Ae(e,t)}catch(e){return r(e)}let i=Q.get(e)??e;try{return await h(i,t,n)}catch(e){if(!(e instanceof te)||e.status!==404)return r(e);let a=await Qe(i);if(!a)return r(e);try{return await h(a,t,n)}catch(e){return r(e)}}}var Q=new Map,$=new Map;function Qe(e){let n=$.get(e);if(n)return n;let i=(async()=>{let n=u.getState(),i=n.activeConnections.find(t=>t.serverConnectionId===e||Q.get(t.serverConnectionId??``)===e);if(!i||Je(i)===`browser`||ee())return null;if(i.serverConnectionId&&i.serverConnectionId!==e&&!Q.has(i.serverConnectionId))return Q.set(e,i.serverConnectionId),i.serverConnectionId;let a=n.resolveCredentials(i),o=a.ssh?.enabled&&a.ssh.auth===`password`&&!a.ssh.password;if(!a.pass&&i.pass===``&&i.dbms!==`sqlite`||o)return null;try{let n=await m(d(a),a.authToken||void 0);if(!n.success||!n.connectionId)return null;for(let[t,r]of Q)r===e&&Q.set(t,n.connectionId);return Q.set(e,n.connectionId),u.getState().updateServerConnectionId(i.id,n.connectionId),u.getState().setTransactionOpen(i.id,!1),t.getState().setFooterMessage(r.t(`services.agent.reconnected`,{name:i.hostName||i.host||i.databaseId||i.file||i.id})),n.connectionId}catch{return null}})();return $.set(e,i),i.finally(()=>$.delete(e)),i}async function $e(e){if(P(e)){let t=Z(e);X(e),t&&await N(t);return}return p(e)}function et(e){return e===`cancelled`?null:e===`abandoned`?r.t(`result.running.abandoned`):e===`agent-outdated`?r.t(`result.running.agentOutdated`):e===`unsupported`?r.t(`result.running.cannotCancel`):r.t(`result.running.cancelFailed`)}async function tt(e){if(P(e))return`unsupported`;let t=u.getState().activeConnections.find(t=>t.id===e)?.serverConnectionId;return t?f(t):`failed`}function nt(e){return async(t,n)=>{let i=await Ze(e,t,n);if(!i.success)throw Error(i.message??r.t(`services.query.failed`));return i}}export{y as S,Me as _,nt as a,Te as b,Ze as c,Je as d,Ke as f,Xe as g,We as h,Ye as i,Fe as l,Ue as m,et as n,Ge as o,He as p,Re as r,$e as s,tt as t,qe as u,Y as v,G as x,P as y};
@@ -0,0 +1 @@
1
+ import{n as e}from"./XzPc-eVf.js";import{l as t,m as n,t as r}from"./CKOS5Y-e.js";import{t as i}from"./DTxGpkJp.js";import{c as a}from"./Cw_LYT6k.js";import{a as o,i as s,n as c,o as l,t as u}from"./DxuXBECK.js";var d=t(),f=[`FLUSH HOSTS`,`FLUSH LOGS`,`FLUSH PRIVILEGES`,`FLUSH STATUS`,`FLUSH TABLES`,`FLUSH THREADS`,`FLUSH QUERY CACHE`,`FLUSH DES_KEY_FILE`,`FLUSH RELAY LOGS`,`FLUSH SLOW LOGS`,`FLUSH BINARY LOGS`,`FLUSH ENGINE LOGS`,`FLUSH ERROR LOGS`,`FLUSH GENERAL LOGS`,`FLUSH USER_RESOURCES`,`FLUSH OPTIMIZER_COSTS`];function p(){let e=i.getState();return e.activeConnections.find(t=>t.id===e.activeConnectionId)?.serverConnectionId??null}function m(){let{t}=n(),{activeDialog:i,closeDialog:m,setFooterMessage:h}=e(),g=i===`flush`;function _(e){e||m()}async function v(e){let n=p();if(!n){h(t(`command.noActiveConnection`));return}try{await a(n,e),h(t(`command.flush.executed`,{command:e}))}catch(n){h(t(`command.flush.executeError`,{command:e,message:n instanceof Error?n.message:String(n)}))}}return(0,d.jsx)(u,{open:g,onOpenChange:_,children:(0,d.jsxs)(c,{className:`sm:max-w-[500px]`,children:[(0,d.jsx)(o,{children:(0,d.jsx)(l,{children:t(`command.flush.title`)})}),(0,d.jsx)(`div`,{className:`grid grid-cols-2 gap-2 py-2`,children:f.map(e=>(0,d.jsx)(r,{variant:`outline`,size:`sm`,className:`justify-start text-xs h-8`,onClick:()=>{v(e)},children:e},e))}),(0,d.jsx)(s,{children:(0,d.jsx)(r,{variant:`outline`,onClick:()=>_(!1),children:t(`command.close`)})})]})})}export{m as FlushDialog};
@@ -0,0 +1 @@
1
+ import{r as e}from"./hePW80VL.js";import{c as t,h as n,n as r}from"./XzPc-eVf.js";import{a as i,f as a,l as o,m as s,o as c,s as l}from"./CKOS5Y-e.js";import{r as u,t as d}from"./ClyAuDY9.js";import{_ as f,a as p,o as m,r as h,t as g}from"./CZQ1r4zz.js";import{t as _}from"./DTxGpkJp.js";import{n as v,r as y}from"./BBSxV90W.js";import{n as b,t as ee}from"./CChaTOPr.js";import{n as x,t as S}from"./Cw_LYT6k.js";import{c as C,i as w}from"./D98JmiqU.js";import{$ as T,B as te,Ct as E,Dt as D,F as O,K as ne,Lt as k,Mt as A,Q as j,R as M,St as re,Tt as N,Vt as ie,X as P,Z as ae,_t as oe,bt as se,dt as ce,ft as le,gt as ue,ht as de,jt as fe,kt as pe,lt as me,ot as he,q as ge,ut as _e,vt as ve,wt as ye,xt as be}from"./2sxOfzyn.js";import{a as xe,n as F,o as Se,r as Ce,t as we}from"./DxuXBECK.js";var Te=i(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Ee=i(`copy-plus`,[[`line`,{x1:`15`,x2:`15`,y1:`12`,y2:`18`,key:`1p7wdc`}],[`line`,{x1:`12`,x2:`18`,y1:`15`,y2:`15`,key:`1nscbv`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),De=i(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Oe=i(`database-zap`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 15 21.84`,key:`14ibmq`}],[`path`,{d:`M21 5V8`,key:`1marbg`}],[`path`,{d:`M21 12L18 17H22L19 22`,key:`zafso`}],[`path`,{d:`M3 12A9 3 0 0 0 14.59 14.87`,key:`1y4wr8`}]]),ke=i(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Ae=i(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),je=i(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),Me=i(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),Ne=i(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Pe=i(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),Fe=i(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Ie=i(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Le=i(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Re=i(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),ze=i(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),Be=i(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Ve=i(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),He=i(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Ue=i(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),I=e(n(),1),L=1,We=.9,Ge=.8,Ke=.17,R=.1,z=.999,qe=.9999,B=.99,V=/[\\\/_+.#"@\[\(\{&]/,Je=/[\\\/_+.#"@\[\(\{&]/g,Ye=/[\s-]/,Xe=/[\s-]/g;function H(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?L:B;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=H(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=L:V.test(e.charAt(l-1))?(d*=Ge,p=e.slice(i,l-1).match(Je),p&&i>0&&(d*=z**+p.length)):Ye.test(e.charAt(l-1))?(d*=We,m=e.slice(i,l-1).match(Xe),m&&i>0&&(d*=z**+m.length)):(d*=Ke,i>0&&(d*=z**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=qe)),(d<R&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=H(e,t,n,r,l+1,a+2,o),f*R>d&&(d=f*R)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Ze(e){return e.toLowerCase().replace(Xe,` `)}function Qe(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,H(e,t,Ze(e),Ze(t),0,0,{})}var U=`[cmdk-group=""]`,W=`[cmdk-group-items=""]`,$e=`[cmdk-group-heading=""]`,et=`[cmdk-item=""]`,tt=`${et}:not([aria-disabled="true"])`,nt=`cmdk-item-select`,G=`data-value`,rt=(e,t,n)=>Qe(e,t,n),it=I.createContext(void 0),K=()=>I.useContext(it),at=I.createContext(void 0),q=()=>I.useContext(at),ot=I.createContext(void 0),st=I.forwardRef((e,t)=>{let n=X(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=X(()=>new Set),i=X(()=>new Map),a=X(()=>new Map),o=X(()=>new Set),s=vt(e),{label:c,children:u,value:d,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=f(),ee=f(),x=f(),S=I.useRef(null),C=bt();Y(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Y(()=>{C(6,ne)},[]);let w=I.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),C(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=k()?.id,w.emit()}),r||C(5,ne),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=I.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,te(t,r)),C(2,()=>{E(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{O(),E(),n.current.value||D(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();C(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:b,inputId:x,labelId:ee,listInnerRef:S}),[]);function te(e,t){let r=s.current?.filter??rt;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;A().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(W);t?t.appendChild(e.parentElement===t?e:e.closest(`${W} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${W} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${U}[${G}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(G);w.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=te(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function ne(){var e;let t=k();t&&(t.parentElement?.firstChild===t&&((e=t.closest(U)?.querySelector($e))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function k(){return S.current?.querySelector(`${et}[aria-selected="true"]`)}function A(){return Array.from(S.current?.querySelectorAll(tt)||[])}function j(e){let t=A()[e];t&&w.setState(`value`,t.getAttribute(G))}function M(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(G))}function re(e){let t=k()?.closest(U),n;for(;t&&!n;)t=e>0?gt(t,U):_t(t,U),n=t?.querySelector(tt);n?w.setState(`value`,n.getAttribute(G)):M(e)}let N=()=>j(A().length-1),ie=e=>{e.preventDefault(),e.metaKey?N():e.altKey?re(1):M(1)},P=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?re(-1):M(-1)};return I.createElement(l.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&ie(e);break;case`ArrowDown`:ie(e);break;case`p`:case`k`:v&&e.ctrlKey&&P(e);break;case`ArrowUp`:P(e);break;case`Home`:e.preventDefault(),j(0);break;case`End`:e.preventDefault(),N();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(nt);t.dispatchEvent(e)}}}}},I.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:St},c),Q(e,e=>I.createElement(at.Provider,{value:w},I.createElement(it.Provider,{value:T},e))))}),ct=I.forwardRef((e,t)=>{let n=f(),r=I.useRef(null),i=I.useContext(ot),o=K(),s=vt(e),c=s.current?.forceMount??i?.forceMount;Y(()=>{if(!c)return o.item(n,i?.id)},[c]);let u=yt(n,r,[e.value,e.children,r],e.keywords),d=q(),p=Z(e=>e.value&&e.value===u.current),m=Z(e=>c||o.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);I.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(nt,h),()=>t.removeEventListener(nt,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=s.current).onSelect)==null||t.call(e,u.current)}function g(){d.setState(`value`,u.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:ee,...x}=e;return I.createElement(l.div,{ref:a(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||o.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),lt=I.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,s=f(),c=I.useRef(null),u=I.useRef(null),d=f(),p=K(),m=Z(e=>i||p.filter()===!1?!0:!e.search||e.filtered.groups.has(s));Y(()=>p.group(s),[]),yt(s,c,[e.value,e.heading,u]);let h=I.useMemo(()=>({id:s,forceMount:i}),[i]);return I.createElement(l.div,{ref:a(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:!m||void 0},n&&I.createElement(`div`,{ref:u,"cmdk-group-heading":``,"aria-hidden":!0,id:d},n),Q(e,e=>I.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?d:void 0},I.createElement(ot.Provider,{value:h},e))))}),ut=I.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=I.useRef(null),o=Z(e=>!e.search);return!n&&!o?null:I.createElement(l.div,{ref:a(i,t),...r,"cmdk-separator":``,role:`separator`})}),dt=I.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=q(),o=Z(e=>e.search),s=Z(e=>e.selectedItemId),c=K();return I.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),I.createElement(l.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ft=I.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,o=I.useRef(null),s=I.useRef(null),c=Z(e=>e.selectedItemId),u=K();return I.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),I.createElement(l.div,{ref:a(o,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},Q(e,e=>I.createElement(`div`,{ref:a(s,u.listInnerRef),"cmdk-list-sizer":``},e)))}),pt=I.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return I.createElement(g,{open:n,onOpenChange:r},I.createElement(m,{container:o},I.createElement(p,{"cmdk-overlay":``,className:i}),I.createElement(h,{"aria-label":e.label,"cmdk-dialog":``,className:a},I.createElement(st,{ref:t,...s}))))}),mt=I.forwardRef((e,t)=>Z(e=>e.filtered.count===0)?I.createElement(l.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),ht=I.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return I.createElement(l.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Q(e,e=>I.createElement(`div`,{"aria-hidden":!0},e)))}),J=Object.assign(st,{List:ft,Item:ct,Input:dt,Group:lt,Separator:ut,Dialog:pt,Empty:mt,Loading:ht});function gt(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function _t(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function vt(e){let t=I.useRef(e);return Y(()=>{t.current=e}),t}var Y=typeof window>`u`?I.useEffect:I.useLayoutEffect;function X(e){let t=I.useRef();return t.current===void 0&&(t.current=e()),t}function Z(e){let t=q(),n=()=>e(t.snapshot());return I.useSyncExternalStore(t.subscribe,n,n)}function yt(e,t,n,r=[]){let i=I.useRef(),a=K();return Y(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(G,s),i.current=s}),i}var bt=()=>{let[e,t]=I.useState(),n=X(()=>new Map);return Y(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function xt(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Q({asChild:e,children:t},n){return e&&I.isValidElement(t)?I.cloneElement(xt(t),{ref:t.ref},n(t.props.children)):n(t)}var St={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=o();function Ct({className:e,...t}){return(0,$.jsx)(J,{"data-slot":`command`,className:c(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function wt({title:e=`Command Palette`,description:t=`Search for a command to run...`,children:n,className:r,showCloseButton:i=!0,...a}){return(0,$.jsxs)(we,{...a,children:[(0,$.jsxs)(xe,{className:`sr-only`,children:[(0,$.jsx)(Se,{children:e}),(0,$.jsx)(Ce,{children:t})]}),(0,$.jsx)(F,{className:c(`overflow-hidden p-0`,r),showCloseButton:i,children:(0,$.jsx)(Ct,{className:`**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:n})})]})}function Tt({className:e,...t}){return(0,$.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,$.jsx)(se,{className:`size-4 shrink-0 opacity-50`}),(0,$.jsx)(J.Input,{"data-slot":`command-input`,className:c(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Et({className:e,...t}){return(0,$.jsx)(J.List,{"data-slot":`command-list`,className:c(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Dt({...e}){return(0,$.jsx)(J.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Ot({className:e,...t}){return(0,$.jsx)(J.Group,{"data-slot":`command-group`,className:c(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function kt({className:e,...t}){return(0,$.jsx)(J.Item,{"data-slot":`command-item`,className:c(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function At({className:e,...t}){return(0,$.jsx)(`span`,{"data-slot":`command-shortcut`,className:c(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}var jt={sky:`text-catppuccin-sky`,blue:`text-catppuccin-blue`,green:`text-catppuccin-green`,teal:`text-catppuccin-teal`,mauve:`text-catppuccin-mauve`,lavender:`text-catppuccin-lavender`,peach:`text-catppuccin-peach`,yellow:`text-catppuccin-yellow`,red:`text-catppuccin-red`};function Mt({theme:e}){let{background:t,blue:n,mauve:r,green:i}=e.colors;return(0,$.jsx)(`span`,{className:`flex size-5 shrink-0 overflow-hidden rounded-sm border border-catppuccin-surface2`,children:[t,n,r,i].map((e,t)=>(0,$.jsx)(`span`,{className:`flex-1`,style:{backgroundColor:e}},t))})}function Nt(){let{t:e}=s(),{activeDialog:n,closeDialog:i,openDialog:a}=r(),o=r(e=>e.setWelcomeVisible),l=r(e=>e.setFooterMessage),{executeCurrentQuery:f,executeCurrentStatement:p,executeWholeScript:m,addNewQueryTab:h,disconnectActive:g}=T(),{capabilities:se}=he(),xe=y(),F=_(e=>e.activeConnections.find(t=>t.id===e.activeConnectionId)),Se=_(e=>e.activeConnectionId?e.transactionOpen[e.activeConnectionId]??!1:!1),Ce=_(e=>e.updateProfile),we=P(e=>e.themeId),L=P(e=>e.setTheme),We=v(e=>e.locale),Ge=v(e=>e.setLocale),Ke=n===`quick-command`,R=F!==void 0,z=b(e=>{let t=_.getState().activeConnectionId;if(!t)return!1;let n=e.activeTabId[t];return(e.tabs[t]??ee).find(e=>e.id===n)?.isExecuting??!1});async function qe(){let e=_.getState().activeConnectionId;if(!e)return;let t=x(await S(e));t&&r.getState().setFooterMessage(t)}let B=(0,I.useCallback)(e=>{i(),e()},[i]),V=(0,I.useCallback)(e=>l(e instanceof Error?e.message:String(e)),[l]),Je=()=>{let e=_.getState().activeConnectionId;e&&(j.getState().openERD(e),t(`erd_open`),b.getState().setActiveQueryTab(e,`erd`))},Ye=[{heading:e(`palette.groups.connection`),commands:[{id:`connect`,label:e(`palette.commands.connect`),icon:Ie,tone:`sky`,shortcut:`Alt+N`,keywords:[`connect`,`server`,`profile`,`login`],disabled:!xe,action:()=>B(()=>a(`connect`))},{id:`disconnect`,label:e(`palette.commands.disconnect`),icon:ce,tone:`red`,keywords:[`disconnect`,`close`],disabled:!R,action:()=>B(()=>{g()})},{id:`read-only`,label:e(`menu.connection.readOnly`),icon:N,tone:`yellow`,keywords:[`read only`,`safety`,`guard`],disabled:!R,checked:F?.readOnly===!0,action:()=>B(()=>{F&&Ce(F.id,{readOnly:!F.readOnly})})},{id:`manual-transactions`,capability:`transactions`,label:e(`menu.connection.manualTransactions`),icon:D,tone:`lavender`,keywords:[`transaction`,`manual`,`autocommit`],disabled:!R,checked:F?.transactionMode===`manual`,action:()=>B(()=>{F&&Ce(F.id,{transactionMode:F.transactionMode===`manual`?`auto`:`manual`})})},{id:`commit`,capability:`transactions`,label:e(`toolbar.commit`),icon:k,tone:`green`,keywords:[`commit`,`transaction`],disabled:!Se||!F,action:()=>B(()=>{F&&w(F.id).catch(V)})},{id:`rollback`,capability:`transactions`,label:e(`toolbar.rollback`),icon:le,tone:`peach`,keywords:[`rollback`,`transaction`,`undo`],disabled:!Se||!F,action:()=>B(()=>{F&&C(F.id).catch(V)})}]},{heading:e(`palette.groups.query`),commands:[{id:`execute`,label:e(`palette.commands.executeQuery`),icon:E,tone:`green`,shortcut:`F9`,keywords:[`run`,`execute`,`sql`],disabled:!R,action:()=>B(()=>{f()})},{id:`stop-query`,label:e(`result.running.stop`),icon:oe,tone:`red`,keywords:[`stop`,`cancel`,`abort`,`kill`],disabled:!z,action:()=>B(()=>{qe()})},{id:`execute-statement`,label:e(`menu.query.executeStatementAtCursor`),icon:De,tone:`green`,shortcut:`Ctrl+Enter`,keywords:[`run`,`statement`,`cursor`],disabled:!R,action:()=>B(()=>{p()})},{id:`execute-script`,label:e(`menu.query.executeWholeScript`),icon:Be,tone:`teal`,shortcut:`Ctrl+Shift+Enter`,keywords:[`run`,`script`,`batch`],disabled:!R,action:()=>B(()=>{m()})},{id:`new-tab`,label:e(`palette.commands.newQueryTab`),icon:re,tone:`blue`,shortcut:`Alt+T`,keywords:[`new`,`tab`,`editor`],disabled:!R,action:()=>B(()=>h())},{id:`find-replace`,label:e(`menu.query.findReplace`),icon:Le,tone:`lavender`,keywords:[`find`,`replace`,`search`],disabled:!R,action:()=>B(()=>a(`find-replace`))},{id:`local-history`,label:e(`menu.query.localHistory`),icon:Ne,tone:`mauve`,keywords:[`history`,`snapshot`,`undo`],disabled:!R,action:()=>B(()=>a(`local-history`))}]},{heading:e(`palette.groups.database`),commands:[{id:`create-db`,capability:`multipleDatabases`,label:e(`palette.commands.createDatabase`),icon:fe,tone:`blue`,keywords:[`create`,`database`,`schema`],disabled:!R,action:()=>B(()=>a(`create-database`))},{id:`alter-db`,capability:`multipleDatabases`,label:e(`menu.database.alter`),icon:Oe,tone:`blue`,keywords:[`alter`,`database`,`charset`],disabled:!R,action:()=>B(()=>a(`alter-database`))},{id:`copy-db`,capability:`multipleDatabases`,label:e(`menu.database.copy`),icon:A,tone:`sky`,keywords:[`copy`,`clone`,`database`],disabled:!R,action:()=>B(()=>a(`copy-database`))},{id:`schema-diff`,label:e(`menu.database.compare`),icon:je,tone:`mauve`,keywords:[`compare`,`diff`,`schema`,`sync`],pro:`compare_schemas`,disabled:!R,action:()=>B(()=>a(`schema-diff`))},{id:`data-diff`,label:e(`menu.database.compareData`),icon:Me,tone:`mauve`,keywords:[`compare`,`diff`,`data`,`rows`],pro:`compare_data`,disabled:!R,action:()=>B(()=>a(`data-diff`))},{id:`group-by`,label:e(`menu.database.groupBy`),icon:ve,tone:`mauve`,keywords:[`group`,`count`,`aggregate`,`distinct`,`summary`],disabled:!R,action:()=>B(()=>a(`group-by`))}]},{heading:e(`palette.groups.table`),commands:[{id:`create-table`,label:e(`palette.commands.createTable`),icon:ue,tone:`green`,keywords:[`create`,`table`],disabled:!R,action:()=>B(()=>a(`create-table`))},{id:`alter-table`,label:e(`palette.commands.alterTable`),icon:me,tone:`yellow`,keywords:[`alter`,`table`,`column`],disabled:!R,action:()=>B(()=>a(`alter-table`))},{id:`duplicate-table`,label:e(`menu.table.duplicateStructure`),icon:Ee,tone:`teal`,keywords:[`duplicate`,`structure`,`table`],disabled:!R,action:()=>B(()=>a(`duplicate-table-structure`))}]},{heading:e(`menu.export.title`),commands:[{id:`export-csv`,label:e(`menu.export.csv`),icon:Ae,tone:`green`,keywords:[`export`,`csv`,`excel`],disabled:!R,action:()=>B(()=>a(`export-csv`))},{id:`export-html`,label:e(`menu.export.schemaHtml`),icon:ke,tone:`peach`,keywords:[`export`,`html`,`schema`,`documentation`],disabled:!R,action:()=>B(()=>a(`export-html`))}]},{heading:e(`palette.groups.tools`),commands:[{id:`process-list`,capability:`processList`,label:e(`palette.commands.processList`),icon:ie,tone:`red`,keywords:[`process`,`kill`,`connections`],disabled:!R,action:()=>B(()=>a(`process-list`))},{id:`variables`,capability:`variables`,label:e(`palette.commands.serverVariables`),icon:Ve,tone:`lavender`,keywords:[`variables`,`server`,`settings`],disabled:!R,action:()=>B(()=>a(`variables`))},{id:`status`,capability:`status`,label:e(`palette.commands.serverStatus`),icon:de,tone:`teal`,keywords:[`status`,`server`,`metrics`],disabled:!R,action:()=>B(()=>a(`status`))},{id:`flush`,capability:`flush`,label:e(`palette.commands.flush`),icon:be,tone:`peach`,keywords:[`flush`,`cache`,`reload`],disabled:!R,action:()=>B(()=>a(`flush`))},{id:`user-manager`,capability:`users`,label:e(`palette.commands.userManager`),icon:_e,tone:`blue`,keywords:[`users`,`grants`,`privileges`],disabled:!R,action:()=>B(()=>a(`user-manager`))},{id:`scratchpad`,label:e(`menu.tools.scratchpad`),icon:ye,tone:`yellow`,keywords:[`scratchpad`,`sqlite`,`local`],pro:`scratchpad`,action:()=>B(()=>{ge().catch(V)})},{id:`federated`,label:e(`menu.tools.federated`),icon:Ue,tone:`mauve`,keywords:[`federated`,`cross`,`join`,`connections`],pro:`federated`,action:()=>B(()=>{te().catch(V)})},{id:`erd`,label:e(`menu.tools.viewErd`),icon:Fe,tone:`sky`,keywords:[`erd`,`diagram`,`relations`],disabled:!R,action:()=>B(Je)}]},{heading:e(`menu.settings.theme`),commands:ae().map(e=>({id:`theme-${e.id}`,label:e.name,tone:`lavender`,keywords:[`theme`,`color`,`appearance`,`dark`,`light`,e.id],checked:we===e.id,swatch:e,action:()=>B(()=>L(e.id))}))},{heading:e(`menu.settings.language`),commands:[`auto`,...d].map(t=>({id:`locale-${t}`,label:t===`auto`?e(`language.auto`,{name:e(`language.${u()}`)}):e(`language.${t}`),icon:Pe,tone:`teal`,keywords:[`language`,`locale`,`i18n`,t],checked:We===t,action:()=>B(()=>Ge(t))}))},{heading:e(`menu.settings.title`),commands:[{id:`safety-settings`,label:e(`menu.settings.safety`),icon:He,tone:`yellow`,keywords:[`safety`,`settings`,`row limit`,`preferences`],action:()=>B(()=>a(`safety-settings`))}]},{heading:e(`menu.help.title`),commands:[{id:`documentation`,label:e(`menu.help.documentation`),icon:Te,tone:`blue`,keywords:[`docs`,`documentation`,`manual`,`help`],action:()=>B(()=>{window.open(ne(),`_blank`,`noopener,noreferrer`)})},{id:`getting-started`,label:e(`menu.help.gettingStarted`),icon:Re,tone:`green`,keywords:[`welcome`,`onboarding`,`sample`,`getting started`],action:()=>B(()=>o(!0))},{id:`terms`,label:e(`menu.help.terms`),icon:ze,tone:`peach`,keywords:[`terms`,`privacy`,`legal`],action:()=>B(()=>a(`terms`))},{id:`about`,label:e(`menu.help.about`),icon:pe,tone:`sky`,keywords:[`about`,`version`,`agent`],action:()=>B(()=>a(`about`))}]}];function Xe(e){e||i()}let H=Ye.map(e=>({...e,commands:e.commands.filter(e=>!e.capability||se[e.capability])})).filter(e=>e.commands.length>0);return(0,$.jsxs)(wt,{open:Ke,onOpenChange:Xe,title:e(`palette.title`),description:e(`palette.description`),children:[(0,$.jsx)(Tt,{placeholder:e(`palette.inputPlaceholder`)}),(0,$.jsxs)(Et,{className:`max-h-[60vh]`,children:[(0,$.jsx)(Dt,{children:e(`palette.empty`)}),H.map(e=>(0,$.jsx)(Ot,{heading:e.heading,children:e.commands.map(t=>(0,$.jsxs)(kt,{value:`${e.heading} ${t.label}`,keywords:t.keywords,disabled:t.disabled,onSelect:()=>{(!t.pro||O(t.pro))&&t.action()},children:[t.swatch?(0,$.jsx)(Mt,{theme:t.swatch}):t.icon?(0,$.jsx)(t.icon,{className:c(`size-4`,jt[t.tone])}):null,(0,$.jsx)(`span`,{className:`truncate`,children:t.label}),(0,$.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[t.pro&&(0,$.jsx)(M,{className:`ml-0`}),t.checked&&(0,$.jsx)(k,{className:`size-3.5 text-catppuccin-green`}),t.shortcut&&(0,$.jsx)(At,{className:`ml-0`,children:t.shortcut})]})]},t.id))},e.heading))]})]})}export{Nt as QuickCommandPalette};
@@ -0,0 +1,2 @@
1
+ var e={reconnecting:`正在重新连接…`,dropSqlite:`松开以打开 SQLite 文件`,dropSqliteHint:`通过 WebAssembly 在浏览器中打开,文件不会离开您的电脑。如有 -wal 文件,请一并拖入。`,dropFailedTitle:`无法打开拖入的文件`,dropNotSqlite:`{{name}} 不是 SQLite 数据库文件。`,crashTitle:`出了点问题`,crashBody:`应用遇到了意外错误。重新加载会恢复连接和标签页;未保存的表格编辑将丢失。`,crashReload:`重新加载`},t={auto:`系统语言({{name}})`,en:`English`,ko:`한국어`,zh:`中文(简体)`,ja:`日本語`,de:`Deutsch`,fr:`Français`},n={title:`安全`,description:`防止意外数据丢失的保护措施。只读、环境颜色和事务模式按连接单独设置。`,language:`语言`,languageHint:`立即生效。“系统语言”跟随浏览器设置。`,resetDefaults:`恢复默认值`,done:`完成`,analytics:`分享匿名使用统计`,analyticsHint:`向 Google Analytics 发送匿名使用事件(引擎、功能、语句类型)。绝不发送 SQL 文本、主机名、表名或用户名。`,analyticsUnavailableHint:`此版本未启用(未配置衡量 ID)。`,persistHistory:`重新加载后保留查询历史`,persistHistoryHint:`语句文本保存在此浏览器中(密码字面量会被遮盖;打开的编辑器标签本身始终保留)。关闭后,历史和快照仅保留到标签页关闭。`,ai:{intro:`可以让模型解释语句为何失败、计划为何缓慢。问题在本应用中组装,由本地代理发送给下面的提供方 — 你的 SQL 和表结构不会到达 planche.dev。`,provider:`提供方`,openaiCompatible:`OpenAI 兼容`,model:`模型`,baseUrl:`Base URL`,baseUrlHint:`留空则使用提供方默认端点。任何 OpenAI 兼容服务器都可以 — Azure、OpenRouter、本地 Ollama。`,key:`API 密钥`,keyHint:`交给本地代理并在那里使用。不会保存在此浏览器中,也不会发送到 planche.dev。`,remember:`在这台机器上记住密钥`,rememberHint:`写入 {{path}},仅你本人可读。不勾选时密钥只存在于运行中的代理里,代理停止即消失。`,save:`保存`,forget:`删除密钥`,saved:`已保存。`,none:`尚未设置密钥。`,configuredSession:`已设置仅在本次代理会话有效的密钥。`,configuredFile:`密钥已保存在 {{path}}。`,configuredEnv:`此代理的 AI 设置来自环境变量,无法在此更改。`,unreachable:`无法连接代理,因此无法更改 AI 设置。`,title:`AI 解释`,description:`由哪个模型解释失败或执行计划,用谁的密钥付费。`,cli:`本地 CLI(无需密钥)`,cliCommand:`命令`,cliHint:`运行本机上已安装并已登录的 agent CLI,因此不需要填写密钥。可用于解释失败和执行计划;AI 面板需要能调用工具的 provider。`,cliNone:`本机未找到 agent CLI。请安装 Claude Code 或 Codex,或改选其他 provider。`,profile:`Anthropic(本机登录)`,profileHint:"使用本机已登录的凭据 —— 执行 `ant auth login` 后 SDK 会自行找到。无需粘贴任何内容;与本地 CLI 不同,这是真正的 API,所以 AI 面板也能用。",profileNone:"本机未找到 Anthropic 凭据。请执行 `ant auth login`,或改为填写密钥。",configuredChoice:`正在使用 {{provider}} — 不保存密钥;该选择保存在 {{path}}。`},query:{title:`查询`,description:`语句如何执行: F9 运行什么、返回多少行、先预览什么。`},general:{title:`通用`,description:`语言、重新加载后仍保留的内容,以及离开这台机器的内容。`}},r={settings:{safety:`安全…`,language:`语言`,title:`设置`,theme:`主题`,query:`查询…`,general:`通用…`,ai:`AI…`},help:{gettingStarted:`快速入门`,about:`关于 Planche`,title:`帮助`,documentation:`文档`,learn:`学习 SQL`,terms:`使用条款`,license:`许可证`,support:`联系支持`,mcp:`连接 AI 代理 (MCP)…`,privacy:`隐私政策`},connection:{title:`连接`,connect:`连接`,disconnect:`断开连接`,readOnly:`只读`,manualTransactions:`手动事务`,saveDatabaseFile:`保存数据库文件`,saveDatabaseFileBlocked:`保存数据库文件(请先加载 -wal)`,exit:`退出`,sync:`连接同步`},query:{title:`查询`,execute:`执行`,executeStatementAtCursor:`执行光标处语句`,executeWholeScript:`执行整个脚本`,newQueryTab:`新建查询标签页`,findReplace:`查找和替换`,localHistory:`本地历史记录…`,explainPlan:`查看执行计划`,explainAnalyze:`实测执行计划 (会真正执行该语句)`,structure:`查询结构`},edit:{title:`编辑`,undo:`撤销`,redo:`重做`,cut:`剪切`,copy:`复制`,paste:`粘贴`,selectAll:`全选`},database:{title:`数据库`,create:`创建数据库`,alter:`修改数据库`,drop:`删除数据库`,copy:`复制数据库`,compare:`比较架构…`,truncate:`清空数据库`,compareData:`比较数据…`,groupBy:`分组统计…`},table:{title:`表`,create:`创建表`,alter:`修改表`,drop:`删除表`,rename:`重命名表`,truncate:`清空表`,duplicateStructure:`复制表结构`},export:{title:`导出`,csv:`下载为 CSV`,tsv:`下载为 TSV`,schemaHtml:`架构导出为 HTML`,links:`导出列链接…`,importLinks:`导入列链接…`},tools:{title:`工具`,userManager:`用户管理`,processList:`进程列表`,variables:`变量`,status:`状态`,flush:`Flush`,quickCommand:`快速命令`,viewErd:`查看 ERD`,scratchpad:`草稿板(浏览器内 SQLite)`,federated:`联合查询(跨连接联接)…`,federatedTab:`联合查询 {{n}}`,ai:`AI 助手`},messages:{databaseFileSaved:`数据库文件已保存`,databaseExported:`数据库已导出为下载文件`,databaseExportedWithReason:`数据库已导出为下载文件 — {{reason}}`,errorSavingDatabase:`保存数据库时出错:{{message}}`,noDatabaseSelected:`未选择数据库`,noTableSelected:`未选择表`,noActiveConnection:`没有活动连接`,databaseDropped:`数据库“{{database}}”已成功删除`,errorDroppingDatabase:`删除数据库时出错:{{message}}`,noTablesInDatabase:`数据库“{{database}}”中没有表`,databaseTruncated_other:`已成功清空“{{database}}”中的全部 {{count}} 张表`,errorTruncatingDatabase:`清空数据库时出错:{{message}}`,tableDropped:`表“{{table}}”已成功删除`,errorDroppingTable:`删除表时出错:{{message}}`,tableTruncated:`表“{{table}}”已成功清空`,errorTruncatingTable:`清空表时出错:{{message}}`,renameTablePrompt:`将表“{{table}}”重命名为:`,tableRenamed:`表“{{table}}”已成功重命名为“{{newName}}”`,errorRenamingTable:`重命名表时出错:{{message}}`,truncateDatabaseTitle:`清空 "{{name}}" 中的所有表?`,truncateDatabaseDescription:`"{{name}}" 中 {{count}} 个表的所有行将被删除。表结构将保留。此操作无法撤销。`,truncateDatabaseConfirm:`清空所有表`,renameTableTitle:`重命名表`,renameTableConfirm:`重命名`,noLinksToExport:`没有可导出的列链接。`,linksExported:`已导出 {{count}} 个列链接。`,linksImported:`已导入 {{count}} 个列链接。`,linksImportedPartial:`已导入 {{count}} 个列链接;没有匹配的连接配置:{{profiles}}`,linksImportFailed:`无法导入列链接:{{reason}}`}},i={title:`关于 Planche`,tagline:`适用于 MySQL、MariaDB、PostgreSQL 和 SQLite 的数据库客户端。`,version:`版本`,website:`网站`,licenses:`许可证`,licensesLink:`第三方声明`,disclaimer:`Planche 按“原样”提供,不附带任何形式的保证。作者不对因使用本软件造成的任何损害或数据丢失承担责任。执行破坏性语句前请备份数据。`,rights:`保留所有权利。`,legal:`法律条款`,terms:`服务条款`,privacy:`隐私`,refund:`退款`},a=JSON.parse('{"dialog":{"title":"连接到数据库","firstQueryTab":"查询 1","colHostName":"主机名称","colTarget":"目标","colDbms":"DBMS","noSaved":"没有已保存的连接","unnamed":"(未命名)","pickOnConnect":"(连接时选择)","noFile":"(无文件)","selectPrompt":"选择一个连接或新建一个","addNew":"新建","delete":"删除","testConnection":"测试连接","connect":"连接","close":"关闭","unknownError":"未知错误","browserTestHint":"浏览器内 SQLite 连接会在点击“连接”时打开本地文件。","testSuccess":"连接成功","restoredUnsaved":"{{file}}:已从缓存副本恢复未保存的更改","restoredUnsavedDiskChanged":"{{file}}:已从缓存副本恢复未保存的更改 — 注意,磁盘上的文件此后已发生变化","walPending":"{{file}} 处于 WAL 模式:最近的更改可能仍在其 -wal 文件中。请使用上方的“加载 -wal 文件”将其包含进来。","walApplied":"{{file}} 已打开并应用了其 -wal 中的更改","connectFailedTitle":"连接失败","testSuccessDescription":"服务器已接受该凭据。","testFailedTitle":"连接测试失败","privacy":"您在此输入的任何信息都不会发送到或存储在 planche.dev 的服务器上。连接配置仅保存在此浏览器的本地存储中;查询由本地代理直接发送到您的数据库。","hostKeyTitle":"未知的 SSH 主机密钥","hostKeyDescription":"{{host}}:{{port}} 出示了指纹为 {{fingerprint}} 的 {{type}} 密钥。请与服务器管理员提供的指纹核对;接受错误的密钥会让攻击者读取您的流量。","hostKeyAccept":"信任此主机","gatewayTitle":"网关配置","gatewayAdd":"添加","gatewayAdded":"已添加网关配置 {{name}}。","gatewayReadOnly":"只读","gatewayWritable":"可写","gatewayProfileHint":"此连接使用网关保存的配置“{{name}}”,这里无需设置。","gatewayLoadFailed":"无法加载网关配置:{{error}}"},"form":{"hostName":"主机名称","hostNamePlaceholder":"我的连接","dataSource":"数据源","openVia":"打开方式","viaBrowser":"浏览器(本地文件)","viaAgent":"本地代理","viaBrowserHint":"无需安装。最适合没有其他程序在使用的文件:浏览器在内存副本上工作,无法锁定文件,因此在打开期间其他程序所做的修改不会被看到,保存时会将其覆盖。","viaAgentHint":"通过 npx planche 用 SQLite 本身打开文件 — 具备正确的锁定和 WAL 支持,可与使用同一数据库的其他程序安全共存。","databaseFile":"数据库文件","changeFile":"更改文件","filePickerHint":"点击“连接”时会打开文件选择器(提示:⌘⇧. 显示隐藏文件,⌘⇧G 可输入路径)。","fileRememberedHint":"所选文件会被记住(Chromium),重新连接时只需再次授权。使用“连接 > 保存数据库文件”将更改写回。","authToken":"认证令牌","authTokenPlaceholder":"留空则使用已配对的代理令牌","filePathPlaceholder":"/path/to/database.sqlite 或 :memory:","createIfMissing":"不存在时创建","createIfMissingHint":"路径在隧道服务器主机上解析","host":"主机","port":"端口","database":"数据库","serviceName":"服务名","user":"用户","password":"密码","savePassword":"保存密码","savePasswordHint":"关闭:密码仅在本次浏览器会话中保留,绝不写入磁盘。","charset":"字符集","autoConnection":"自动连接","safety":"安全","environment":"环境","environmentHint":"为标签页和工作区着色","readOnly":"只读","readOnlyHint":"拒绝修改数据或架构的语句","transactions":"事务","txAuto":"自动提交","txManual":"手动 — 在工具栏中提交 / 回滚","ssh":"SSH","sshTunnel":"SSH 隧道","sshTunnelHint":"通过 SSH 跳板机连接数据库(由本地代理建立隧道)","sshHost":"SSH 主机","sshPort":"SSH 端口","sshUser":"SSH 用户","sshAuth":"SSH 认证","sshAuthKey":"私钥","sshAuthPassword":"密码","sshAuthAgent":"ssh-agent","sshAuthAgentHint":"使用运行 npx planche 的机器上 ssh-agent 中加载的密钥(SSH_AUTH_SOCK)。","sshPassword":"SSH 密码","sshKey":"私钥","sshKeyPick":"选择密钥文件…","sshKeyLoaded":"已加载密钥","sshKeyHint":"留空则使用代理机器上 ~/.ssh/config 的 IdentityFile(或 ~/.ssh/id_*);选择的密钥随此配置一起保存","sshPassphrase":"密码短语","sshPassphrasePlaceholder":"密钥没有密码短语时留空","sshSecretsHint":"SSH 密码、私钥和口令遵循上方的“保存密码”设置。未知的主机密钥会在首次连接前显示供您核对,并保存到代理所在机器的 ~/.planche/known_hosts。","sshHostPlaceholder":"bastion.example.com 或 ~/.ssh/config 中的 Host 别名","sshUserPlaceholder":"留空则使用 ~/.ssh/config 中的 User","sshTargetHint":"数据库主机/端口在跳板机上解析——请填写数据库的真实地址(如 RDS 端点),而不是 localhost 或本地端口转发。","connectionString":"连接字符串","connectionStringApplied":"已填入下方字段。字符串本身不会保存,只保存字段。","connectionStringInvalid":"不是 PostgreSQL URI(应为 postgresql://user:password@host/database)。","neonHint":"粘贴 Neon 控制台(Connect > Connection string)中的 URI,下方字段将自动填写。","supabaseHint":"粘贴 Supabase(Connect > Session pooler 或 Direct connection)中的 URI,下方字段将自动填写。","supabasePoolerWarning":"端口 6543 是事务模式连接池:每条语句可能在不同的后端执行,因此切换模式、临时表、预处理语句和手动事务都无法使用。请改用会话连接池(端口 5432)或直接连接。","managedTlsHint":"此服务始终使用 TLS 连接,由本地代理直接连接到服务(不经过 SSH 隧道)。","d1AccountId":"Account ID","d1DatabaseId":"Database ID","d1ApiToken":"API 令牌","d1Hint":"Account ID:Cloudflare 控制台账户首页右侧。Database ID:Storage & Databases > D1 > 你的数据库。令牌:My Profile > API Tokens > Create Token,授予 \\"D1 Edit\\" 权限(只读用 \\"D1 Read\\")。本地代理用它调用 Cloudflare API。","d1LimitsHint":"D1 每个请求独立执行并自动提交,因此无法使用手动事务;数据库显示为单一模式 \\"main\\"。","doDevUrl":"wrangler dev URL","doHint":"在 Worker 项目中运行 `wrangler dev`,并填入它输出的 URL(默认端口 8787)。本地代理会读取该会话的 Durable Object,同时运行的其他 `wrangler dev` 会话也会一并显示。","doLimitsHint":"仅限本地开发:已部署的 Durable Object 只能从 Worker 内访问,Cloudflare 未提供查询 API。每个对象显示为名为 \\"<命名空间>/<对象>\\" 的数据库;每个请求自动提交,因此无法使用手动事务。","tls":"TLS","tlsEnable":"加密连接","tlsVerify":"验证服务器证书","tlsVerifyHint":"关闭时接受自签名证书(已加密但不验证服务器身份)。通过 SSH 隧道时不可用。","d1DevUrl":"本地开发 URL","d1DevUrlHint":"留空则通过 Cloudflare 账号连接。填写后,Planche 直接读取本机 `wrangler dev` 正在运行的数据库——不需要账号和 API 令牌,下面的账号字段会被忽略。开发服务器只绑定一个 D1 时,Database ID 可以留空。","d1PickDatabase":"选择数据库"},"agent":{"copy":"复制","looking":"正在查找 Planche 代理…","online":"代理 <b>v{{version}}</b> 正在 <mono>{{url}}</mono> 运行","outdated":"代理 v{{version}} 使用协议 {{protocol}},但此应用需要更新的版本。请使用 <cmd/> 重新启动","unauthorized":"代理 <b>v{{version}}</b> 正在 <mono>{{url}}</mono> 运行,但此应用尚未与其配对(令牌每次启动都会变化)。请打开代理终端中打印的链接,或在“配置”中粘贴令牌。","offline":"<mono>{{url}}</mono> 上没有代理。请在终端启动它 — 它会以已配对的状态打开本应用。","close":"关闭","configure":"配置","checkAgain":"重新检查","urlLabel":"代理 URL","urlPlaceholder":"http://127.0.0.1:8888(默认)","tokenLabel":"令牌","tokenPlaceholder":"由代理打印","reset":"重置","save":"保存","remoteWarning":"此代理不在您的电脑上({{host}}):每个连接的密码和 SSH 密钥都会发送到那里。","remoteRefusedTitle":"不允许使用远程代理","remoteRefused":"代理必须在本机(127.0.0.1 或 localhost)运行。要使用另一台机器上的代理,请用 `ssh -L 8888:127.0.0.1:8888 user@host` 转发端口,并保持 URL 为 http://127.0.0.1:8888。","gateway":"网关“{{name}}”:{{count}} 个服务端配置。凭据只保存在网关上;请在下方选择配置。"},"tab":{"noConnections":"没有打开的连接。点击“连接”开始。","theSqliteFile":"该 SQLite 文件","reopened":"已重新打开 {{file}}","reopenFailed":"无法重新打开文件:{{message}}","reopenPrompt":"浏览器需要再次获得您的授权才能读取 <b>{{file}}</b>。","reopenFile":"重新打开文件","closeConnection":"关闭连接","reconnected":"已重新连接 {{file}}","accessNotGranted":"未授予文件访问权限;保存时将改为导出下载文件。","detachedPrompt":"正在处理 <b>{{file}}</b> 的缓存副本。请重新连接文件以就地保存更改。","reconnectFile":"重新连接文件","detachedHide":"隐藏(保存时会在需要时请求文件)","walFramesApplied_other":"已从 {{file}}-wal 应用 {{count}} 个 WAL 帧","walNoChanges":"-wal 文件中没有已提交的更改","walLoadFailed":"无法加载 -wal 文件:{{message}}","walPrompt":"<b>{{file}}</b> 处于 WAL 模式:在加载其 <mono>{{file}}-wal</mono> 文件之前可能无法显示最新数据,并且在此之前无法保存。如果旁边没有该文件(数据库已正常关闭),请改为确认这一点。如果其他程序仍在使用此数据库,请改为通过本地代理(<mono>npx planche</mono>)打开:浏览器无法安全地共享该文件。","loadWal":"加载 -wal 文件","noWalHint":"我已确认:数据库旁边没有 -wal 文件","noWal":"没有 -wal 文件","dismiss":"关闭","walHide":"隐藏(仍然无法保存)","readOnlyBadge":"只读"}}'),o={connect:`连接 (Alt+N)`,disconnect:`断开连接`,newQueryTab:`新建查询标签页 (Alt+T)`,execute:`执行 (F9)`,executeStatement:`执行光标处 / 选中的语句 (Ctrl+Enter)`,commit:`提交`,commitHint:`提交当前打开的事务`,noOpenTransaction:`没有打开的事务`,rollback:`回滚`,rollbackHint:`放弃当前打开的事务`,readOnlyBadge:`只读`,readOnlyHint:`此连接拒绝修改数据或架构的语句`,userManager:`用户管理 (Alt+U)`,quickCommand:`快速命令`,processList:`进程列表`,variables:`变量`,status:`状态`,flush:`Flush`,fullscreen:`全屏`},s={readOnly:`只读`,txOpen:`事务进行中`,manualTx:`手动事务`},c={title:`快速命令`,description:`搜索要运行的命令...`,inputPlaceholder:`输入命令或搜索...`,empty:`未找到命令。`,groups:{connection:`连接`,query:`查询`,database:`数据库`,table:`表`,tools:`工具`},commands:{connect:`连接`,disconnect:`断开连接`,executeQuery:`执行查询`,newQueryTab:`新建查询标签页`,createDatabase:`创建数据库`,dropDatabase:`删除数据库`,createTable:`创建表`,alterTable:`修改表`,dropTable:`删除表`,processList:`进程列表`,serverVariables:`服务器变量`,serverStatus:`服务器状态`,flush:`Flush`,userManager:`用户管理`}},l={title:`欢迎使用 Planche`,intro:`一个在浏览器中运行的 SQL 客户端。通过您机器上的一个小型代理访问数据库,因此凭据和数据绝不会离开您的电脑。`,skip:`跳过`,skipTitle:`隐藏此页面(可通过“帮助 > 快速入门”重新打开)`,copy:`复制`,copied:`已复制`,sampleOpenFailed:`无法打开示例数据库:{{message}}`,steps:{agent:{title:`运行本地代理`,body:`在终端运行下面任意一条命令。代理会启动,并与本页面配对。`},connection:{title:`添加连接`,body:`选择您的数据库,以合适的默认值打开连接表单。`},sample:{title:`手边没有数据库?试试示例`,body:`将一个示例网店数据库(24 张表、约 5 万行、视图和触发器)加载到浏览器中,体验编辑器、数据网格和架构树。`,loading:`正在加载示例…`,button:`试用示例数据库`}},terms:{title:`开始之前`,local:`一切都在本地运行:凭据、查询和结果只保留在您的计算机上,绝不会发送给我们。`,asIs:`Planche 按“原样”提供,不作任何保证。安全措施(危险操作确认、只读模式)只是便利功能,并非保证。`,dataLoss:`通过 Planche 执行的每条语句均由您自行负责。执行任何破坏性操作前请先备份数据。`,agree:`我已阅读并同意使用条款。`,accepted:`您已接受使用条款。`,readFull:`阅读完整条款`}},u={treeLabel:`架构`,unreachableHint:`不是此连接绑定的数据库;请为其创建一个配置文件以进行浏览`,objectType:{table:`表`,view:`视图`,procedure:`存储过程`,function:`函数`,trigger:`触发器`,event:`事件`},menu:{showCreate:`显示{{type}}的 CREATE 语句`,alter:`修改{{type}}`,drop:`删除{{type}}`,create:`创建{{type}}`,refresh:`刷新`,unreachable:`请使用绑定到此数据库的配置文件连接以进行浏览`,openDatabase:`打开数据库`,createSchema:`创建模式…`,createTable:`创建表`,dropDatabase:`删除数据库`,openSchema:`打开架构`,dropSchema:`删除架构`,newQueryTab:`新建查询标签`,generateSql:`生成 SQL`,openTable:`打开表`,alterTable:`修改表`,showCreateTable:`显示表的 CREATE 语句`,duplicateStructure:`复制结构`,copyTable:`复制表到其他位置…`,compare:`比较{{type}}…`,truncateTable:`清空表`,dropTable:`删除表`,exportCsv:`导出为 CSV`,exportTsv:`导出为 TSV…`,openView:`打开视图`,alterView:`修改视图`,showCreateView:`显示视图的 CREATE 语句`,dropView:`删除视图`,compareData:`比较数据…`,groupBy:`分组统计…`},actions:{createStatementUnavailable:`-- 无法获取{{type}} {{name}} 的 CREATE 语句`,getCreateFailed:`获取 CREATE {{type}} 失败:{{message}}`,createTabTitle:`创建{{type}}`,createSchemaTabTitle:`创建架构`,generateSqlFailed:`无法生成 SQL:{{message}}`,dropTableTitle:`删除表“{{name}}”?`,dropTableDescription:`这将永久删除{{from}}该表及其所有行。此操作无法撤销。`,dropTableConfirm:`删除表`,dropObjectTitle:`删除{{type}}“{{name}}”?`,dropObjectDescription:`该{{type}}的定义将被{{from}}移除。此操作无法撤销。`,dropObjectConfirm:`删除{{type}}`,fromDatabase:`从数据库“{{database}}”`,dropped:`已删除{{type}} {{name}}`,dropFailed:`删除{{type}}失败`,dropDatabaseTitle:`删除数据库“{{name}}”?`,dropDatabaseDescription:`这将永久删除该数据库及其所有表和数据。此操作无法撤销。`,dropDatabaseConfirm:`删除数据库`,droppedDatabase:`已删除数据库 {{name}}`,dropDatabaseFailed:`删除数据库失败`,dropSchemaTitle:`删除架构“{{name}}”?`,dropSchemaDescription:`这将永久删除该架构及其所有表和数据。此操作无法撤销。`,dropSchemaConfirm:`删除架构`,droppedSchema:`已删除架构 {{name}}`,dropSchemaFailed:`删除架构失败`,truncateTitle:`清空表“{{name}}”?`,truncateDescription:`“{{name}}”中的所有行都将被删除。表结构将保留。此操作无法撤销。`,truncateConfirm:`清空表`,truncated:`已清空 {{name}}`,truncateFailed:`清空失败`},tree:{loadDatabasesFailed:`加载数据库失败:{{message}}`}},d={editor:{destructiveMarker:`破坏性操作:{{action}} {{names}}`,readOnlyMarker:`连接为只读;此语句会修改数据或架构`,actionExecute:`执行(按设置)`,actionExecuteStatement:`执行光标处 / 选中的语句`,actionExecuteScript:`执行整个脚本`,actionExplainPlan:`查看执行计划`,actionQueryStructure:`查询结构`},tabs:{newQuery:`新建查询`,queryTitle:`查询 {{n}}`,erdViewer:`ERD 查看器`,close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧标签页`,closeRight:`关闭右侧标签页`,closeAll:`全部关闭`},executor:{noActiveConnection:`没有活动连接`,uncommittedTitle:`未提交的事务`,uncommittedDescription:`此连接有一个打开的事务。断开连接将回滚其更改。`,uncommittedConfirm:`回滚并断开连接`,unsavedTitle:`未保存的更改`,unsavedDescription:`{{file}} 有尚未保存到文件的更改。断开连接将丢弃这些更改(请先使用“连接 > 保存数据库文件”保留它们)。`,theSqliteDatabase:`该 SQLite 数据库`,unsavedConfirm:`丢弃并断开连接`}},f=JSON.parse('{"tabs":{"message":"消息","info":"信息","history":"历史记录","result":"结果","resultN":"结果 {{n}}","plan":"执行计划","structure":"结构","structureN":"结构 {{n}}"},"message":{"executing":"正在执行查询...","error":"错误:{{message}}","total":"(总计:{{ms}}ms)","ready":"就绪。","log":"执行日志","statementN":"语句 {{n}}","limitedBadge":"已达上限","insertId":"insert id {{id}}","failed":"失败","failedStatement":"失败的语句","summary":"成功 {{ok}} · 失败 {{failed}} · 共 {{ms}}","copy":"复制","copied":"已复制","showSql":"显示 SQL","hideSql":"隐藏 SQL"},"hints":{"title":"提示","unknownColumn":"没有名为 {{name}} 的列。是否想用 {{suggestions}}?","unknownTable":"没有名为 {{name}} 的表。是否想用 {{suggestions}}?","syntaxSwap":"{{engine}} 使用 {{expected}},而不是 {{found}}。","doubleQuotedLiteral":"{{engine}} 把 \\"{{value}}\\" 当作列名而不是文本。字符串请写成 \'{{value}}\'。"},"ai":{"title":"AI 解释","explain":"用 AI 解释","thinking":"正在读取失败信息…","by":"{{model}}","applyFix":"在新标签页中打开修正语句","failed":"无法解释: {{message}}","noFailure":"没有可解释的失败语句。","noPack":"无法从 planche.dev 获取提示词。","badShape":"模型没有按预期格式作答。","noPlan":"还没有可解释的执行计划。","explainPlan":"解释这个执行计划"},"info":{"empty":"没有可用的查询信息。","resultN":"结果 {{n}}","metadata":"查询元数据","executionTime":"执行时间","notAvailable":"不适用","affectedRows":"受影响的行数","fields":"字段","fieldDetails":"字段详情","colName":"名称","colType":"类型","colTable":"表","resultSets":"结果集","rowsReturned":"返回行数","insertId":"最后插入 ID","lastQuery":"最后执行的语句","copy":"复制","copied":"已复制","colOrigin":"原始名称","primaryKey":"主键","rowsAndFields":"{{rows}} 行 × {{fields}} 列","noFields":"此语句未返回任何列。"},"rowForm":{"colColumn":"列","colValue":"值","insertTitle":"插入行","editTitle":"编辑行","loading":"正在加载列信息...","preview":"将执行的语句","nothingToWrite":"没有要写入的内容","insert":"插入","update":"更新","stageInsert":"添加为待提交行","stageEdit":"应用到网格","stageHint":"不执行,仅把值放入网格,稍后与其他修改一起提交。","inserted":"已向 {{table}} 插入一行","updated":"已更新 {{table}} 中的一行","confirmInsertTitle":"向 {{table}} 插入一行?","confirmUpdateTitle":"更新 {{table}} 中的一行?","inTransaction":"在已打开的事务中执行","pickDate":"选择日期","now":"当前时间","formatJson":"格式化","binaryUnsupported":"二进制列无法在此编辑;请保留 NULL/DEFAULT 或用 SQL 设置。","generateUuid":"生成 UUID","defaultValue":"默认值","clickToChange":"点击修改","empty":"(空)","autoHint":"由服务器自动生成","mode":{"keep":"保留","auto":"自动","value":"值"},"invalid":{"integer":"请输入整数","unsigned":"此列不接受负数","number":"请输入数字","json":"无效的 JSON","date":"请使用 YYYY-MM-DD","datetime":"请使用 YYYY-MM-DD HH:MM:SS","time":"请使用 HH:MM:SS","length":"最多 {{max}} 个字符"}},"history":{"copied":"已复制到剪贴板","searchPlaceholder":"搜索历史...","all":"全部","success":"成功","failed":"失败","thisTab":"仅当前标签","noMatch":"没有匹配的记录。","count":"{{count}} 条","clear":"清除","clearTitle":"清除查询历史?","clearDescription":"将删除此连接的全部 {{count}} 条记录。此操作无法撤销。","clearConfirm":"清除历史","insert":"插入编辑器","inserted":"已插入编辑器","copy":"复制","rows":"{{count}} 行","affected":"影响 {{count}} 行","today":"今天","yesterday":"昨天","empty":"没有查询历史记录。"},"json":{"arrayLength":"Array[{{count}}]","keys_other":"{{count}} 个键","invalid":"无效的 JSON","clickToView":"点击查看 JSON","expandAll":"全部展开","collapseAll":"全部折叠","edit":"编辑","view":"查看","copied":"已复制","copy":"复制","shortcutHint":"{{mod}}+Enter 保存 · Esc 取消","cancel":"取消","save":"保存"},"text":{"clickToView":"点击查看文本","size":"{{chars}} 字符 · {{lines}} 行","wrap":"自动换行"},"grid":{"readOnlyConnection":"只读连接","readOnlyWal":"只读:未加载 -wal 文件","readOnlyNoPk":"只读:表没有主键","commitTitle":"将 {{count}} 处更改提交到 {{table}}?","commitDescription":"将执行以下语句。","commitConfirm":"提交","rowPrefix":"第 {{row}} 行:","cancelled":"已取消","commitFailed":"提交失败:{{message}}","executedInTransaction":"已在打开的事务中执行 {{count}} 处更改 — 请在工具栏中点击“提交”使其永久生效(重新加载会回滚这些更改)","committed":"已将 {{count}} 处更改提交到 {{table}}","noData":"没有可显示的数据。","commit":"提交","discard":"放弃","addRow":"添加行","removeNewRow":"取消此新行","addRowForm":"用表单添加","addRowFormHint":"打开每列一个输入框的表单(以 INSERT 提交)","editRowForm":"用表单编辑此行","addRowHint":"添加新行(以 INSERT 提交)","delete":"删除","deleteCount":"删除({{count}})","deleteHint":"删除选中的行(以 DELETE 提交)。请通过行号列选择行。","field":"字段","searchPlaceholder":"搜索...","orderBy":"排序依据","none":"无","refresh":"刷新","dismiss":"关闭","clearSelection":"清除选择","columns":"列","showAllColumns":"全部显示","hideAllColumns":"全部隐藏","resetWidths":"重置列宽","selectAll":"选择所有行","emptyTable":"此表没有行。","noRows":"未返回任何行。","addARow":"添加一行","markedForDeletion":"已标记为删除 — 点击恢复","newRow":"新行","clickToSelect":"点击选择;按住 Shift/Ctrl 可多选","rows":"行数:{{count}}","rowsWithNew":"行数:{{count}}(+{{added}})","sortedBy":"排序:{{column}} {{direction}}","pageRange":"第 {{from}}–{{to}} 行","firstPage":"第一页","prevPage":"上一页","nextPage":"下一页","lastPage":"最后一页","pagingBlocked":"翻页前请提交或放弃更改","selected":"已选择 {{count}} 项","cellsModified":"已修改 {{count}} 个单元格","newCount":"新增 {{count}}","toDelete":"待删除 {{count}}","searchMode":"匹配方式","contains":"包含","equals":"等于","followLink":"打开 {{table}},其中 {{column}} = 值","linkColumn":"将“{{column}}”链接到其他表…","editLink":"编辑“{{column}}”的链接…","removeLink":"移除链接","copyValue":"复制值","filterByValue":"筛选:{{column}} = 此值","clearFilter":"清除筛选","copyColumnName":"复制列名","editCell":"编辑单元格","setNull":"设为 NULL","setEmpty":"设为空字符串","restoreRow":"恢复行","hideColumn":"隐藏列“{{column}}”","copyRowsTsv_other":"复制 {{count}} 行为 TSV(含表头)","copyRowsCsv_other":"复制 {{count}} 行为 CSV","copyRowsJson_other":"复制 {{count}} 行为 JSON","copyRowsInsert_other":"复制 {{count}} 行为 INSERT 语句","deleteRowsPending_other":"删除 {{count}} 行(提交前挂起)","sendRowsToScratchpad_other":"将 {{count}} 行发送到草稿板","sendAllToScratchpad":"将已加载的全部 {{count}} 行发送到草稿板","sentToScratchpad":"已将 {{count}} 行复制到草稿板表 {{table}}。","changesSince":"自上次加载:更改 {{changed}} · 新增 {{added}} · 消失 {{gone}}","changesToggle":"切换高亮显示自上次加载以来的变化","changesDismiss":"清除这些变化","previousValue":"之前的值:{{value}}","groupByValue":"按 {{column}} 分组统计"},"link":{"title":"将列链接到其他表","source":"列","hint":"该列的值将变成链接:点击后会打开目标表并筛选出匹配的行。真实的外键会自动链接。","targetDatabase":"目标数据库","targetTable":"目标表","targetColumn":"目标列","pickTable":"选择表","pickColumn":"选择列","remove":"移除链接","cancel":"取消","save":"保存链接","targetConnection":"目标连接","targetNotConnected":"链接的连接未打开。请先连接。"},"running":{"label":"正在查询…","elapsed":"{{seconds}} 秒","stop":"停止","stopping":"正在停止…","cannotCancel":"该引擎无法中断正在执行的语句。","agentOutdated":"本地代理版本过旧,无法停止查询。请用 `npx planche@latest`(或 `planche upgrade`)更新后重新连接。","cancelFailed":"无法连接到代理,查询未能停止。","abandoned":"已停止等待该请求。此引擎没有自带的取消功能,查询可能仍会在服务端执行完毕。"},"plan":{"empty":"运行\\"查看执行计划\\"(Ctrl+Shift+E)即可看到引擎将如何执行光标处的语句。","unreadable":"无法将计划解析为树形结构,直接显示引擎原始输出。","estimated":"估算值","analyzed":"实测值","estimatedHint":"优化器的估算值,语句并未执行。","analyzedHint":"语句已实际执行,行数与耗时为实测值。","totalCost":"最高节点成本","totalTime":"最慢节点","rows":"估算行数","actualRows":"实际行数","cost":"成本","time":"耗时","showRaw":"原始输出","showTree":"计划树","selectNode":"选择一个节点即可查看引擎对它的报告。","noDetails":"引擎没有报告该节点的其他信息。","warnings":{"fullScan":"全表扫描","noIndex":"无索引","estimateOff":"估算偏差","temporary":"临时表","filesort":"排序"},"hints":{"fullScan":"会读取表中的每一行。为过滤列建立索引即可避免。","noIndex":"引擎未找到可用于此次访问的索引。","estimateOff":"优化器估算的行数偏差很大,刷新表统计信息通常可以改善计划。","temporary":"进入下一步之前,行会被写入临时表。","filesort":"在索引之外进行排序。与 ORDER BY 匹配的索引可以省去这次排序。"}},"structure":{"empty":"运行\\"查询结构\\"(Ctrl+Shift+G) 可查看光标处语句的行来自何处。","notQuery":"只有 SELECT 语句才有结构图。","unsupported":"{{engine}} 语句无法解析为结构图。","parseError":"无法解析该语句:{{message}}","columns_other":"{{count}} 列","columnsUnknown":"列数未知","fit":"适应窗口","reveal":"在编辑器中选中","notDrawn":"未绘制:{{what}}","kindTable":"表","kindCte":"CTE","kindCteRef":"引用","kindDerived":"子查询","kindScalar":"标量","kindSetop":"集合","kindResult":"结果","fullscreen":"全屏","exitFullscreen":"退出全屏"}}'),p={defaultDescription:`此操作无法撤销。`,typeToConfirm:`输入 <name/> 以确认`,cancel:`取消`,confirm:`确认`,ok:`确定`},m={dialog:{createTitle:`创建表`,alterTitle:`修改表`,duplicateTitle:`复制表结构`,create:`创建`,alter:`修改`,cancel:`取消`,tableName:`表名`,tableNamePlaceholder:`输入表名...`,loading:`正在加载表架构...`,tabSchema:`架构`,tabIndexes:`索引`,tabProperties:`属性`,applying:`正在应用…`,cannotAlterColumns:`{{engine}} 无法修改已存在的列的定义({{columns}})。添加、删除、重命名列以及修改索引均可用;如需更改列定义,请重建表。`},schema:{colField:`字段名`,colType:`数据类型`,colLength:`长度`,colDefault:`默认值`,colPk:`主键`,colNotNull:`非空`,colUnsigned:`无符号`,colAutoIncrement:`自增`,colZerofill:`零填充`,colComment:`注释`,empty:`未定义任何列。点击“添加列”添加一列。`,add:`添加列`,remove:`移除列`},indexes:{colName:`索引名`,colType:`索引类型`,colColumns:`列`,empty:`未定义任何索引。点击“添加索引”添加一个。`,add:`添加索引`,remove:`移除索引`},index:{addTitle:`添加索引`,editTitle:`编辑索引`,name:`索引名`,namePlaceholder:`输入索引名`,type:`索引类型`,columns:`列`,noColumns:`没有可用的列。请先在“架构”标签页中定义列。`,unnamed:`(未命名)`,cancel:`取消`,ok:`确定`},properties:{engine:`引擎`,charset:`字符集`,collation:`排序规则`,autoIncrement:`自增值`,autoIncrementPlaceholder:`默认`,comment:`注释`},info:{engine:`引擎`,version:`版本`,rowFormat:`行格式`,rows:`行数`,avgRowLength:`平均行长度`,dataLength:`数据长度`,createTime:`创建时间`,updateTime:`更新时间`,collation:`排序规则`,comment:`注释`},copy:{title:`复制表`,source:`源`,targetConnection:`目标连接`,targetDatabase:`目标数据库`,targetTable:`目标表名`,what:`复制内容`,structureAndData:`结构和数据`,structureOnly:`仅结构`,ifExists:`目标表已存在时`,abort:`中止(默认)`,dropAndRecreate:`删除并重建(需重新输入名称确认)`,preview:`在目标上执行的 CREATE TABLE(可编辑)`,crossEngineHint:`目标是 {{engine}}:请检查下方的类型,MySQL 专有属性已被移除。`,readOnly:`只读`,loading:`加载中…`,progressCreate:`正在创建表…`,progressCount:`正在统计行数…`,progressRows:`已复制 {{copied}} / {{total}} 行`,progressDone:`完成`,doneTitle:`表已复制`,doneRows:`已将 {{count}} 行复制到 {{table}}。`,doneStructure:`已创建 {{table}} 的结构。`,noColumns:`源表没有列。`,exists:`目标中已存在表 {{table}}。请换一个名称或选择“删除并重建”。`,dropTitle:`删除现有表 {{table}}?`,dropDescription:`复制前将删除目标表及其全部行。此操作无法撤销。`,dropConfirm:`删除并复制`,cancelled:`复制已取消。`,stop:`停止`,cancel:`取消`,copy:`复制`}},h={copy:{title:`复制数据库`,source:`源数据库`,target:`目标数据库名`,targetPlaceholder:`输入目标数据库名`,options:`选项`,structureAndData:`结构和数据`,structureOnly:`仅结构`,cancel:`取消`,copy:`复制`,creating:`正在创建 {{database}}…`,copying:`正在复制 {{table}}({{index}}/{{total}})…`},diff:{title:`比较架构`,source:`源`,target:`目标`,pickConnection:`连接`,pickDatabase:`数据库`,crossEngineHint:`引擎不同:类型名称因方言而异,大多数列会显示为类型变更。`,sameSide:`源和目标是同一个数据库。`,summary:`已更改 {{changed}},目标缺少 {{missingTarget}},仅目标有 {{missingSource}},相同 {{identical}}`,showIdentical:`显示相同的表`,identicalAll:`表完全相同。`,column:`列`,index:`索引`,object:`对象`,selectTable:`选择一个表以查看差异。`,missingInTarget:`目标中不存在 {{table}};脚本将创建它。`,missingInSource:`{{table}} 仅存在于目标中;脚本将删除它(除非包含 DROP,否则为注释)。`,includeDrops:`将 DROP 语句作为可执行 SQL 包含(默认:注释掉)`,tabTitle:`同步 {{database}}`,close:`关闭`,compare:`比较`,comparing:`比较中…`,openScript:`在编辑器中打开脚本`,noDefinition:`无法获取 CREATE 语句`},create:{title:`创建数据库`,name:`数据库名`,namePlaceholder:`输入数据库名`,charset:`字符集`,collation:`排序规则`,cancel:`取消`,create:`创建`},csv:{title:`下载为 {{format}}`,target:`目标`,targetQueryResult:`当前查询结果`,targetTableData:`表数据`,tableName:`表名`,tableNamePlaceholder:`输入表名`,delimiter:`分隔符`,delimiterComma:`逗号 (,)`,delimiterTab:`制表符 (\\t)`,delimiterSemicolon:`分号 (;)`,delimiterPipe:`竖线 (|)`,includeHeaders:`包含表头`,cancel:`取消`,download:`下载`,downloading:`正在下载...`,progress:`已写入 {{loaded}} / {{total}} 行`,progressUnknown:`已写入 {{loaded}} 行`,stop:`停止`,done:`已将 {{table}} 的 {{count}} 行导出为 {{format}}。`,database:`数据库`,databasePlaceholder:`选择数据库`},html:{title:`架构导出为 HTML`,database:`数据库`,selectDatabase:`选择数据库`,tables:`要包含的表`,selectAll:`全选`,deselectAll:`全不选`,noTables:`没有可用的表。`,include:`包含`,includeColumns:`列`,includeIndexes:`索引`,includeProperties:`属性`,cancel:`取消`,generate:`生成`,generating:`正在生成...`,sectionColumns:`列`,sectionIndexes:`索引`,sectionProperties:`属性`,docTitle:`架构:{{database}}`,heading:`数据库:{{database}}`,summary:`表数:{{count}} | 生成时间:{{date}}`,footer:`由 Planche 2026 生成`},dataDiff:{title:`比较数据`,pickTable:`表`,hint:`按源表主键匹配行,并以文本形式比较值。每侧最多加载 {{cap}} 行;大表请先用筛选缩小范围。`,sameSide:`源和目标是同一张表。`,noPrimaryKey:`{{table}} 没有主键,无法匹配行。`,keyMissingInTarget:`目标表缺少键列:{{columns}}`,summary:`键:{{key}} — 目标缺少 {{added}},不同 {{changed}},仅目标有 {{removed}},相同 {{identical}}`,capped:`两侧都只比较了前 {{cap}} 行。`,ignoredColumns:`忽略的列(仅一侧存在):{{columns}}`,added_other:`目标缺少 {{count}}`,changed_other:`不同 {{count}}`,removed_other:`仅目标有 {{count}}`,none:`此分组中没有内容。`,more:`… 还有 {{count}} 条未列出`,includeDeletes:`将 DELETE 语句作为可执行 SQL 包含(默认:注释掉)`,tabTitle:`同步数据 {{table}}`,loading:`正在加载行——源:{{source}},目标:{{target}}`},schema:{createTitle:`创建模式`,name:`模式名称`,namePlaceholder:`输入模式名称`,create:`创建`,cancel:`取消`},groupBy:{title:`分组统计`,description:`按所选列对 {{table}} 的行进行分组计数。`,columns:`分组列`,aggregate:`附加聚合`,countOnly:`仅计数`,column:`列`,minCount:`每组最少行数`,useFilter:`应用网格当前的筛选`,noIndexWarning:`所选列都不是索引的首列,数据库需要读取并排序整张表。在大表上可能会很慢。`,preview:`查询`,pickColumn:`请至少选择一个分组列。`,openInTab:`在新标签页中打开`,run:`运行`,tabTitle:`{{table}} 分组统计`,indexed:`索引首列`,connection:`连接`,database:`数据库`,table:`表`}},g={manager:{title:`用户管理`,addUser:`添加用户`,removeUser:`移除用户`,noUsers:`未加载用户`,grantScope:`授权范围`,apply:`应用`,close:`关闭`,removed:`用户 '{{user}}'@'{{host}}' 已移除`,selectUserFirst:`请先选择一个用户`,applied:`更改已成功应用`,noChanges:`没有需要应用的权限更改。`},add:{title:`添加用户`,username:`用户名`,usernamePlaceholder:`输入用户名`,host:`主机`,password:`密码`,passwordPlaceholder:`输入密码`,confirmPassword:`确认密码`,confirmPasswordPlaceholder:`再次输入密码`,plugin:`插件`,cancel:`取消`,add:`添加`,usernameRequired:`用户名为必填项`,passwordMismatch:`两次输入的密码不一致`,added:`用户 '{{user}}'@'{{host}}' 已添加`},privileges:{globalTitle:`全局权限`,databaseTitle:`数据库权限`,tableTitle:`表权限`,checkAll:`全选`,uncheckAll:`全不选`,categoryData:`数据`,categoryStructure:`结构`,categoryAdministration:`管理`},grantTree:{globalPrivileges:`全局权限`}},_={close:`关闭`,noActiveConnection:`没有活动连接`,variableName:`变量名`,value:`值`,scope:{session:`会话`,global:`全局`},findReplace:{findPlaceholder:`查找`,replacePlaceholder:`替换`,found:`找到 {{count}} 处`,noResults:`无结果`,previous:`上一个`,next:`下一个`,close:`关闭`,replace:`替换`,all:`全部`,caseSensitive:`区分大小写`,regex:`正则表达式`,wholeWord:`全字匹配`},flush:{title:`Flush`,executed:`已执行:{{command}}`,executeError:`执行 {{command}} 时出错:{{message}}`},localHistory:{title:`本地历史`,description:`此连接的编辑器文本版本:运行时、停止输入后以及关闭标签页时保存。`,empty:`尚未记录任何版本。`,noMatch:`没有与搜索匹配的版本。`,notPersisted:`设置 > 安全 中的“重新加载后保留查询历史”已关闭,版本仅在本次会话中保留。`,searchPlaceholder:`搜索版本`,scopeTab:`当前标签页`,scopeAll:`所有标签页`,compareCurrent:`与当前比较`,comparePrevious:`与上一版本比较`,diffAgainstCurrent:`与当前编辑器内容比较`,diffAgainstPrevious:`与 {{time}} 的版本比较`,noPrevious:`没有可比较的更早版本`,restored:`已从本地历史恢复编辑器内容`,restore:`恢复此版本`,openInNewTab:`在新标签页中打开`,openedInTab:`已在新标签页中打开该版本`,delete:`删除此版本`,clearAll:`清除历史`,chars:`{{count}} 个字符`,reason:{execute:`运行前`,edit:`编辑期间`,replaced:`覆盖前`,restore:`恢复前`,close:`关闭前`}},processList:{title:`进程列表`,refresh:`刷新`,autoRefresh:`自动刷新`,empty:`没有可显示的进程`,kill:`终止`,killProcess:`终止进程`,selectToKill:`请选择要终止的进程`,killed:`进程 {{id}} 已成功终止`,killError:`终止进程时出错:{{message}}`,loadError:`加载进程列表时出错:{{message}}`,updatedAt:`{{time}} 更新`,filterPlaceholder:`按用户、主机、数据库、SQL 筛选...`,hideIdle:`隐藏空闲`,noMatch:`没有符合筛选条件的进程`,self:`本会话`,selfHint:`这是 Planche 自身的会话`,statementOf:`#{{id}} 的语句`,noStatement:`无正在执行的语句`,copy:`复制`,copied:`已复制`,killConfirmTitle:`终止进程 {{id}}?`,killConfirmDescription:`{{user}}@{{host}} 的会话将被终止,正在执行的语句将被中止。未提交的事务将回滚。`,stats:{total:`总计`,active:`活动`,idle:`空闲`,longest:`最长运行`},columns:{id:`Id`,user:`用户`,host:`主机`,db:`db`,command:`命令`,time:`时间`,state:`状态`,info:`信息`,action:`操作`}},status:{title:`服务器状态`,filterPlaceholder:`筛选状态变量...`,empty:`没有可显示的状态变量`,loadError:`加载状态时出错:{{message}}`},variables:{title:`服务器变量`,filterPlaceholder:`筛选变量...`,empty:`没有可显示的变量`,loadError:`加载变量时出错:{{message}}`}},v={empty:{title:`打开 Prisma 架构文件(.prisma)以查看 ERD`,description:`将自动分析模型、枚举和关系`,openFile:`打开 .prisma 文件`,dropHint:`或将文件拖放到此区域`},entity:{enumBadge:`ENUM`,modelBadge:`MODEL`,columns:{value:`值`,comment:`注释`,type:`类型`,column:`列`},linkBadge:`链接`,externalTitle:`{{location}} 上的链接表(列链接,非真实外键)`,nullable:`允许 NULL 的列`},toolbar:{refresh:`刷新`,zoomIn:`放大`,zoomOut:`缩小`,resetView:`重置视图`,center:`居中`,fitAll:`适应全部`,spreadAll:`解决重叠`,resetLayout:`重置布局`,legendOneToMany:`1:N (FK)`,tables:`表:`,relations:`关系:`,columns:`列:`,fullscreen:`全屏`,exitFullscreen:`退出全屏`},viewer:{noServerConnection:`没有活动的服务器连接`,loading:`正在从 {{database}} 加载架构...`,loadFailed:`加载 ERD 失败`,noDatabase:`未选择数据库。`,selectDatabaseHint:`请在架构树中选择一个数据库,然后打开“查看 ERD”。`}},y={runAnyway:`仍然运行`,query:{rowsReturned:`返回 {{count}} 行`,rowsAffected:`影响 {{count}} 行`,rowsReturnedLimited:`返回 {{count}} 行(已限制为 {{limit}} 行;添加 LIMIT 以获取更多)`,notConnected:`未连接`,fileNotOpen:`SQLite 文件尚未打开 — 请点击上方的“重新打开文件”再次授权访问。`,failed:`查询失败`,nothingToExecute:`没有可执行的内容`,dryRunMismatch:`试运行预计 {{predicted}} 行,实际更改了 {{actual}} 行。预览之后数据可能已发生变化;如果没有,则说明预览与该语句不匹配。`},destructive:{title_other:`运行 {{count}} 条破坏性语句?`,description:`以下操作将永久修改或删除数据。此操作无法撤销。`,unknownTarget:`(未知)`,deleteAll:`DELETE {{target}} 中的所有行`,updateAll:`UPDATE {{target}} 中的所有行`,alterDrop:`对 {{target}} 执行 DROP COLUMN/PARTITION`},readOnly:{refused:`连接“{{label}}”为只读。有 {{count}} 条语句会修改数据或架构。`,title:`“{{label}}”为只读`,description:`这些语句会修改数据或架构。仍要在此连接上运行吗?`},transaction:{startFailed:`无法启动事务`,started:`事务已启动 — 完成后请提交或回滚`,implicitCommit:`{{kind}} 导致当前打开的事务被隐式 COMMIT`,committed:`事务已提交`,rolledBack:`事务已回滚`,commandFailed:`{{name}} 失败`,commandFailedWith:`{{name}} 失败:{{message}}`},save:{notBrowserSqlite:`不是浏览器 SQLite 连接。`,inMemory:`内存数据库:只能导出为下载文件。`,noFileSystemAccess:`此浏览器不支持 File System Access API(仅 Chrome/Edge 支持):数据库将导出为下载文件,而不是就地写入。`,noWritableHandle:`文件打开时没有可写句柄:将导出为下载文件。`},agent:{devProxyUrl:`{{url}}(通过开发代理)`,notPlanche:`收到了响应,但它不是 Planche 代理`,unreachable:"无法在 {{url}} 访问 Planche 代理 — 请运行 `npx planche`({{message}})",httpError:`HTTP 错误:{{status}} {{statusText}}`,emptyResponse:`隧道服务器返回了空响应`,reconnected:`已重新连接到 {{name}} — 代理曾断开该连接(重启或空闲超时)。`},sample:{profileName:`示例商店(浏览器内)`,downloadFailed:`无法下载示例数据库({{status}})`,tabTitle:`查询 1`},sqliteFile:{tooSmall:`文件太小,不是 SQLite 数据库。`,notSqlite:`不是 SQLite 数据库(或已加密,例如 SQLCipher)。其 16 字节文件头不是“SQLite format 3”。`,badPageSize:`SQLite 文件头损坏:无效的页大小 {{size}}。`,unreadable:`SQLite 无法读取该文件:{{message}}`,pickerDescription:`SQLite 数据库`,walNotLoaded:`此数据库处于 WAL 模式,且其 -wal 文件尚未加载。请先加载它,或在横幅中确认不存在 -wal 文件,然后再保存。`,changedOnDisk:`{{name}} 在加载后于磁盘上被修改(另一个程序写入了它)。保存会覆盖这些更改 — 请重新打开文件并重做您的编辑,或改用隧道服务器。`,walHasChanges:`{{name}}-wal 包含新的更改;请在保存前加载它。`,walChangedOnDisk:`{{name}}-wal 在加载后被另一个程序写入;请在保存前重新打开文件。`,writeDenied:`未授予对 {{name}} 的写入权限。请在浏览器提示中允许,或改为导出为下载文件。`},environment:{none:`无`,green:`绿色(开发)`,blue:`蓝色`,yellow:`黄色(预发布)`,orange:`橙色`,red:`红色(生产)`,purple:`紫色`},scratchpad:{profileName:`草稿板`,namePromptTitle:`草稿板表名`,namePromptDescription:`草稿板中已存在名为 {{table}} 的表。请输入其他名称。`,nameTaken:`表 {{table}} 已存在。`},federated:{pulling:`正在从 {{connection}} 拉取 {{table}}…`,capped:`{{table}}:只拉取了前 {{limit}} 行。`,templateLine1:`用 "连接名".database.table 引用任意已打开连接的表;语句运行前会把它复制到此草稿板。`,templateLine2:`每个表最多 {{limit}} 行。查询本身在浏览器内的 SQLite 中运行。`,templateConnections:`已打开的连接:{{names}}`,templateNone:`尚未打开其他连接。请先连接,然后在这里引用。`,done:`已从 {{tables}} 个远程表拉取 {{rows}} 行到草稿板。`,pullingProgress:`正在从 {{connection}} 拉取 {{table}}:{{loaded}} / {{total}} 行…`},paged:{noColumns:`{{table}} 没有列。`,cancelled:`已取消。`}},b={title:`使用条款`,version:`版本 {{version}}`,englishOnly:`条款全文以英文提供。欢迎页面上的摘要以您的语言显示。`,privacyLink:`隐私政策`,refundLink:`退款政策`,online:`在 planche.dev 上阅读`,updated:`最后更新 {{date}}`},x={title:`{{kind}} 将影响 {{count}} 行`,titleUnknown:`{{kind}} — 受影响行数未知`,description:`这是该语句此刻会触及的行,用 SELECT 预先读取。尚未写入任何内容。`,previewFailed:`预览查询失败:{{error}}
2
+ 你仍然可以运行该语句。`,noRows:`没有匹配的行——该语句不会改变任何内容。`,truncated:`显示 {{count}} 行中的前 {{shown}} 行。`,previewQuery:`预览查询`,run:`运行 {{kind}}({{count}} 行)`,runAnyway:`仍然运行`},S={badge:`PRO`,tooltip:`需要 Pro 许可证。`,noticeTitle:`Pro 功能`,notice:`标有 PRO 的功能需要 Pro 许可证。`,licenseTitle:`Planche Pro`,licenseDescription:`粘贴购买邮件中的许可证密钥。校验在本机完成,不会发送到任何地方。`,blocked:`{{feature}}需要 Pro 许可证。`,keyLabel:`许可证密钥`,activate:`激活`,remove:`移除许可证`,active:`Pro 已激活。`,licensedTo:`授权给 {{email}}`,validUntil:`有效期至 {{date}}`,expiredOn:`此许可证已于 {{date}} 到期。续订后可继续使用 Pro 功能。`,invalidKey:`这不是 Planche 的许可证密钥。`,notConfigured:`此版本无法校验许可证密钥,请反馈给我们。`,noWebcrypto:`此浏览器无法校验许可证密钥。`,pricing:`查看价格`,features:{ssh_tunnel:`SSH 隧道`,compare_schemas:`架构比较`,compare_data:`数据比较`,copy_table:`复制表`,dry_run:`试运行`,federated:`联邦查询`,scratchpad:`草稿库`,column_link:`列链接`,sync:`连接同步`,ai_explain:`AI 解释`},included:`Pro 包含的功能`,haveKey:`已经有许可证密钥了?`,perMonth:`/ 月`,priceNote:`每年一次性收取 {{annual}}。按月付费为 {{monthly}}。`,featureDetails:{sync:`在浏览器中加密后,在你的所有电脑上使用同一套配置`,ssh_tunnel:`通过密码、密钥或 ssh-agent 连接跳板机后的数据库`,compare_schemas:`比较两个已打开的连接并生成 ALTER 脚本`,compare_data:`比较两张表的行并生成 INSERT、UPDATE 脚本`,copy_table:`在另一个连接、甚至另一种数据库上重建表`,dry_run:`执行前查看 UPDATE、DELETE 会改动多少行以及哪些行`,federated:`连接不同数据库连接中的表`,scratchpad:`存放工作数据的本地 SQLite 数据库`,column_link:`可在网格中跳转的虚拟外键`,ai_explain:`让模型解释语句为何失败、计划为何缓慢 — 并附上你的表结构`}},C={npxNote:`需要 Node.js 22 或更高版本。不会永久安装任何东西 —— npx 直接从 npm 仓库运行代理。`,installNote:`不需要 Node.js。它只安装在你的主目录中,无需管理员权限;之后用 planche 命令随时启动。`},w={unsupported:`{{engine}} 不提供执行计划。`,oneStatement:`执行计划一次只分析一条语句。请把光标放在目标语句上,或选中它。`},T={title:`AI 助手`,intro:`让它写查询,或直接下指令 —— 它会读取结构、在标签页里写 SQL 并执行。它只作用于你当前打开的连接,每个连接各有各的对话。`,privacy:`工具读取到的内容(包括示例行)会发送给你配置的 provider。不会有任何内容发往 planche.dev。`,placeholder:`例如:在演示数据库上做一个按月营收的查询`,send:`发送`,stop:`停止`,clear:`新会话`,working:`执行中…`,tabTitle:`AI 查询`,approvalTitle:`这一步会写入。要执行吗?`,approve:`执行`,reject:`跳过`,rejected:`用户拒绝执行。`,notConfigured:`代理上没有配置 AI 密钥。请在 设置 ▸ AI 中添加。`,needsAgent:`该本地代理还不支持工具调用。请更新后重新配对。`,failed:`失败`,empty:`还没有提问。`,steps:`{{count}} 步`,tooManySteps:`已进行 {{count}} 步仍未得出答案。`,collapse:`收起`,planWarningTitle:`这个查询会全表扫描。仍要执行吗?`,interrupted:`因刷新而中断。`,external:`来自 Planche 之外的请求`},E={title:`连接 AI 代理 (MCP)`,description:`让支持 MCP 的 AI 代理使用 Planche 的工具。`,readsLabel:`读取`,reads:`它会读取打开的数据库,结果发给那个程序。`,writesLabel:`写入`,writes:`写入数据的语句需要你确认。DROP 和 TRUNCATE 无法执行。`,needsLabel:`前提`,needs:`AI 面板必须打开。`,tokenLabel:`令牌`,token:`一个令牌,给出去的程序共用。吊销后全部断开。`,command:`添加到 Claude Code`,json:`手动配置`,stored:`保存在 {{path}}。`,revoke:`吊销令牌`,revoked:`已吊销。要签发新的,请重新打开此窗口。`},D={title:`连接同步`,description:`连接配置在本浏览器中加密后保存到 planche.dev,你的其他电脑可以直接使用。`,stored:`服务端只存放一个加密数据块,无法读取你的主机、用户名、密码或 SSH 密钥。`,unavailable:`同步仅在 planche.dev 上可用。当前这份 Planche 由本地代理提供,而代理被限制不能访问外部网络。`,signIn:`使用 GitHub 登录`,signedInAs:`已登录:{{email}}`,signOut:`退出登录`,createTitle:`设置密码短语`,createHint:`这个密码短语用于加密你的配置。它不会发送到服务器,因此一旦丢失,已保存的副本将无法恢复——只能在仍有配置的电脑上重新创建。`,passphrase:`密码短语`,confirm:`确认密码短语`,mismatch:`两次输入的密码短语不一致。`,tooShort:`请至少输入 {{count}} 个字符。`,enable:`开启同步`,unlockTitle:`解锁你的配置`,unlockHint:`请输入开启同步时设置的密码短语。`,unlock:`解锁`,wrongPassphrase:`密码短语错误,或已保存的副本已损坏。`,syncNow:`立即同步`,lastSynced:`上次同步 {{when}}`,neverSynced:`尚未同步`,profiles_one:`{{count}} 个配置`,profiles_other:`{{count}} 个配置`,changePassphrase:`修改密码短语`,deleteVault:`从服务器删除`,deleteVaultConfirm:`要删除 planche.dev 上的加密副本吗?本机的配置不受影响。`,offline:`无法连接 planche.dev。`,working:`处理中…`,serverError:`planche.dev 未能完成该操作,请稍后重试。`,signInShort:`登录`,needsPro:`已登录。同步配置需要 Pro 许可证,获得后即可使用。`,deleteAccount:`删除账号`,deleteAccountConfirm:`要删除账号吗?已保存的副本和登录信息会一并删除。本机的配置不受影响。`,notDeployed:`本站点尚未启用连接同步。`},O={app:e,language:t,settings:n,menu:r,about:i,connection:a,toolbar:o,footer:s,palette:c,welcome:l,schema:u,query:d,result:f,confirm:p,table:m,database:h,user:g,command:_,erd:v,services:y,terms:b,dryRun:x,pro:S,install:C,explain:w,ai:T,mcp:E,sync:D};export{i as about,T as ai,e as app,_ as command,p as confirm,a as connection,h as database,O as default,x as dryRun,v as erd,w as explain,s as footer,C as install,t as language,E as mcp,r as menu,c as palette,S as pro,d as query,f as result,u as schema,y as services,n as settings,D as sync,m as table,b as terms,o as toolbar,g as user,l as welcome};