pivotkit-element 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +131 -1
  2. package/dist/THIRD_PARTY_LICENSES.txt +2 -2
  3. package/dist/chunks/chunk-4PHDW2LB.js +1 -0
  4. package/dist/chunks/chunk-5QXN3X2Q.js +1 -0
  5. package/dist/chunks/chunk-65G326ME.js +1 -0
  6. package/dist/chunks/chunk-65O4Z5GI.js +1 -0
  7. package/dist/chunks/chunk-CCL5TDLA.js +6 -0
  8. package/dist/chunks/chunk-NSPPM3IJ.js +16 -0
  9. package/dist/chunks/chunk-PJA6QZ4Y.js +2 -0
  10. package/dist/chunks/chunk-QOKB5RDG.js +6 -0
  11. package/dist/chunks/chunk-SB3L4HHW.js +1 -0
  12. package/dist/chunks/chunk-WKVC2RPA.js +1 -0
  13. package/dist/chunks/chunk-XETFD6GR.js +1 -0
  14. package/dist/chunks/chunk-XR4CMFGN.js +1 -0
  15. package/dist/chunks/chunk-YUY4D5MF.js +8 -0
  16. package/dist/chunks/echarts-4DC3BQOK.js +5 -0
  17. package/dist/chunks/export-YHS47KGK.js +1 -0
  18. package/dist/chunks/import-csv-UCA275TR.js +1 -0
  19. package/dist/chunks/import-json-W4GCIW36.js +1 -0
  20. package/dist/chunks/import-ui-7XVUBL2H.js +1 -0
  21. package/dist/chunks/link-45LOEA7H.js +1 -0
  22. package/dist/chunks/menu-texts-de-74DWTJDI.js +1 -0
  23. package/dist/chunks/menus-XBN5D32E.js +2 -0
  24. package/dist/chunks/report-run-BZBFOMPF-4M6ACMUF.js +60 -0
  25. package/dist/chunks/unused-texts-Y4R67XSN-VYGDYJND.js +1 -0
  26. package/dist/chunks/unused-texts-de-6YVPTNVS-FL6CDBZX.js +1 -0
  27. package/dist/element.js +1 -1
  28. package/dist/import-worker.js +1 -0
  29. package/dist/index.js +1 -1
  30. package/package.json +11 -5
  31. package/types/element.d.ts +80 -93
  32. package/types/events.d.ts +1 -0
  33. package/types/global.d.ts +3 -1
  34. package/types/jsx.d.ts +1 -1
  35. package/dist/chunks/chunk-FW54TETI.js +0 -9
  36. package/dist/chunks/chunk-J3NYMXAT.js +0 -6
  37. package/dist/chunks/chunk-MB64GADT.js +0 -1
  38. package/dist/chunks/chunk-RXM4LLDS.js +0 -1
  39. package/dist/chunks/echarts-42T6EZ6B.js +0 -18
  40. package/dist/chunks/export-GKVGFFWM.js +0 -6
  41. package/dist/chunks/link-52SWRX4P.js +0 -1
  42. package/dist/chunks/menu-texts-de-X4IUO7W5.js +0 -1
  43. package/dist/chunks/menus-SYPZC2NE.js +0 -1
  44. package/dist/chunks/unused-texts-K3VFH65P-5EAURTYC.js +0 -1
  45. package/dist/chunks/unused-texts-de-OW4TGIVX-GHETGXFE.js +0 -1
@@ -1,6 +0,0 @@
1
- import{c as oe,e as ne}from"./chunk-UTPKLCNX.js";import{B as Z,C as K,D as Q,E as L,G as ee,H as N,b as G,ca as R,e as Y,ea as te,h as q,n as J,o as W}from"./chunk-RXM4LLDS.js";import{b as d,c as _,d as A,e as P,f as S,g,l as z,q as V}from"./chunk-MB64GADT.js";import"./chunk-DCANE7XH.js";var ye=25569,$e=1048576,Ce=16384,re=32767,Te=Date.UTC(1900,0,1),ge=Date.UTC(1900,2,1),be=Date.UTC(1e4,0,1),Fe=new Set(["history"]);function M(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F￾￿]/g,"").replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"")}function E(e,t){let o="",n=e+1;for(;n>0;){let r=(n-1)%26;o=String.fromCharCode(65+r)+o,n=Math.floor((n-1)/26)}return`${o}${t+1}`}function Se(e){if(!(e>=Te&&e<be))return null;let t=e/A+ye;return e<ge?t-1:t}function se(e){return`FF${z(e).toUpperCase()}`}function Ee(e){let t=String(e??"").replace(/[\u0000-\u001F\u007F\\/?*[\]:]/g," ").replace(/^'+|'+$/g,"").trim().slice(0,31).trim();return Fe.has(t.toLowerCase())?`${t} 1`:t||"Pivot"}function ke(e){let t=new Map;for(let[n,r]of e)t.has(r)||t.set(r,[]),t.get(r).push(n);let o=[];for(let[n,r]of[...t.entries()].sort((a,i)=>a[0]-i[0])){r.sort((s,c)=>s-c);let a=r[0],i=r[0];for(let s=1;s<=r.length;s++){if(s<r.length&&r[s]===i+1){i=r[s];continue}o.push(a===i?E(n,a):`${E(n,a)}:${E(n,i)}`),s<r.length&&(a=i=r[s])}}return o.join(" ")}function X(e,t){t=g(t,"toXlsx"),d(R(e),"toXlsx(grid): grid must come from toGrid()"),_("xlsxRows",e.rows.length,$e,"rows (an Excel sheet)"),_("xlsxColumns",e.columnCount,Ce,"columns (an Excel sheet)");let o={...te,...t.theme||{}},n=e.locale,r=new Map,a=[{fmt:0,bold:!1}],i=new Map([["0|false",0]]),s=(u,p)=>{let v=0;u&&u!=="General"&&(r.has(u)||r.set(u,164+r.size),v=r.get(u));let y=`${v}|${p}`;return i.has(y)||(i.set(y,a.length),a.push({fmt:v,bold:p})),i.get(y)},c=(u,p,v)=>{let y=p.length>re?p.slice(0,re):p;return`<c r="${u}" t="inlineStr" s="${s("General",v)}"><is><t xml:space="preserve">${M(y)}</t></is></c>`},m=(u,p,v,y)=>`<c r="${u}" s="${s(v,y)}"><v>${p}</v></c>`,h=new Array(e.columnCount).fill(6),f=new Map,x=e.rows.map((u,p)=>{let v=p<e.headerRows,y=u.map((l,F)=>{if(!l)return"";let $=E(F,p),T=v||l.total>0;if((!l.colSpan||l.colSpan===1)&&(h[F]=Math.max(h[F],Math.min(60,l.text.length+2))),l.kind==="value"&&typeof l.value=="number"&&Number.isFinite(l.value)){if(l.total===0&&l.valueIndex!==void 0&&e.conditional&&e.conditional[l.valueIndex]){let C=f.get(l.valueIndex)??{cells:[],min:1/0,max:-1/0};C.cells.push([p,F]),C.min=Math.min(C.min,l.value),C.max=Math.max(C.max,l.value),f.set(l.valueIndex,C)}if(l.valueType==="date"){let C=Se(l.value);return C===null?c($,l.text,T):m($,C,N(l.format,l.value,n),T)}return m($,l.value,N(l.format,l.value,n),T)}return(l.kind==="rowHeader"||l.kind==="colHeader")&&typeof l.value=="number"&&l.text===String(l.value)?m($,l.value,"General",T):l.text===""?T?`<c r="${$}" s="${s("General",!0)}"/>`:"":c($,l.text,T)});return`<row r="${p+1}">${y.join("")}</row>`}),b=1,D=[...f.entries()].map(([u,{cells:p,min:v,max:y}])=>{let l=e.conditional[u],F;if(l.type==="colorScale"){let $=l.colors.length>=2?l.colors:o.colorScale,T=$.length===3?'<cfvo type="min"/><cfvo type="percentile" val="50"/><cfvo type="max"/>':'<cfvo type="min"/><cfvo type="max"/>';F=`<cfRule type="colorScale" priority="${b++}"><colorScale>${T}${$.map(C=>`<color rgb="${se(C)}"/>`).join("")}</colorScale></cfRule>`}else{let $=v>0?'<cfvo type="num" val="0"/>':'<cfvo type="min"/>',T=y<0?'<cfvo type="num" val="0"/>':'<cfvo type="max"/>';F=`<cfRule type="dataBar" priority="${b++}"><dataBar>${$}${T}<color rgb="${se(l.color||o.dataBar)}"/></dataBar></cfRule>`}return`<conditionalFormatting sqref="${ke(p)}">${F}</conditionalFormatting>`}),w=e.headerRows>0||e.rowHeaderColumns>0?`<pane${e.rowHeaderColumns?` xSplit="${e.rowHeaderColumns}"`:""}${e.headerRows?` ySplit="${e.headerRows}"`:""} topLeftCell="${E(e.rowHeaderColumns,e.headerRows)}" activePane="${e.rowHeaderColumns&&e.headerRows?"bottomRight":e.headerRows?"bottomLeft":"topRight"}" state="frozen"/>`:"",j=h.map((u,p)=>`<col min="${p+1}" max="${p+1}" width="${u}" customWidth="1"/>`).join(""),pe=e.merges.length?`<mergeCells count="${e.merges.length}">${e.merges.map(u=>`<mergeCell ref="${E(u.col,u.row)}:${E(u.col+u.colSpan-1,u.row+u.rowSpan-1)}"/>`).join("")}</mergeCells>`:"",k=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- `,he=`${k}<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><sheetViews><sheetView workbookViewId="0">${w}</sheetView></sheetViews>${j?`<cols>${j}</cols>`:""}<sheetData>${x.join("")}</sheetData>${pe}${D.join("")}</worksheet>`,xe=[...r.entries()].map(([u,p])=>`<numFmt numFmtId="${p}" formatCode="${M(u)}"/>`).join(""),de=`${k}<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">${r.size?`<numFmts count="${r.size}">${xe}</numFmts>`:""}<fonts count="2"><font><sz val="11"/><name val="Calibri"/></font><font><b/><sz val="11"/><name val="Calibri"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border/></borders><cellStyleXfs count="1"><xf/></cellStyleXfs><cellXfs count="${a.length}">${a.map(u=>`<xf numFmtId="${u.fmt}" fontId="${u.bold?1:0}"${u.fmt?' applyNumberFormat="1"':""}${u.bold?' applyFont="1"':""}/>`).join("")}</cellXfs><dxfs count="0"/></styleSheet>`,we=M(Ee(t.sheetName)),ve={"[Content_Types].xml":`${k}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>`,"_rels/.rels":`${k}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`,"xl/workbook.xml":`${k}<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheets><sheet name="${we}" sheetId="1" r:id="rId1"/></sheets></workbook>`,"xl/_rels/workbook.xml.rels":`${k}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`,"xl/styles.xml":de,"xl/worksheets/sheet1.xml":he},H={};for(let[u,p]of Object.entries(ve))H[u]=oe(p);return ne(H,{level:6})}var O=String.raw`[+\-\u2212]?\p{Sc}?\d[\d.,'\u2019\u00a0\u202f ]*(?:[\u00a0\u202f ]?(?:%|\p{Sc}))?`,Re=new RegExp(`^${O}$`,"u"),De=new RegExp(`^${O}\\s\u2013\\s${O}$`,"u");function _e(e){return le(e)===","?";":","}function le(e){let t=q(e).formatToParts(1.5).find(o=>o.type==="decimal");return t?t.value:"."}function me(e){if(/^[\t\r]/.test(e))return`'${e}`;let t=e.replace(/^[\s\u0000-\u001F\u007F]+/,"");return/^[=@]/.test(t)||/^[+-]/.test(t)&&!Re.test(t)&&!De.test(t)?`'${e}`:e}function ue(e){let t=new Date(e),o=`${S(t.getUTCFullYear(),4)}-${S(t.getUTCMonth()+1)}-${S(t.getUTCDate())}`;return e%A===0?o:`${o} ${S(t.getUTCHours())}:${S(t.getUTCMinutes())}:${S(t.getUTCSeconds())}`}function Ae(e,t){let o=String(Number(e.toPrecision(15)));return t==="."?o:o.replace(".",t)}function Le(e,t){let o=Math.sign(e)*Number(Math.abs(e).toFixed(t));return o===0?0:o}function Ie(e,t,o,n,r){let a=Z(t)?.name,i=a==="percent"||a==="percent100",s=n||i?K(t,r):null,c=a==="percent"?e*100:e,m=Ae(s===null?c:Le(c,s),o);return i?`${m}%`:m}function B(e,t){let o=new Map;for(let n of e.merges)for(let r=n.row;r<n.row+n.rowSpan;r++)for(let a=n.col;a<n.col+n.colSpan;a++)(r!==n.row||a!==n.col)&&o.set(`${r},${a}`,e.rows[n.row][n.col]);return e.rows.map((n,r)=>n.map((a,i)=>{if(a)return a;let s=o.get(`${r},${i}`);return t&&s&&s.kind==="rowHeader"&&s.total===0&&(s.colSpan??1)===1?s:null}))}var ce=e=>e.kind==="value"&&typeof e.value=="number"&&Number.isFinite(e.value);function ie(e,t){return t=g(t,"toCsv"),d(R(e),"toCsv(grid): grid must come from toGrid()"),I(e,t)}function I(e,t){let o=e.locale??P,n=t.separator??_e(o),r=le(o),a=s=>{let c=me(s);return/["\r\n]/.test(c)||c.includes(n)?`"${c.replace(/"/g,'""')}"`:c};return B(e,t.repeatLabels!==!1).map(s=>s.map(c=>{if(!c)return"";if(ce(c)){let m=c.valueIndex!==void 0&&!!e.showAs?.[c.valueIndex];return c.valueType==="date"?ue(c.value):Ie(c.value,c.format,r,m,o)}return a(c.text)}).join(n)).join(`\r
3
- `)+`\r
4
- `}function ae(e){let t=o=>{let n=me(String(o??""));return/["\t\r\n]/.test(n)?`"${n.replace(/"/g,'""')}"`:n};return e.map(o=>o.map(t).join(" ")).join(`\r
5
- `)+`\r
6
- `}function Ne(e){return Array.isArray(e)?(d(e.every(Array.isArray),"toTsv(rows): rows must be arrays of texts"),ae(e)):(d(R(e),"toTsv(grid): grid must come from toGrid() or be an array of rows"),ae(B(e,!0).map(t=>t.map(o=>o?o.text:""))))}function Me(e){return!e||e.value===null||e.value===void 0?null:ce(e)?e.valueType==="date"?ue(e.value):Number(e.value.toPrecision(15)):typeof e.value=="number"?null:e.value}function Xe(e,t){t=g(t,"toJson"),d(R(e),"toJson(grid): grid must come from toGrid()");let o=B(e,!0),n=e.rowHeaderColumns,r=o.slice(0,e.headerRows),a=m=>m?m.text:"",i=r[r.length-1]??[],s=r.map(m=>m.slice());for(let m of e.merges)for(let h=m.row;h<Math.min(m.row+m.rowSpan,e.headerRows);h++)for(let f=m.col;f<m.col+m.colSpan;f++)s[h][f]=e.rows[m.row][m.col];let c={rowHeaders:Array.from({length:n},(m,h)=>a(i[h]??null)),columns:e.dataColumns.map((m,h)=>{let f=n+h,x=[],b=null;for(let D of s){let w=D[f];w&&w!==b&&w.kind!=="corner"&&w.text!==""&&x.push(w.text),b=w}return{labels:x,value:m.valueIndex>=0?e.valueNames[m.valueIndex]??null:null,total:m.total}}),rows:e.bodyRows.map((m,h)=>{let f=o[e.headerRows+h];return{labels:f.slice(0,n).map(a),total:m.total,collapsed:m.collapsed,values:f.slice(n).map(Me)}})};return JSON.stringify(c,null,t.space??2)}function Oe(e,t){return t=g(t,"toCsvBytes"),new TextEncoder().encode((t.bom===!1?"":"\uFEFF")+ie(e,t))}var fe=new Set(["date","datetime","time"]);function Be(e,t){if(!e||typeof e!="object")return;if(Object.hasOwn(e,t))return e[t];let o=t.toLowerCase(),n=Object.keys(e).find(r=>r.toLowerCase()===o);return n===void 0?void 0:e[n]}function Ue(e,t,o,n){let r=t?t.split(":")[0]:null;if(e.type==="date"){let a=r&&fe.has(r)?t:e.dateOnly?"date":"datetime",i=L(a,o);return s=>({kind:"value",total:0,value:s,valueType:"date",format:a,text:i(s)})}if(e.type==="number"&&r!=="text"){let a=t&&!fe.has(r)?t:null,i=a?L(a,o):null;return s=>{let c=a??`number:${ee(s,6)}`;return{kind:"value",total:0,value:s,valueType:"number",format:c,text:i?i(s):L(c,o)(s)}}}return e.type==="boolean"?a=>({kind:"value",total:0,value:null,valueType:"text",text:a?n.true:n.false}):a=>({kind:"value",total:0,value:null,valueType:"text",text:String(a)})}function U(e,t,o,n){d(Y(e),`${n}(data, indices): data must come from encode()`),d(t!==null&&typeof t=="object"&&typeof t.length=="number",`${n}(data, indices): indices must be an array of row positions`);let r=G(o),a=V(null,o.locale),i={...J,...o.labels||{}},s=e.columns;o.columns!==void 0&&(d(Array.isArray(o.columns),`${n}: options.columns must be an array of field names`),s=o.columns.map(f=>e.column(String(f))).filter(f=>f!==void 0)),_("cells",(t.length+1)*s.length,r.cells,"rows x columns of the rows export");let c=s.map(f=>{let x=Be(o.formats,f.name);return Ue(f,typeof x=="string"&&Q(x)?x.trim().toLowerCase():null,a,i)}),h=[s.map(f=>({kind:"colHeader",total:0,value:f.name,text:W(f.name,i)}))];for(let f=0;f<t.length;f++){let x=t[f];d(Number.isInteger(x)&&x>=0&&x<e.length,`${n}: indices[${f}] is not a row of the data`),h.push(s.map((b,D)=>{let w=b.codes[x];return w<0?null:c[D](b.dict[w])}))}return{rows:h,headerRows:1,rowHeaderColumns:0,columnCount:s.length,merges:[],dataColumns:[],bodyRows:[],formats:[],showAs:[],valueNames:[],conditional:[],locale:a,timeZone:e.timeZone}}function je(e,t,o){return o=g(o,"rowsToCsv"),I(U(e,t,o,"rowsToCsv"),o)}function He(e,t,o){return o=g(o,"rowsToCsvBytes"),new TextEncoder().encode((o.bom===!1?"":"\uFEFF")+I(U(e,t,o,"rowsToCsvBytes"),o))}function Ge(e,t,o){return o=g(o,"rowsToXlsx"),X(U(e,t,o,"rowsToXlsx"),{sheetName:o.sheetName})}export{je as rowsToCsv,He as rowsToCsvBytes,Ge as rowsToXlsx,ie as toCsv,Oe as toCsvBytes,Xe as toJson,Ne as toTsv,X as toXlsx};
@@ -1 +0,0 @@
1
- import{a as m,b as w,c as b,d as y}from"./chunk-UTPKLCNX.js";import{a as p,b as d,h as f}from"./chunk-MB64GADT.js";import"./chunk-DCANE7XH.js";var h=1024;function L(r,t){let e=[],n=0,l=!1,o=!1,c=new w((i,S)=>{n+=i.length,n>t?l=!0:e.push(i),o=o||S});for(let i=0;i<r.length&&!l;i+=h)c.push(r.subarray(i,i+h),i+h>=r.length);if(l)return{bytes:null,inflated:n};if(!o)throw new Error("unexpected end of data");let u=new Uint8Array(n),g=0;for(let i of e)u.set(i,g),g+=i.length;return{bytes:u,inflated:n}}var a="1.",s=Object.freeze({text:32e3,json:1e6}),k=/^[A-Za-z0-9_-]*$/;function j(r){let t="";for(let e=0;e<r.length;e+=32768)t+=String.fromCharCode(...r.subarray(e,e+32768));return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function v(r){let t=atob(r.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-r.length%4)%4)),e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function $(r){d(f(r),"encodeViewLink(view): view must be an object");let t=JSON.stringify(r),e=(l,o,c)=>new p("LIMIT_EXCEEDED",`${l.toLocaleString("en-US")} ${c} exceed the limit of ${o.toLocaleString("en-US")} (LINK_LIMITS)`,{limit:"link",value:l,max:o});if(t.length>s.json)throw e(t.length,s.json,"characters of the view");let n=a+j(m(b(t),{level:9}));if(n.length>s.text)throw e(n.length,s.text,"characters of the link");return n}function A(r){let t=o=>({view:null,issues:[{path:"",message:o}]});if(typeof r!="string"||r.trim()==="")return t("empty link");let e=r.trim();if(e.length>s.text)return t(`link longer than ${s.text} characters`);if(!e.startsWith(a)||!k.test(e.slice(a.length)))return t("not a pivotkit view link");let n=e.slice(a.length);if(n==="")return t("the link is damaged");let l;try{let o=L(v(n),s.json);if(o.bytes===null)return t(`view larger than ${s.json} characters`);l=y(o.bytes)}catch{return t("the link is damaged")}try{let o=JSON.parse(l);return f(o)?{view:o,issues:[]}:t("not a view object")}catch{return t("not valid JSON")}}export{s as LINK_LIMITS,A as decodeViewLink,$ as encodeViewLink};
@@ -1 +0,0 @@
1
- import"./chunk-DCANE7XH.js";var e={aboutSetting:"\xDCber {setting}",settingInfo:{grandTotalRow:"Eine letzte Zeile mit der Summe jeder Spalte.",grandTotalColumn:"Eine letzte Spalte mit der Summe jeder Zeile.",rowSubtotals:"Mit zwei oder mehr Feldern in Zeilen: eine Summenzeile unter jeder Gruppe des \xE4u\xDFeren Felds.",colSubtotals:"Mit zwei oder mehr Feldern in Spalten: eine Summenspalte nach jeder Gruppe des \xE4u\xDFeren Felds.",along:"Die Richtung der Berechnung: Zeilen geht die Zeilen jeder Spalte hinunter, Spalten \xFCber die Spalten jeder Zeile. Eine laufende Summe addiert entlang, eine Differenz vergleicht mit dem Eintrag davor.",showAs:"Zeigt jeden Wert als Anteil, Differenz, laufende Summe oder Rang statt der Zahl selbst. Bei Prozenten sagt ein Tipp \xFCber dem Ergebnis, was 100 % ist.",exportXlsx:"Jede Zahl mit allen Nachkommastellen, Formate bleiben, bereit zum Rechnen.",exportCsv:"Prozente und Berechnungen wie in der Tabelle, als reiner Text.",copyTable:"Die Tabelle wie angezeigt, mit \xDCberschriften und Summen: tabulatorgetrennt, wird in Excel oder Google Sheets in Spalten eingef\xFCgt.",copyDataJson:"Die Zahlen der Tabelle mit ihren Beschriftungen als JSON, f\xFCr ein Programm. Nicht die Ansicht selbst: Das ist Ansichten \u2192 Ansicht als JSON kopieren.",drillCopy:"Die Zeilen wie im Bereich angezeigt, mit einer \xDCberschriftenzeile: tabulatorgetrennt, wird in Excel oder Google Sheets in Spalten eingef\xFCgt.",drillJson:"Die Zeilen als JSON-Objekte, mit den Feldnamen und Rohwerten der Daten, f\xFCr ein Programm.",groupLabels:"Mit zwei oder mehr Feldern in Zeilen: die Eintr\xE4ge des \xE4u\xDFeren Felds einmal unter der Achse, unter ihren Kategorien.",labelPosition:"Au\xDFen: Name und Zahl jedes Segments daneben. Innen: die Zahl auf dem Segment, die Namen in der Legende; au\xDFen, wenn der Ring eines Donuts daf\xFCr zu schmal ist.",sharedView:"Nur Admins k\xF6nnen gemeinsame Ansichten \xE4ndern.",newReport:"Nimmt alle Felder heraus, um neu anzufangen. R\xFCckg\xE4ngig holt sie zur\xFCck; gespeicherte Ansichten bleiben.",valuesFilter:"Werte werden hier nicht gefiltert: Ein Feld in Zeilen oder Spalten \xFCber sein Men\xFC filtern oder ein Feld in Filter ziehen."},back:"Zur\xFCck",backTo:"Zur\xFCck zum Men\xFC von {name}",levelTitle:"{name} \u203A {topic}",searchMenu:"Im Men\xFC von {name} suchen",searchMenuShort:"In diesem Men\xFC suchen (Taste /)",searchResults:"Treffer",searchNothing:"Nichts gefunden. Ein anderes Wort versuchen oder die Suche leeren.",sortByValue:"Nach Wert sortieren",sortOldestShort:"\xC4lteste",sortNewestShort:"Neueste",filterTopic:"Filter",filterAll:"Alle",groupTopic:"Gruppieren",groupNoneShort:"Keine",off:"Aus",moveToTitle:"Verschieben nach",topOwn:"Top N\u2026",binsOff:"Bereiche entfernen",valueConditionTitle:"Bedingung f\xFCr einen Wert",nameHint:"Gilt mit Enter oder beim Verlassen des Felds; Escape gibt den Namen zur\xFCck.",showAsKeywords:"prozent % anteil",nameKeywords:"umbenennen bezeichnung titel",filterKeywords:"werte ausw\xE4hlen regel regeln bedingung zeitraum datum",formatDecimals:{one:"Zahl, {count} Dezimalstelle",other:"Zahl, {count} Dezimalstellen"},listAnd:" und ",summaryAll:"Alle {total} {noun} gezeigt",summarySome:"{shown} der {total} {noun} gezeigt",summaryNone:"Nichts gezeigt",summaryOk:"Alle Eintr\xE4ge ausgew\xE4hlt, keine Regeln.",summaryKept:"Alle Eintr\xE4ge ausgew\xE4hlt; die Regeln behalten sie alle.",summaryQuickOnly:"Alle Eintr\xE4ge ausgew\xE4hlt; {quick}.",summaryPicks:"{count} durch deine Auswahl weggelassen",summaryQuick:"{count} au\xDFerhalb von {quick}",summaryRules:{one:"{items} durch die Regel weggelassen",other:"{items} durch die Regeln weggelassen"},summaryTotals:{one:"{items} durch die Regel zum Gesamtwert weggelassen",other:"{items} durch die Regeln zu den Gesamtwerten weggelassen"},summaryRows:"{rows} von {total} Zeilen",summaryData:"Daten {range}",yearsAll:"{years} zusammengefasst",yearsOne:"nur {year}",emptyPicks:"Nichts ist ausgew\xE4hlt.",emptyRules:"Kein Eintrag ({noun}) erf\xFCllt {rules}.",emptyTotal:"Kein Eintrag ({noun}) hat einen Gesamtwert, {rule} \u2013 {spread}.",totalSpread:"die Gesamtwerte reichen von {low} ({lowItem}) bis {high} ({highItem})",totalWords:"der bei {measure} {op} {number} ist",totalWordsTwo:"der bei {measure} {op} {from} und {to} liegt",resetFilter:"Filter zur\xFCcksetzen",nouns:{item:{one:"Eintrag",other:"Eintr\xE4ge"},value:{one:"Wert",other:"Werte"},date:{one:"Datum",other:"Daten"},year:{one:"Jahr",other:"Jahre"},quarter:{one:"Quartal",other:"Quartale"},month:{one:"Monat",other:"Monate"},week:{one:"Woche",other:"Wochen"},day:{one:"Tag",other:"Tage"},weekday:{one:"Wochentag",other:"Wochentage"},hour:{one:"Stunde",other:"Stunden"},range:{one:"Bereich",other:"Bereiche"}},quickTitle:"Schnellauswahl",quickCount:{year:"Anzahl Jahre",month:"Anzahl Monate",day:"Anzahl Tage"},quickLast:{year:{one:"Letztes {count} Jahr",other:"Letzte {count} Jahre"},month:{one:"Letzter {count} Monat",other:"Letzte {count} Monate"},day:{one:"Letzter {count} Tag",other:"Letzte {count} Tage"}},quickRows:"{rows} Zeilen",quickHidden:{one:"{choices} wird nicht angeboten: die Daten enden am {latest}.",other:"{choices} werden nicht angeboten: die Daten enden am {latest}."},anchorLabel:"Gez\xE4hlt ab",anchorToday:"heute ({date})",anchorLatest:"dem letzten Datensatz ({date})",quickLine:"Schnellauswahl: {text}",changeAbove:"oben \xE4ndern",yearsCombined:"Jahre zusammengefasst",yearsCombinedHint:"ein Eintrag ({noun}) \xFCber die markierten Jahre",yearsCombinedOne:"Die Tabelle zeigt nur {year}.",pickItems:"Eintr\xE4ge ausw\xE4hlen",picksState:"{picked} von {total} ausgew\xE4hlt",picksAll:"alle {total} ausgew\xE4hlt",clear:"Zur\xFCcksetzen",clearPicks:"Auswahl zur\xFCcksetzen",rulesState:{one:"{count} Regel",other:"{count} Regeln"},rulesNoneState:"Keine Regeln",removeAll:"Entfernen",removeRules:"Regeln entfernen",tailOut:{one:"Durch die Regeln weggelassen ({count}) \u2013 das H\xE4kchen gilt wieder, sobald sie weg sind",other:"Durch die Regeln weggelassen ({count}) \u2013 die H\xE4kchen gelten wieder, sobald sie weg sind"},rulesKeep:"{noun} behalten, f\xFCr die alles zutrifft:",rulesNone:"{noun} behalten, f\xFCr die alles zutrifft. Unten eine Regel hinzuf\xFCgen.",ruleKeeps:"Beh\xE4lt {kept} der {total} {noun}",ruleKeepsNone:"Beh\xE4lt 0 der {total} {noun} \u2013 {spread}.",ruleIncomplete:"Gilt, sobald sie vollst\xE4ndig ist.",explainRule:"Diese Regel erkl\xE4ren",ruleInfo:{number:"Vergleicht den Wert selbst, nicht seinen Gesamtwert. Beispiel: \u201Ezwischen 20 und 25\u201C beh\xE4lt die Werte von 20 bis 25.",date:"Vergleicht jedes Datum nach seinem Kalendertag. Beispiel: \u201Evor 1. M\xE4rz 2022\u201C beh\xE4lt jeden Tag bis zum 28. Februar 2022.",group:"Vergleicht jeden Eintrag nach seinem Platz auf der Zeitachse. Beispiel: \u201Eab 2022\u201C beh\xE4lt 2022 und alle sp\xE4teren.",cyclic:"Vergleicht jeden Eintrag nach seinem Platz im Jahr, \xFCber alle Jahre zusammen. Beispiel: \u201Eab Juni\u201C beh\xE4lt Juni bis Dezember.",total:"Der Gesamtwert eines Eintrags ist sein Wert in der Zeile Gesamt \u2013 {measure} \xFCber {scope} \u2013 nicht eine einzelne Zelle. Beispiel: \u201Egr\xF6\xDFer als 20\u201C beh\xE4lt die {nouns} mit einem Gesamtwert \xFCber 20.",name:"Vergleicht den Namen jedes Eintrags, wie die Tabelle ihn schreibt. Beispiel: \u201Eenth\xE4lt \xE4r\u201C beh\xE4lt M\xE4rz."},scopeItems:"alle {count} Eintr\xE4ge von {field}",scopeDates:"die Daten {range}",scopeRows:"jede Zeile",pickerSearch:"Eintr\xE4ge suchen",pickerMatch:"{count} von {total} passen",pickerNone:"Kein Treffer",rulesTitle:"Regeln",ruleAnd:"und",addRule:"Regel hinzuf\xFCgen",addRuleItem:"{field} vergleichen",addRuleTotal:"Gesamtwert vergleichen",addRuleName:"Regel zum Namen",removeRule:"Diese Regel entfernen",rulesFull:"H\xF6chstens {max} Regeln je Feld.",ruleName:"Name",ruleValue:"Wert",ruleDate:"Datum",dateOps:{"=":"gleich","!=":"ungleich",">":"nach",">=":"ab","<":"vor","<=":"bis",between:"zwischen",notBetween:"nicht zwischen"},lastOp:{one:"im letzten",other:"in den letzten"},ruleUnits:{year:{one:"Jahr",other:"Jahren"},month:{one:"Monat",other:"Monaten"},day:{one:"Tag",other:"Tagen"}},ruleWhose:"Eintr\xE4ge von {field} mit Gesamtwert",blanksOut:"Leere Eintr\xE4ge werden nicht behalten.",ruleUnit:"Einheit",moveLeft:"Nach links",moveRight:"Nach rechts",remove:"Feld entfernen",chartAutoNow:"Jetzt: {type}",sharedViews:"Gemeinsame Ansichten",myViews:"Meine Ansichten",noViews:"Noch keine gespeicherten Ansichten.",noViewsStore:"Noch keine. Gespeicherte Ansichten bleiben nur in diesem Browser.",publishView:"{name} als gemeinsame Ansicht ver\xF6ffentlichen",publishConfirm:"\u201E{name}\u201C als gemeinsame Ansicht ver\xF6ffentlichen? Alle, die diesen Bericht nutzen, sehen sie.",publishAction:"Ver\xF6ffentlichen",storeNote:"Nur in diesem Browser gespeichert: nicht auf anderen Ger\xE4ten, und weg, wenn die Websitedaten gel\xF6scht werden.",storeFull:"dieser Browser beh\xE4lt h\xF6chstens {max} Ansichten",storeTooLarge:"die Ansichten br\xE4uchten mehr als {max} Zeichen",storeRefused:"dieser Browser hat sie nicht behalten (Speicher gesperrt oder voll)",storeChanged:"die Ansichten wurden in einem anderen Tab ge\xE4ndert; das Men\xFC neu \xF6ffnen",toastSaved:"Ansicht \u201E{name}\u201C gespeichert",toastDeleted:"Ansicht \u201E{name}\u201C gel\xF6scht",toastPublished:"Ansicht \u201E{name}\u201C ver\xF6ffentlicht",toastSaveFailed:"Die Ansicht konnte nicht gespeichert werden: {message}",toastDeleteFailed:"Die Ansicht konnte nicht gel\xF6scht werden: {message}",toastPublishFailed:"Die Ansicht konnte nicht ver\xF6ffentlicht werden: {message}",toastSaveRejected:"Der Server konnte die Ansicht nicht speichern.",toastDeleteRejected:"Der Server konnte die Ansicht nicht l\xF6schen.",toastPublishRejected:"Der Server konnte die Ansicht nicht ver\xF6ffentlichen.",deleteView:"{name} l\xF6schen",deleteConfirm:"\u201E{name}\u201C l\xF6schen?",deleteAction:"L\xF6schen",saveView:"Aktuelle Ansicht speichern",viewName:"Name der Ansicht",thisView:"Diese Ansicht",saveNamed:"\u201E{name}\u201C speichern",saveAs:"Speichern unter\u2026",saveSharedLocked:"Gemeinsame Ansicht: nicht \xE4nderbar. \u201ESpeichern unter\u201C nutzen.",saveNotInViews:"Noch nicht gespeichert. \u201ESpeichern unter\u201C nutzen.",replaceConfirm:"\u201E{name}\u201C gibt es schon. Ersetzen?",replaceAction:"Ersetzen",replaceSharedConfirm:"Die gemeinsame Ansicht \u201E{name}\u201C f\xFCr alle ersetzen?",newAlready:"Der Bericht ist schon leer.",save:"Speichern",cancel:"Abbrechen",expandAll:"Alle aufklappen",collapseAll:"Alle zuklappen",aggregation:"Zusammenfassen mit",moreStatistics:"Weitere Statistiken",showAsNone:"Der Wert selbst",moreCalculations:"Weitere Berechnungen",showAsNames:{percentOfGrandTotal:"% des Gesamtergebnisses",percentOfRowTotal:"% der Zeilensumme",percentOfColumnTotal:"% der Spaltensumme",percentOfParentRow:"% der \xFCbergeordneten Zeile",percentOfParentColumn:"% der \xFCbergeordneten Spalte",differenceFromPrevious:"Differenz zum vorherigen",percentDifferenceFromPrevious:"% Differenz zum vorherigen",runningTotal:"Laufende Summe",percentRunningTotal:"% laufende Summe",rankAscending:"Rang, kleinster zuerst",rankDescending:"Rang, gr\xF6\xDFter zuerst"},along:"Entlang",format:"Zahlenformat",formatAuto:"Automatisch",formats:{number:"Zahl","number:0":"Zahl ohne Nachkommastellen","number:2":"Zahl mit 2 Nachkommastellen",integer:"Ganze Zahl",currency:"W\xE4hrung",percent:"Prozent",compact:"Kompakt (1,2 Tsd.)",bytes:"Bytes (KB, MB)","duration:h":"Dauer aus Stunden","duration:s":"Dauer aus Sekunden"},conditional:"Hervorheben",conditionalNone:"Keine",colorScale:"Farbskala",dataBar:"Datenbalken",rename:"Name",sortOldest:"\xC4lteste zuerst",sortNewest:"Neueste zuerst",groupNone:"Keine Gruppierung (jedes Datum mit Uhrzeit)",groupTimeline:"Entlang der Zeitachse",groupCyclic:"Gleicher Zeitraum in jedem Jahr",unitHints:{year:"2025",yearQuarter:"Q1 2025",yearMonth:"Jan. 2025",yearWeek:"2025-W03",day:"15.01.2025",quarter:"Q1 jedes Jahres",month:"Jan. jedes Jahres",week:"W03 jedes Jahres",weekday:"Mo. bis So.",hour:"00:00 bis 23:00",bin:""},bins:"Zahlenbereiche",binsState:"Bereiche zu {size} ab {start}",binSize:"Bereichsgr\xF6\xDFe",binStart:"Beginnt bei",binStartFar:"Bereiche ab {start} k\xF6nnen die Werte dieses Felds ({min} bis {max}) nicht fassen: Jede Zeile w\xE4re leer. Einen Beginn n\xE4her an den Werten w\xE4hlen.",apply:"Anwenden",topN:"Oberste Eintr\xE4ge",topCount:"Anzahl",bottom:"Unterste",topBy:"nach",searchValues:"Werte suchen",selectAll:"Alle ausw\xE4hlen",selectNone:"Keine ausw\xE4hlen",onlyThis:"Nur",valuesShown:"{shown} von {total} Werten; suchen, um weitere zu finden",conditionNumber:"Bedingung f\xFCr die Beschriftung",conditionNone:"Keine Bedingung",conditionValue:"Text",selected:"{count} ausgew\xE4hlt",exportDownload:"Herunterladen",exportCopy:"Kopieren",exportXlsx:"Excel-Arbeitsmappe (.xlsx)",exportCsv:"CSV-Datei (.csv)",exportPng:"Diagramm als Bild (.png)",exportPngNeedsChart:"Zuerst zum Diagramm wechseln.",exportNeedsField:"Zuerst ein Feld hinzuf\xFCgen.",copyTable:"Tabelle kopieren",copyDataJson:"Daten als JSON kopieren",toastTableCopied:"Tabelle kopiert: tabulatorgetrennt, wird in Excel oder Google Sheets in Spalten eingef\xFCgt",toastDataCopied:"Daten als JSON kopiert",toastCopyBlocked:"Diese Seite erlaubt kein Kopieren. Stattdessen eine Datei herunterladen.",drillTitle:"Zeilen hinter diesem Wert",drillCount:{one:"{count} Zeile",other:"{count} Zeilen"},drillShown:"Die ersten {shown} von {count} Zeilen",drillCopy:"Kopieren",drillJson:"Als JSON kopieren",drillCsv:"CSV herunterladen",drillXlsx:"Excel herunterladen",drillPart:"{shown} von {count} Zeilen",drillCopied:"{rows} kopiert: tabulatorgetrennt, wird in Excel oder Google Sheets in Spalten eingef\xFCgt",drillCopiedJson:"{rows} als JSON kopiert",drillExported:"{file} exportiert ({rows})",drillExportNote:"Enth\xE4lt die ersten {shown} von {count} Zeilen, wie hier gezeigt.",showTips:"Tipps zeigen",showSettingInfo:"Erkl\xE4rungen zeigen",resetTips:"Ausgeblendete Tipps wieder zeigen",sectionChanged:", ge\xE4ndert",help:"Hilfe",shortcutsTitle:"Tastenk\xFCrzel",keys:{Mod:"Strg",Shift:"Umschalt","Arrow keys":"Pfeiltasten",Enter:"Eingabe",Space:"Leertaste",Escape:"Esc",F10:"F10"},shortcuts:{undo:"R\xFCckg\xE4ngig",redo:"Wiederholen",move:"Zwischen den Werten der Tabelle wechseln",open:"Die Zeilen hinter einem Wert \xF6ffnen; nach einer \xDCberschrift sortieren; ein Men\xFC \xF6ffnen",drag:"Ein Feld oder einen Chip aufnehmen und ablegen",close:"Ein Men\xFC, ein Fenster oder einen Tipp schlie\xDFen",fields:"In der Feldliste: auf und ab zwischen den Feldern, links und rechts zum Griff eines Felds, seinem \u201Ei\u201C und seinem Men\xFC",fieldMenu:"Das Men\xFC des Felds im Fokus \xF6ffnen"},valueLabels:"Wertbeschriftung",valueLabelNames:{auto:"Automatisch",off:"Aus",value:"Wert",percent:"Prozent",both:"Wert und Prozent"},legend:"Legende",legendNames:{auto:"Automatisch",bottom:"Unten",right:"Rechts",off:"Aus"},chartTitle:"Titel",chartTitleNone:"Kein Titel",smoothLines:"Gegl\xE4ttete Linien",labelPosition:"Beschriftung",labelPositionNames:{outside:"Au\xDFen",inside:"Innen"},axisLabels:"Achsenbeschriftung",axisLabelNames:{auto:"Automatisch",all:"Alle (schr\xE4g)",nth:"Jede n-te"},groupLabels:"Gruppen unter der Achse",groupLabelNames:{auto:"Automatisch",on:"Ein",off:"Aus"},defaultName:"Standardnamen verwenden",shareThisView:"Diese Ansicht teilen",share:"Teilen",copyLink:"Link kopieren",copyJson:"Ansicht als JSON kopieren",downloadView:"Ansicht herunterladen (.pivotkit.json)",sharePrivacy:"Eine Ansicht enth\xE4lt die Namen der Felder und in ihren Filtern die dort gew\xE4hlten Werte: Nur dort teilen, wo diese gesehen werden d\xFCrfen.",loadView:"Ansicht laden\u2026",loadViewHint:"Eine Ansichtsdatei, eine Ansicht als JSON oder einen Link einf\xFCgen oder eine .pivotkit.json-Datei w\xE4hlen.",loadViewText:"Ansicht als JSON oder Link",chooseFile:"Datei w\xE4hlen\u2026",load:"Laden",loadCheckTitle:"Diese Ansicht passt vielleicht nicht zu diesen Daten",loadAnyway:"Trotzdem laden",switchAndLoad:"Zu \u201E{source}\u201C wechseln und laden",switchStartsFresh:"Der Wechsel zeigt die anderen Daten mit dieser Ansicht; R\xFCckg\xE4ngig beginnt dort.",numberInvalid:"Eine Zahl eingeben, etwa {example}.",countInvalid:"Eine ganze Zahl ab 1 eingeben.",countMax:"Eine ganze Zahl bis {max} eingeben.",sizeInvalid:"Eine Zahl \xFCber 0 eingeben, etwa {example}.",valueFilterBy:"Wert",valueFilterOp:"Bedingung",valueFilterNumber:"Zahl",valueFilterTo:"und",valueOps:{"=":"gleich","!=":"ungleich",">":"gr\xF6\xDFer als",">=":"mindestens","<":"kleiner als","<=":"h\xF6chstens",between:"zwischen",notBetween:"nicht zwischen"},moreFormats:"Weitere Formate",totals:"Summen",grandTotalRow:"Gesamtzeile",grandTotalColumn:"Gesamtspalte",rowSubtotals:"Teilergebnisse der Zeilen",colSubtotals:"Teilergebnisse der Spalten",needsRowField:"Braucht ein Feld in Zeilen.",needsColField:"Braucht ein Feld in Spalten.",needsRowFields:"Braucht zwei oder mehr Felder in Zeilen.",needsColFields:"Braucht zwei oder mehr Felder in Spalten.",expandNothing:"Nichts ist zugeklappt.",collapseNeedsRows:"Braucht zwei oder mehr Felder in Zeilen.",collapseAllDone:"Alle Gruppen sind schon zugeklappt.",groupsCollapsed:{one:"{count} Gruppe zugeklappt",other:"{count} Gruppen zugeklappt"},groupsExpanded:{one:"{count} Gruppe aufgeklappt",other:"{count} Gruppen aufgeklappt"},chartDisplay:"Darstellung",toastExported:"{file} exportiert",toastLinkCopied:"Link kopiert",toastJsonCopied:"Ansicht als JSON kopiert",toastCopyFailed:"Diese Seite erlaubt kein Kopieren. Stattdessen \u201EAnsicht herunterladen\u201C verwenden.",toastLinkTooLong:"Diese Ansicht ist zu gro\xDF f\xFCr einen Link. Stattdessen \u201EAnsicht herunterladen\u201C verwenden."};export{e as de};
@@ -1 +0,0 @@
1
- import{Ba as me,C as Xe,Ca as _t,D as Ue,Da as Ht,E as Fn,Ea as Je,F as Dn,G as ge,H as Se,I as Dt,J as Mt,K as Mn,L as Bt,M as Pt,N as Bn,O as Vt,Oa as et,Pa as Wt,Qa as Gt,S as Pn,Sa as Qt,Ta as Hn,U as Z,Ua as Wn,X as ke,Xa as Gn,Y as Vn,Ya as Qn,Z as ct,Za as Yn,_ as jn,a as Ie,aa as ut,ba as jt,c as Pe,ca as qn,da as $e,ea as qt,f as W,fa as Un,g as It,ga as Ze,ha as ye,i as qe,ia as mt,ib as Xn,j as Ye,ja as Ut,k as Cn,l as Tn,m as Ln,na as Jn,o as $t,oa as Jt,q as On,qa as Kt,r as L,ra as zt,s as G,sa as dt,t as An,ta as Re,u as In,ua as Kn,w as Rt,wa as zn,x as $n,xa as _n,y as Rn,z as Ft}from"./chunk-FW54TETI.js";import{D as Me,F as Be,X as Nn,Z as xn,a as En,da as Sn,g as bn,o as X}from"./chunk-RXM4LLDS.js";import"./chunk-MB64GADT.js";import{c as Ae}from"./chunk-DCANE7XH.js";var eo={aboutSetting:"About {setting}",settingInfo:{grandTotalRow:"A last row with the total of every column.",grandTotalColumn:"A last column with the total of every row.",rowSubtotals:"With two or more fields in Rows: a total row under each group of the outer field.",colSubtotals:"With two or more fields in Columns: a total column after each group of the outer field.",along:"The direction the calculation walks: Rows goes down the rows of each column, Columns across the columns of each row. A running total adds up along it, a difference compares with the item before it.",showAs:"Shows each value as a share, a difference, a running total or a rank instead of the number itself. For percentages, a tip above the result says what 100% is.",exportXlsx:"Every number with all its decimals, formats kept, ready to calculate with.",exportCsv:"Percentages and calculations as the table shows them, as plain text.",copyTable:"The table as it is shown, headers and totals included: tab-separated, pastes into Excel or Google Sheets as columns.",copyDataJson:"The table's numbers with their labels as JSON, for a program. Not the view itself: that is Views \u2192 Copy view as JSON.",drillCopy:"The rows as the panel shows them, with a header row: tab-separated, pastes into Excel or Google Sheets as columns.",drillJson:"The rows as JSON objects, with the data's field names and raw values, for a program.",groupLabels:"With two or more fields in Rows: the outer field's items written once under the axis, below their categories.",labelPosition:"Outside: each slice's name and number next to it. Inside: the number on the slice, the names in the legend; outside when a donut's ring is too thin for it.",sharedView:"Only admins can change shared views.",newReport:"Takes every field out, to start over. Undo brings them back; saved views stay.",valuesFilter:"Values are not filtered here: filter a field on Rows or Columns through its menu, or move a field to Filters."},back:"Back",backTo:"Back to the menu of {name}",levelTitle:"{name} \u203A {topic}",searchMenu:"Search in the menu of {name}",searchMenuShort:"Search in this menu (key /)",searchResults:"Results",searchNothing:"Nothing found. Try another word, or clear the search.",sortByValue:"Sort by value",sortOldestShort:"Oldest",sortNewestShort:"Newest",filterTopic:"Filter",filterAll:"All",groupTopic:"Group",groupNoneShort:"None",off:"Off",moveToTitle:"Move to",topOwn:"Top N\u2026",binsOff:"Remove ranges",valueConditionTitle:"Condition on a value",nameHint:"Applies with Enter or when you leave the field; Escape gives the name back.",showAsKeywords:"percent % share",nameKeywords:"rename label title",filterKeywords:"values pick choose rule rules condition range dates",formatDecimals:{one:"Number, {count} decimal",other:"Number, {count} decimals"},listAnd:" and ",summaryAll:"All {total} {noun} shown",summarySome:"{shown} of {total} {noun} shown",summaryNone:"Nothing shown",summaryOk:"Every item is picked, no rules.",summaryKept:"Every item is picked; the rules keep them all.",summaryQuickOnly:"Every item is picked; {quick}.",summaryPicks:"{count} left out by your picks",summaryQuick:"{count} outside {quick}",summaryRules:{one:"{items} left out by the rule",other:"{items} left out by the rules"},summaryTotals:{one:"{items} left out by the rule on the total",other:"{items} left out by the rules on the totals"},summaryRows:"{rows} of {total} rows",summaryData:"data {range}",yearsAll:"{years} combined",yearsOne:"{year} only",emptyPicks:"Nothing is picked.",emptyRules:"No {noun} meets {rules}.",emptyTotal:"No {noun} has a total {rule} \u2013 {spread}.",totalSpread:"the totals go from {low} ({lowItem}) to {high} ({highItem})",totalWords:"{measure} that {op} {number}",totalWordsTwo:"{measure} that {op} {from} and {to}",resetFilter:"Reset filter",nouns:{item:{one:"item",other:"items"},value:{one:"value",other:"values"},date:{one:"date",other:"dates"},year:{one:"year",other:"years"},quarter:{one:"quarter",other:"quarters"},month:{one:"month",other:"months"},week:{one:"week",other:"weeks"},day:{one:"day",other:"days"},weekday:{one:"weekday",other:"weekdays"},hour:{one:"hour",other:"hours"},range:{one:"range",other:"ranges"}},quickTitle:"Quick choices",quickCount:{year:"Number of years",month:"Number of months",day:"Number of days"},quickLast:{year:{one:"Last {count} year",other:"Last {count} years"},month:{one:"Last {count} month",other:"Last {count} months"},day:{one:"Last {count} day",other:"Last {count} days"}},quickRows:"{rows} rows",quickHidden:{one:"{choices} is not offered: the data end {latest}.",other:"{choices} are not offered: the data end {latest}."},anchorLabel:"Counted back from",anchorToday:"today ({date})",anchorLatest:"the latest record ({date})",quickLine:"Quick choice: {text}",changeAbove:"change it above",yearsCombined:"Years combined",yearsCombinedHint:"one {noun} over the years ticked",yearsCombinedOne:"The table shows {year} only.",pickItems:"Pick items",picksState:"{picked} of {total} picked",picksAll:"all {total} picked",clear:"Clear",clearPicks:"Clear picks",rulesState:{one:"{count} rule",other:"{count} rules"},rulesNoneState:"No rules",removeAll:"Remove",removeRules:"Remove the rules",tailOut:{one:"Left out by the rules ({count}) \u2013 its tick applies again once they go",other:"Left out by the rules ({count}) \u2013 their ticks apply again once they go"},rulesKeep:"Keep the {noun} for which all of these are true:",rulesNone:"Keep the {noun} for which all of these are true. Add one below.",ruleKeeps:"Keeps {kept} of {total} {noun}",ruleKeepsNone:"Keeps 0 of {total} {noun} \u2013 {spread}.",ruleIncomplete:"Applies once it is complete.",explainRule:"Explain this rule",ruleInfo:{number:"Compares the value itself, not its total. Example: \u201Cis between 20 and 25\u201D keeps the values from 20 to 25.",date:"Compares each date by its calendar day. Example: \u201Cis before Mar 1, 2022\u201D keeps every day up to Feb 28, 2022.",group:"Compares each {noun} by its place on the time line. Example: \u201Cis from 2022\u201D keeps 2022 and every later one.",cyclic:"Compares each {noun} by its place in the year, over all the years combined. Example: \u201Cis from Jun\u201D keeps Jun to Dec.",total:"The total is the {noun}\u2019s Grand Total \u2013 the {measure} over {scope}, as the Grand Total row shows it \u2013 not a single cell. Example: \u201Cis greater than 20\u201D keeps the {nouns} whose total is above 20.",name:"Compares the name of each {noun} as the table writes it. Example: \u201Ccontains ar\u201D keeps Mar and March."},scopeItems:"all {count} {field} items",scopeDates:"the dates {range}",scopeRows:"every row",pickerSearch:"Search items",pickerMatch:"{count} of {total} match",pickerNone:"No match",rulesTitle:"Rules",ruleAnd:"and",addRule:"Add a rule",addRuleItem:"Compare {field}",addRuleTotal:"Compare its total",addRuleName:"Rule on the name",removeRule:"Remove this rule",rulesFull:"At most {max} rules per field.",ruleName:"The name",ruleValue:"Value",ruleDate:"Date",dateOps:{"=":"is","!=":"is not",">":"is after",">=":"is from","<":"is before","<=":"is up to",between:"is between",notBetween:"is not between"},lastOp:{one:"is in the last",other:"is in the last"},ruleUnits:{year:{one:"year",other:"years"},month:{one:"month",other:"months"},day:{one:"day",other:"days"}},ruleWhose:"{field} items whose total",blanksOut:"Blank items are not kept.",ruleUnit:"Unit",moveLeft:"Move left",moveRight:"Move right",remove:"Remove field",chartAutoNow:"Now: {type}",sharedViews:"Shared views",myViews:"My views",noViews:"No saved views yet.",noViewsStore:"None yet. Saved views stay in this browser only.",publishView:"Publish {name} as a shared view",publishConfirm:"Publish \u201C{name}\u201D as a shared view? Everyone who uses this report sees it.",publishAction:"Publish",storeNote:"Kept in this browser only: not on other devices, and gone when the site's data is cleared.",storeFull:"this browser keeps at most {max} views",storeTooLarge:"the views would take more than {max} characters",storeRefused:"this browser did not keep it (storage blocked or full)",storeChanged:"the views were changed in another tab; open the menu again",toastSaved:"View \u201C{name}\u201D saved",toastDeleted:"View \u201C{name}\u201D deleted",toastPublished:"View \u201C{name}\u201D published",toastSaveFailed:"The view could not be saved: {message}",toastDeleteFailed:"The view could not be deleted: {message}",toastPublishFailed:"The view could not be published: {message}",toastSaveRejected:"The server could not save the view.",toastDeleteRejected:"The server could not delete the view.",toastPublishRejected:"The server could not publish the view.",deleteView:"Delete {name}",deleteConfirm:"Delete \u201C{name}\u201D?",deleteAction:"Delete",saveView:"Save current view",viewName:"Name of the view",thisView:"This view",saveNamed:"Save \u201C{name}\u201D",saveAs:"Save as\u2026",saveSharedLocked:"Shared view: you cannot change it. Use Save as.",saveNotInViews:"Not saved yet. Use Save as.",replaceConfirm:"\u201C{name}\u201D exists. Replace it?",replaceAction:"Replace",replaceSharedConfirm:"Replace the shared view \u201C{name}\u201D for everyone?",newAlready:"The report is empty already.",save:"Save",cancel:"Cancel",expandAll:"Expand all",collapseAll:"Collapse all",aggregation:"Summarize by",moreStatistics:"More statistics",showAsNone:"The value itself",moreCalculations:"More calculations",showAsNames:{percentOfGrandTotal:"% of grand total",percentOfRowTotal:"% of row total",percentOfColumnTotal:"% of column total",percentOfParentRow:"% of parent row",percentOfParentColumn:"% of parent column",differenceFromPrevious:"Difference from previous",percentDifferenceFromPrevious:"% difference from previous",runningTotal:"Running total",percentRunningTotal:"% running total",rankAscending:"Rank, smallest first",rankDescending:"Rank, largest first"},along:"Along",format:"Number format",formatAuto:"Automatic",formats:{number:"Number","number:0":"Number, no decimals","number:2":"Number, 2 decimals",integer:"Whole number",currency:"Currency",percent:"Percent",compact:"Compact (1.2K)",bytes:"Bytes (KB, MB)","duration:h":"Duration from hours","duration:s":"Duration from seconds"},conditional:"Highlight",conditionalNone:"None",colorScale:"Colour scale",dataBar:"Data bars",rename:"Name",sortOldest:"Oldest first",sortNewest:"Newest first",groupNone:"No grouping (every date and time)",groupTimeline:"Along the time line",groupCyclic:"Same period every year",unitHints:{year:"2025",yearQuarter:"Q1 2025",yearMonth:"Jan 2025",yearWeek:"2025-W03",day:"Jan 15, 2025",quarter:"Q1 of every year",month:"Jan of every year",week:"W03 of every year",weekday:"Mon to Sun",hour:"00:00 to 23:00",bin:""},bins:"Number ranges",binsState:"Ranges of {size} from {start}",binSize:"Range size",binStart:"Starting at",binStartFar:"Ranges from {start} cannot hold this field's values ({min} to {max}): every row would be blank. Pick a start closer to them.",apply:"Apply",topN:"Top items",topCount:"Count",bottom:"Bottom",topBy:"by",searchValues:"Search values",selectAll:"Select all",selectNone:"Select none",onlyThis:"Only",valuesShown:"{shown} of {total} values; search to find more",conditionNumber:"Condition on the label",conditionNone:"No condition",conditionValue:"Text",selected:"{count} selected",exportDownload:"Download",exportCopy:"Copy",exportXlsx:"Excel workbook (.xlsx)",exportCsv:"CSV file (.csv)",exportPng:"Chart image (.png)",exportPngNeedsChart:"Switch to Chart first.",exportNeedsField:"Add a field first.",copyTable:"Copy table",copyDataJson:"Copy data as JSON",toastTableCopied:"Table copied: tab-separated, pastes into Excel or Google Sheets as columns",toastDataCopied:"Data copied as JSON",toastCopyBlocked:"This page does not allow copying. Download a file instead.",drillTitle:"Rows behind this value",drillCount:{one:"{count} row",other:"{count} rows"},drillShown:"Showing the first {shown} of {count} rows",drillCopy:"Copy",drillJson:"Copy as JSON",drillCsv:"Download CSV",drillXlsx:"Download Excel",drillPart:"{shown} of {count} rows",drillCopied:"Copied {rows}: tab-separated, pastes into Excel or Google Sheets as columns",drillCopiedJson:"Copied {rows} as JSON",drillExported:"Exported {file} ({rows})",drillExportNote:"Holds the first {shown} of {count} rows, as shown here.",showTips:"Show tips",showSettingInfo:"Show explanations",resetTips:"Show dismissed tips again",sectionChanged:", changed",help:"Help",shortcutsTitle:"Keyboard shortcuts",keys:{Mod:"Ctrl",Shift:"Shift","Arrow keys":"Arrow keys",Enter:"Enter",Space:"Space",Escape:"Escape",F10:"F10"},shortcuts:{undo:"Undo",redo:"Redo",move:"Move between values in the table",open:"Open the rows behind a value; sort by a header; open a menu",drag:"Pick up a field or chip, and drop it",close:"Close a menu, a panel or a tip",fields:"In the field list: up and down between fields, left and right to a field's grip, its \u201Ci\u201D and its menu",fieldMenu:"Open the menu of the field in focus"},valueLabels:"Value labels",valueLabelNames:{auto:"Automatic",off:"Off",value:"Value",percent:"Percent",both:"Value and percent"},legend:"Legend",legendNames:{auto:"Automatic",bottom:"Bottom",right:"Right",off:"Off"},chartTitle:"Title",chartTitleNone:"No title",smoothLines:"Smooth lines",labelPosition:"Labels",labelPositionNames:{outside:"Outside",inside:"Inside"},axisLabels:"Axis labels",axisLabelNames:{auto:"Automatic",all:"All (slanted)",nth:"Every n-th"},groupLabels:"Group labels under the axis",groupLabelNames:{auto:"Automatic",on:"On",off:"Off"},defaultName:"Use the default name",shareThisView:"Share this view",share:"Share",copyLink:"Copy link",copyJson:"Copy view as JSON",downloadView:"Download view (.pivotkit.json)",sharePrivacy:"A view holds the names of fields and, in its filters, the values chosen there: share it only where those may be seen.",loadView:"Load view\u2026",loadViewHint:"Paste a view file, a view as JSON or a link, or choose a .pivotkit.json file.",loadViewText:"View as JSON or link",chooseFile:"Choose file\u2026",load:"Load",loadCheckTitle:"This view may not fit this data",loadAnyway:"Load anyway",switchAndLoad:"Switch to \u201C{source}\u201D and load",switchStartsFresh:"Switching shows the other data with this view; Undo starts there.",numberInvalid:"Enter a number, such as {example}.",countInvalid:"Enter a whole number of 1 or more.",countMax:"Enter a whole number up to {max}.",sizeInvalid:"Enter a number above 0, such as {example}.",valueFilterBy:"Value",valueFilterOp:"Condition",valueFilterNumber:"Number",valueFilterTo:"and",valueOps:{"=":"is","!=":"is not",">":"is greater than",">=":"is at least","<":"is less than","<=":"is at most",between:"is between",notBetween:"is not between"},moreFormats:"More formats",totals:"Totals",grandTotalRow:"Grand total row",grandTotalColumn:"Grand total column",rowSubtotals:"Row subtotals",colSubtotals:"Column subtotals",needsRowField:"Needs a field in Rows.",needsColField:"Needs a field in Columns.",needsRowFields:"Needs two or more fields in Rows.",needsColFields:"Needs two or more fields in Columns.",expandNothing:"Nothing is collapsed.",collapseNeedsRows:"Needs two or more fields in Rows.",collapseAllDone:"Every group is collapsed already.",groupsCollapsed:{one:"{count} group collapsed",other:"{count} groups collapsed"},groupsExpanded:{one:"{count} group expanded",other:"{count} groups expanded"},chartDisplay:"Display",toastExported:"Exported {file}",toastLinkCopied:"Link copied",toastJsonCopied:"View copied as JSON",toastCopyFailed:"This page does not allow copying. Use \u201CDownload view\u201D instead.",toastLinkTooLong:"This view is too large for a link. Use \u201CDownload view\u201D instead."},Yt=new Map([["en",eo]]);function _o(e,t){Yt.set(e,t)}var Ho=e=>Yt.has(e),Zn=new WeakMap;function to(e){let t=Yt.get(e.lang)??eo,n=Zn.get(e);if(n&&n.base===t)return n.out;let o={...e,...In(t,e[An])};return Zn.set(e,{base:t,out:o}),o}var $=Ae(Ie(),1);var c=Ae(Ie(),1);var V=Ae(Ie(),1);var E=Ae(Ie(),1),ve=Ae(Ie(),1);var oe=Ae(Ie(),1),k=Ae(Ie(),1);var Fe=Object.freeze({count:500,text:5e6});function Wo(e){try{return JSON.stringify(e)?.length??0}catch{return-1}}function no(e){let t={templates:[],issues:[]},n=(a,l)=>t.issues.push({path:a,message:l}),o=e;if(typeof e=="string"){if(e.length>Fe.text)return n("",`longer than ${Fe.text} characters; not read`),t;try{o=JSON.parse(e)}catch{return n("","not valid JSON"),t}}if(!Array.isArray(o))return n("","not a list of templates"),t;o.length>Fe.count&&n("",`${o.length} templates, more than ${Fe.count}: the first ${Fe.count} are read`);let r=typeof e=="string"?-1/0:0;for(let a=0;a<Math.min(o.length,Fe.count);a++){let l=o[a];if(r!==-1/0){let g=Wo(l);if(g<0){n(`[${a}]`,"not JSON; left out");continue}if(r+=g,r>Fe.text){n(`[${a}]`,`the templates are longer than ${Fe.text} characters as JSON; this one and the rest are left out`);break}}let s=Ln(l);if(s.failed||!s.view){n(`[${a}]`,`${s.issues.at(-1)?.message??"no view"}; left out`);continue}let i=s.view===l,d=It(i?Object.hasOwn(s.view,"name")?s.view.name:void 0:s.name,qe.name);if(!d){n(`[${a}]`,"no name; left out");continue}let u={...s.view};i&&delete u.name;let m={name:d,view:u},p=It(s.description,qe.description);p&&(m.description=p),s.source&&Object.keys(s.source).length>0&&(m.source=s.source),t.templates.push(m),s.issues.forEach(g=>n(`[${a}]${g.path?`.${g.path}`:""}`,g.message))}return t}var P=Ae(Ie(),1);var Go=new Set(["count","countUnique","listUnique"]),pt=e=>Go.has(e)?"count":"field";function tn(e,t,n,o={}){let r=Ze(e);if(!r.values[t])return e;let a=e.values[t],l={...r.values[t],...n};if(n.agg&&n.agg!==a.agg){l.showAs=n.showAs??null;let s=o.defaults??{},i=typeof s.format=="string"&&Me(s.format)?s.format:null,d=a.format&&a.format!==i?a.format:null;n.format!==void 0?l.format=n.format:d?l.format=pt(a.agg)===pt(n.agg)?d:null:l.format=i&&pt(typeof s.agg=="string"?s.agg:"sum")===pt(n.agg)?i:null}return r.values[t]=l,r}function Qo(e,t,n){if(!n)return null;for(let o of[n.min,n.max]){let r=Math.floor((o-t)/e),a=t+r*e,l=e*1e-9;if(!Number.isSafeInteger(r)||a+e===a||a>o+l||o>=a+e+l)return"far"}return null}function tt(e,t,n,o){let r=Ze(e),a=r.filters.findIndex(i=>ye(i.field,t)),l=r.filters.filter(i=>!(ye(i.field,t)&&n.includes(i.type))),s=a===-1?l.length:Math.min(a,l.length);return l.splice(s,0,...o),r.filters=l,!Ut(r,t)&&mt(e).some(i=>ye(i,t))&&!l.some(i=>ye(i.field,t))&&r.filters.splice(s,0,{field:t,type:"exclude",items:[]}),r}function go(e,t,n,o){let r=Ze(e),a=n?JSON.stringify(n):null,l=a===null?-1:r.filters.findIndex(s=>ye(s.field,t)&&JSON.stringify(s)===a);if(l===-1){if(!o)return r;let s=r.filters.map(i=>ye(i.field,t)).lastIndexOf(!0);return r.filters.splice(s+1,0,o),r}return o?r.filters[l]=o:(r.filters.splice(l,1),!Ut(r,t)&&mt(e).some(s=>ye(s,t))&&!r.filters.some(s=>ye(s.field,t))&&r.filters.splice(l,0,{field:t,type:"exclude",items:[]})),r}function nn(e,t,n,o){let r=new Set(n.map(l=>JSON.stringify(l))),a=o.filter(l=>!r.has(JSON.stringify(l)));return tt(e,t,["include","exclude"],a.length?[{field:t,type:"exclude",items:a}]:[])}function oo(e,t,n){return tt(e,t,["label"],n&&n.value!==""?[{field:t,type:"label",op:n.op,value:n.value}]:[])}function ko(e,t,n,o){let r=n?{field:t,type:"top",count:n.count,bottom:!!n.bottom,...n.by?{by:n.by}:{}}:null;return o?go(e,t,o,r):tt(e,t,["top"],r?[r]:[])}var vt=Object.freeze(["relative","compare","value","label"]),ao=10,ze=(e,t,n,o)=>go(e,t,n,o),Yo=Object.freeze(["year","yearQuarter"]);function yo(e,t,n){let o=dt(t,n),r=e.column(Re(t,n))?.type??"string",a=r==="date",l=o?o.by==="day"?"date":"group":r==="number"||r==="date"?r:null,s=a&&!!o&&W.cyclicUnits.includes(o.by),i=a&&!s;return{item:l,dates:a,cyclic:s,quick:i,months:i&&!Yo.includes(o?.by),days:i&&l==="date",unit:o?.by??null}}function vo(e,t,{labels:n,locale:o,timeZone:r,date:a,labelOf:l,span:s}){return t.type==="value"?Dn(e,t,n,o):Bn(t,n,o,{timeZone:r,date:a,labelOf:l,span:s})}function Xo(e,t,n,o=[]){let r=me(e,t,["relative"]),a=me(e,t,["compare"]);if(n.cyclic){let d=a.filter(wo),u=d.length?Zo(d,o):null;return u?{id:"yearsCombined",years:u,filters:d}:{id:"all",filters:[]}}let l={year:!0,month:n.months,day:n.days},s=r.find(d=>l[d.unit]);return s?{id:s.unit==="year"?s.count===1?"thisYear":"years":`${s.unit}s`,count:s.count,anchor:s.anchor??"today",filters:[s]}:{id:"all",filters:[]}}function Zo(e,t){let n=new Set(t);for(let o of e){let[r,a]=Pt(o.value,o.value2).map(Number);n=new Set([...n].filter(l=>(r<=l&&l<=a)==(o.op==="between")))}return n.size?[...n].sort((o,r)=>o-r):null}var wo=e=>e.type==="compare"&&(e.op==="between"||e.op==="notBetween")&&Pt(e.value,e.value2)!==null;function ea(e,t,n){if(!t.length||t.length===n.length)return[];let o=(l,s)=>`${String(l).padStart(4,"0")}-${s?"12-31":"01-01"}`,r=(l,s,i)=>({field:e,type:"compare",op:l,value:o(s,!1),value2:o(i,!0)}),a=[r("between",t[0],t[t.length-1])];for(let l=1;l<t.length;l++)n.some(s=>t[l-1]<s&&s<t[l])&&a.push(r("notBetween",t[l-1]+1,t[l]-1));return a}function ta(e,t,n,o){let r=me(e,t,["compare"]).filter(wo).reduce((a,l)=>ze(a,t,l,null),e);return ea(t,n,o).reduce((a,l)=>ze(a,t,null,l),r)}function Eo(e,t,n){return tt(e,t,["relative"],n?[{field:t,type:"relative",unit:n.unit,count:n.count,...n.anchor==="latest"?{anchor:"latest"}:{}}]:[])}function na(e,t,n){let o=Ze(e);for(let r of o.filters)ye(r.field,t)&&r.type==="relative"&&(delete r.anchor,n==="latest"&&(r.anchor="latest"));return o}var oa=(e,t)=>tt(e,t,["include","exclude",...vt],[]);function Xt(e,t,n,o,r){let a=xn(e,{...t,rows:[n],cols:[],values:[{...o.field?{field:o.field}:{},agg:o.agg}],filters:r,sort:[]}),l=new Map;if(!a.values.length)return{totals:l,rows:a.rows.length};for(let s of a.rowRoot.children){let i=a.value(s,a.colRoot,0);l.set(JSON.stringify(s.key),typeof i=="number"&&Number.isFinite(i)?i:null)}return{totals:l,rows:a.rows.length}}function bo(e,t){return t&&!e.some(n=>Je(n,t))?[...e,{field:t.field??null,agg:t.agg}]:e}function on(e,t){let n=[];for(let o of e.values){let r={field:o.field??null,agg:o.agg};Ht(o,o.field?t(o.field)??"string":"number")&&!n.some(a=>Je(a,r))&&n.push(r)}return n.length?n:[{field:null,agg:"count"}]}function aa(e,t,n=[]){let o=new Set(n.map(r=>JSON.stringify(r)));return me(e,t,vt).filter(r=>!o.has(JSON.stringify(r))).reduce((r,a)=>ze(r,t,a,null),e)}var ra=Object.freeze(["grandTotalRow","grandTotalColumn","rowSubtotals","colSubtotals"]);function sa(e,t){return t==="grandTotalRow"?e.rows.length>=1?null:"needsRowField":t==="grandTotalColumn"?e.cols.length>=1?null:"needsColField":t==="rowSubtotals"?e.rows.length>=2?null:"needsRowFields":e.cols.length>=2?null:"needsColFields"}function No(e,t,n){let o=e.column(Re(t,n))?.type??"string";return o==="date"||o==="boolean"?null:o==="number"?"number":"text"}function la(e,t,n,o,r){let a=s=>typeof s.field=="string"&&s.field.toLowerCase()===t.toLowerCase(),l=[];n&&n.summary&&l.push(L(o.filterSummary,{shown:n.summary.shown.toLocaleString(r),total:n.summary.total.toLocaleString(r)})),l.push(...n?.rules??[]);for(let s of e.filters.filter(a))(s.type==="value"||s.type==="label"&&!n?.rules)&&l.push(vo(e,s,{labels:o,locale:r,timeZone:"UTC",date:!1}));return l.length?l.join(", "):null}var un=300,re=e=>JSON.stringify(e);function xo({items:e,selected:t,onChange:n,labels:o,locale:r,autoFocus:a=!1,tail:l,children:s}){let[i,d]=(0,V.useState)(""),u=i.trim().toLocaleLowerCase(),m=u?e.filter(b=>b.label.toLocaleLowerCase().includes(u)):e,p=l?m.filter(b=>!l.isOut(b)):m,g=l?m.filter(b=>l.isOut(b)):[],y=p.slice(0,un),f=b=>{let C=new Set(t);for(let x of m)b?C.add(re(x.value)):C.delete(re(x.value));n(C)},N=b=>{let C=new Set(t),x=re(b);C.has(x)?C.delete(x):C.add(x),n(C)},v=(b,C)=>{let x=re(b.value);return V.default.createElement("li",{key:x,className:`pk-value${C?" pk-value-out":""}`},V.default.createElement("label",null,V.default.createElement("input",{type:"checkbox",checked:t.has(x),onChange:()=>N(b.value)}),V.default.createElement("span",{className:"pk-value-label"},b.label),V.default.createElement("span",{className:"pk-count"},b.count.toLocaleString(r))),V.default.createElement("button",{type:"button",className:"pk-link pk-only",onClick:()=>n(new Set([x])),"aria-label":`${o.onlyThis}: ${b.label}`},o.onlyThis))};return V.default.createElement(V.default.Fragment,null,V.default.createElement("label",{className:"pk-search"},V.default.createElement(Z,{name:"search"}),V.default.createElement("span",{className:"pk-sr"},o.searchValues),V.default.createElement(ke,{type:"search",value:i,placeholder:o.searchValues,onChange:d,clearLabel:o.clearText,"data-autofocus":a?"":void 0,"data-testid":"filter-search"})),V.default.createElement("div",{className:"pk-filter-actions"},V.default.createElement("button",{type:"button",className:"pk-action",onClick:()=>f(!0),"data-testid":"select-all"},o.selectAll),V.default.createElement("button",{type:"button",className:"pk-action",onClick:()=>f(!1),"data-testid":"select-none"},o.selectNone)),V.default.createElement("div",{className:"pk-filter-body"},V.default.createElement("ul",{className:"pk-values",role:"list"},y.map(b=>v(b,!1)),p.length>y.length?V.default.createElement("li",{className:"pk-hint pk-values-more"},L(o.valuesShown,{shown:y.length,total:p.length.toLocaleString(r)})):null,g.length&&l?l.render(g,b=>v(b,!0),u!==""):null),s))}function ia({view:e,base:t,field:n,encoded:o,locale:r,labels:a,commit:l,close:s}){let i=t??e,d=(0,V.useMemo)(()=>Pe(o,n,{view:i,locale:r,labels:a.core}),[o,n,i,r,a]),u=(0,V.useMemo)(()=>d?d.items.map(S=>S.value):[],[d]),[m,p]=(0,V.useState)(()=>new Set(_t(i,n,u).map(re))),g=me(i,n,["label"])[0],[y,f]=(0,V.useState)(g?.op??""),[N,v]=(0,V.useState)(g?.value??"");if(!d)return null;let b=X(n,a.core),C=()=>{let S=nn(i,n,u.filter(O=>m.has(re(O))),u);S=oo(S,n,y?{op:y,value:N}:null),s(),l(S,{step:"filter",field:b})},x=No(o,i,n)??(g?"text":null);return V.default.createElement("form",{className:"pk-filter",onSubmit:S=>{S.preventDefault(),C()}},V.default.createElement("div",{className:"pk-popover-head"},V.default.createElement("h3",null,L(a.filterTitle,{field:b})),V.default.createElement("span",{className:"pk-muted"},L(a.selected,{count:m.size.toLocaleString(r)}))),V.default.createElement(xo,{items:d.items,selected:m,onChange:p,labels:a,locale:r,autoFocus:!0},x?V.default.createElement("fieldset",{className:"pk-condition"},V.default.createElement("legend",null,x==="number"?a.conditionNumber:a.condition),V.default.createElement("select",{value:y,onChange:S=>f(S.target.value),"aria-label":x==="number"?a.conditionNumber:a.condition},V.default.createElement("option",{value:""},a.conditionNone),W.labelOps.map(S=>V.default.createElement("option",{key:S,value:S},a.labelOps[S]??S))),y?V.default.createElement(ke,{type:"text",value:N,onChange:v,onClear:()=>{!t&&me(i,n,["label"]).length&&l(oo(i,n,null),{step:"filter",field:b})},clearLabel:a.clearText,"aria-label":a.conditionValue,placeholder:a.conditionValue,maxLength:1e3,"data-testid":"filter-condition-text"}):null):null),V.default.createElement("div",{className:"pk-popover-foot"},V.default.createElement("button",{type:"button",className:"pk-btn",onClick:s},a.cancel),V.default.createElement("button",{type:"submit",className:"pk-btn pk-primary","data-testid":"filter-apply"},a.apply)))}function Wr({target:e,onClose:t,view:n,encoded:o,locale:r,labels:a,commit:l}){let s=(0,V.useMemo)(()=>({current:e?e.anchor:null}),[e]);return V.default.createElement(jt,{open:!!e,anchor:s,onClose:t,label:e?L(a.filterTitle,{field:X(e.field,a.core)}):"",className:"pk-filter-popover",fill:!0},e?V.default.createElement(ia,{key:e.field,view:n,base:e.base,field:e.field,encoded:o,locale:r,labels:a,commit:l,close:t}):null)}function _e({id:e,name:t,tabIndex:n}){let{explain:o,labels:r}=(0,ve.useContext)(et),a=r&&r.settingInfo&&Object.hasOwn(r.settingInfo,e)?r.settingInfo[e]:null;return!o||!r||!a?null:ve.default.createElement(qt,{info:{description:a},name:t,label:L(r.aboutSetting,{setting:t}),labels:r,className:"pk-setting-info",testId:`setting-info-${e}`,tabIndex:n})}function He({title:e,children:t,info:n}){let o=(0,ve.useId)(),r=typeof e=="string"?e:"";return ve.default.createElement("div",{className:"pk-section",role:"group","aria-labelledby":o},ve.default.createElement("div",{className:"pk-section-head"},ve.default.createElement("div",{className:"pk-section-title",id:o},e),n?ve.default.createElement(_e,{id:n,name:r}):null),t)}var ro=Object.freeze(["number","number:0","number:2","currency","percent"].filter(Me)),so=Object.freeze(["integer","compact","bytes","duration:h","duration:s"].filter(Me)),lo=W.showAs.filter(e=>["percentOfGrandTotal","percentOfRowTotal","percentOfColumnTotal"].includes(e)),io=Object.freeze({percent:.256,bytes:1536e3,"duration:h":1.5,"duration:s":3725}),an=Object.freeze([3,5,10]);function mn(e,t,n,o,r,a,l){let s=d=>({step:"moved",field:a,zone:d}),i=Un.filter(d=>d!==t).map(d=>({id:`move-${d}`,text:L(r.moveTo,{zone:r.zones[d]}),icon:"chevronRight",closes:!0,change:()=>({view:Jn(e,t,n,d,void 0,{type:l}),note:s(d)})}));return t!=="filters"&&n>0&&i.push({id:"move-left",text:r.moveLeft,icon:"chevronRight",closes:!0,change:()=>({view:Jt(e,t,n,n-1),note:{step:"reordered",zone:t}})}),t!=="filters"&&n<o-1&&i.push({id:"move-right",text:r.moveRight,icon:"chevronRight",closes:!0,change:()=>({view:Jt(e,t,n,n+1),note:{step:"reordered",zone:t}})}),{id:"move",title:r.moveToTitle,kind:"menu",icon:"swap",groups:[{choices:i}]}}function ca({view:e,zone:t,index:n,field:o,types:r,labels:a,locale:l,state:s,defaultsOf:i,encoded:d}){let u=Re(e,o),m=X(o,a.core),p=r.get(u.toLowerCase()),g=p==="date",y=dt(e,o),f=zn(e,o),N=w=>w.toLocaleString(l,{maximumFractionDigits:6}),v=bo(on(e,w=>r.get(w.toLowerCase())),f?.by==="value"?f.value:null),b=u===o?i?.(u)?.order:void 0,C=Array.isArray(b)&&b.length>0,x=f?.by==="custom"?f.items:C?b:null,S=(w,I,D)=>f?f.by===w&&f.order===I&&(w!=="value"||Je(f.value,D)):w==="label"&&I==="asc",O=(w,I,D,j,J,z)=>({id:`sort-${w}`,text:I,icon:z,checked:S(D,j,J),change:()=>{let te=D==="value"?{by:D,order:j,value:J}:D==="custom"?{by:D,order:j,items:[...x]}:{by:D,order:j};return{view:Kn(e,o,_n(te,C)),note:{step:"sort",field:m}}}}),M=v.flatMap((w,I)=>{let D=Ue(e,w,a);return[O(`value-desc-${I}`,L(a.sortValueDesc,{value:D}),"value","desc",w,"sortDesc"),O(`value-asc-${I}`,L(a.sortValueAsc,{value:D}),"value","asc",w,"sortAsc")]});x&&M.push(O("custom",a.sortCustom,"custom","asc",null,"sortAsc"),O("custom-desc",a.sortCustomDesc,"custom","desc",null,"sortDesc"));let h=f&&f.by!=="label"?Fn(e,f,a):null,R=[{id:"sort",title:a.sort,kind:"segmented",icon:"sortAsc",state:h,changed:!!h,groups:[{choices:[O("label-asc",g?a.sortOldestShort:a.sortLabelAsc,"label","asc",null),O("label-desc",g?a.sortNewestShort:a.sortLabelDesc,"label","desc",null)]}]},{id:"sortValue",title:a.sortByValue,kind:M.length<=2?"inline":"menu",icon:"sortDesc",state:h,changed:!!h,groups:[{choices:M}]},So({view:e,field:o,labels:a,locale:l,state:s,encoded:d})];if(g){let w=D=>()=>{let j=X(u,a.core),J=D?Vt(j,D,a):null;return{view:zt(e,o,D,{name:J??void 0}).view,note:{step:"group",field:j}}},I=D=>({id:`group-${D}`,text:a.units[D]??D,hint:a.unitHints[D]||void 0,checked:y?.by===D,closes:!0,change:w(D)});R.push({id:"group",title:a.groupTopic,kind:"menu",icon:"date",state:y?a.units[y.by]??y.by:a.groupNoneShort,changed:!!y,groups:[{title:a.groupTimeline,choices:W.timelineUnits.map(I)},{title:a.groupCyclic,choices:W.cyclicUnits.map(I)},{choices:[{id:"group-none",text:a.groupNone,checked:!y,closes:!0,change:w(null)}]}]})}else if(p==="number"){let w=y?.by==="bin"?y:null;R.push({id:"bins",title:a.bins,kind:"panel",icon:"number",state:w?L(a.binsState,{size:N(w.size),start:N(w.origin??0)}):a.off,changed:!!w})}let A=me(e,o,["top"])[0],F=A?.by??on(e,w=>r.get(w.toLowerCase()))[0];return R.push({id:"top",title:a.topN,kind:"panel",icon:"top",state:A?da(e,A,a,l):a.off,changed:!!A,searchExtra:an.map(w=>({id:`top-${w}`,text:L(a.topBadge,{count:w.toLocaleString(l)}),choice:{id:`top-${w}`,text:L(a.topBadge,{count:w.toLocaleString(l)}),checked:!!(A&&!A.bottom&&A.count===w),change:()=>({view:ko(e,o,{count:w,bottom:!1,by:F},A),note:{step:"top",field:m}})}}))}),R.push(mn(e,t,n,e[t].length,a,m,p)),R}var ua=/\d+/;function So({view:e,field:t,labels:n,locale:o,state:r,encoded:a}){let s={step:"filter",field:X(t,n.core)},i=la(e,t,r,n,o),d=a?yo(a,e,t):null,u=a?.timeZone??"UTC",m=g=>g.charAt(0).toLocaleUpperCase(o)+g.slice(1),p=d?.quick?g=>{let y=Number(ua.exec(g)?.[0]);if(!Number.isSafeInteger(y)||y<1)return[];let f=y>W.relativeMaxCount?[]:d.months?["year","month"]:["year"],N=me(e,t,["relative"])[0]?.anchor,v=Kt(a,Re(e,t)),b=f.map(S=>{let O=m(Bt({unit:S,count:y,anchor:N},n,o,u,void 0,v));return{id:`quick-${S}-${y}`,text:O,choice:{id:`quick-${S}-${y}`,text:O,change:()=>({view:Eo(e,t,{unit:S,count:y,anchor:N}),note:s})}}});return d.item==="group"&&y>=1e3&&y<=9999&&e.derived.some(S=>S.name.toLowerCase()===t.toLowerCase()&&S.by==="year")?[...[">=","<=","<",">"].map(S=>{let O={field:t,type:"compare",op:S,value:y},M=m(L(n.compareShort[S],{value:String(y)}));return{id:`compare-${S}-${y}`,text:M,choice:{id:`compare-${S}-${y}`,text:M,change:()=>({view:ze(e,t,null,O),note:s})}}}),...b]:b}:void 0;return{id:"filter",title:n.filterTopic,kind:"panel",icon:"filter",state:i??n.filterAll,changed:i!==null,keywords:n.filterKeywords,searchExtra:[{id:"open-filter-rules",text:n.rulesTitle,focus:"conditions"},{id:"open-filter-text",text:n.addRuleName,focus:"conditions"},{id:"open-filter-value",text:n.addRuleTotal,focus:"conditions"}],searchFor:p}}function ma({view:e,index:t,field:n,types:o,labels:r,locale:a,state:l,encoded:s}){let i=o.get(Re(e,n).toLowerCase());return[So({view:e,field:n,labels:r,locale:a,state:l,encoded:s}),mn(e,"filters",t,mt(e).length,r,X(n,r.core),i)]}function da(e,t,n,o){let r=t.by??(e.values?.[0]?{field:e.values[0].field??null,agg:e.values[0].agg}:null);return`${L(t.bottom?n.bottomBadge:n.topBadge,{count:t.count.toLocaleString(o)})} ${L(n.by,{value:Ue(e,r,n)})}`}function pa(e,t,n){if(Object.hasOwn(t.formats,e))return t.formats[e];let o=/^number:(\d+)$/.exec(e);if(o)return G(t.formatDecimals,Number(o[1]),{lang:t.lang,locale:n});let r=e.split(":")[0];return Object.hasOwn(t.formats,r)?t.formats[r]:e}function fa({view:e,index:t,types:n,labels:o,locale:r,defaultsOf:a,earlier:l}){let s=e.values[t],i=s.field?n.get(s.field.toLowerCase())??"string":"number",d=s.field?a?.(s.field):void 0,u=Xe(s,o),m=N=>()=>({view:tn(e,t,N,{defaults:d}),note:{step:"value",field:u}}),p=s.field?bn(i):["count"],g=N=>({id:`agg-${N}`,text:o.core.aggregators[N]??N,checked:s.agg===N,closes:!0,change:m({agg:N})}),y=p.filter(N=>!W.commonAggregators.includes(N)),f=[{id:"summarize",title:o.aggregation,kind:"menu",icon:"sigma",state:o.core.aggregators[s.agg]??s.agg,groups:[{choices:W.commonAggregators.filter(N=>p.includes(N)).map(g)},...y.length?[{title:o.moreStatistics,choices:y.map(g)}]:[]]}];if(Ht(s,i)){let N=h=>{let R=o.showAsNames[h]??h;return{id:`showas-${h}`,text:R,keywords:R.includes("%")?o.showAsKeywords:void 0,checked:s.showAs?.type===h,change:m({showAs:{type:h,axis:s.showAs?.axis??"rows"}})}},v=s.showAs&&W.showAsAlongAxis.includes(s.showAs.type)?s.showAs:null;f.push({id:"showAs",title:o.showAs,kind:"menu",info:"showAs",icon:"table",state:s.showAs?o.showAsNames[s.showAs.type]??s.showAs.type:o.showAsNone,changed:!!s.showAs,groups:[{choices:[{id:"showas-none",text:o.showAsNone,checked:!s.showAs,change:m({showAs:null})},...lo.map(N)]},{title:o.moreCalculations,choices:W.showAs.filter(h=>!lo.includes(h)).map(N)},...v?[{title:o.along,choices:["rows","cols"].map(h=>({id:`along-${h}`,text:o.zones[h],checked:v.axis===h,change:m({showAs:{...v,axis:h}})}))}]:[]]});let b=h=>Be(h,{locale:r})(Object.hasOwn(io,h)?io[h]:1234.5),C=h=>({id:`format-${h}`,text:o.formats[h]??h,hint:b(h),checked:s.format===h,change:m({format:h})}),x=s.format?pa(s.format,o,r):o.formatAuto,S=!s.format||ro.includes(s.format)||so.includes(s.format);f.push({id:"format",title:o.format,kind:"menu",icon:"number",state:x,changed:!!s.format&&s.format!==d?.format,groups:[{choices:[...S?[]:[{id:"format-current",text:x,checked:!0,change:m({format:s.format})}],{id:"format-auto",text:o.formatAuto,checked:!s.format,change:m({format:null})},...ro.map(C)]},{title:o.moreFormats,choices:so.map(C)}]});let O=h=>{let R=A=>A.agg===s.agg&&(A.field??null)===(s.field??null);for(let A of[e,...[...l?.()??[]].reverse()]){let F=(A.values??[]).find(R)?.conditional;if(F?.type===h)return F}return h==="colorScale"?{type:h}:{type:h,color:null}},M=(h,R,A)=>{let F=(s.conditional?.type??null)===A;return{id:h,text:R,checked:F,change:F?()=>null:m({conditional:A?O(A):null})}};f.push({id:"highlight",title:o.conditional,kind:"segmented",icon:"sparkle",changed:!!s.conditional,groups:[{choices:[M("cond-none",o.conditionalNone,null),M("cond-colorScale",o.colorScale,"colorScale"),M("cond-dataBar",o.dataBar,"dataBar")]}]})}return f.push({id:"name",title:o.rename,kind:"panel",icon:"text",state:u,changed:!!s.label,keywords:o.nameKeywords}),f.push(mn(e,"values",t,e.values.length,o,u,i)),f}function ha({view:e,labels:t,folding:n,tips:o,explanations:r,act:a}){let l=[];return o.controls&&l.push({id:"show-tips",text:t.showTips,checkbox:!0,checked:o.on,run:()=>a.tipsOn(!o.on)}),r&&l.push({id:"show-explanations",text:t.showSettingInfo,checkbox:!0,checked:r.on,run:()=>a.explain(!r.on)}),o.controls&&l.push({id:"reset-tips",text:t.resetTips,icon:"reset",disabled:!o.canReset,run:a.resetTips}),[{id:"totals",title:t.totals,kind:"inline",titled:!0,groups:[{choices:ra.map(s=>{let i=sa(e,s);return{id:`total-${s}`,text:t[s],checkbox:!0,checked:e.totals[s],disabled:i!==null,reason:i?t[i]:void 0,info:s,run:()=>a.total(s,!e.totals[s])}})}]},{id:"rows",title:t.zones.rows,kind:"inline",titled:!0,groups:[{choices:[{id:"expand-all",text:t.expandAll,icon:"plus",closes:!0,disabled:!n.canExpand,reason:n.why.expand?t[n.why.expand]:void 0,run:a.expand},{id:"collapse-all",text:t.collapseAll,icon:"chevronRight",closes:!0,disabled:!n.canCollapse,reason:n.why.collapse?t[n.why.collapse]:void 0,run:a.collapse}]}]},{id:"help",title:t.help,kind:"inline",titled:!0,groups:[{choices:l}]},{id:"shortcuts",title:t.shortcutsTitle,kind:"panel",icon:"info"}]}function ga(e){let t=new Map;return e.map(n=>{let o=`${n.scope}:${n.name}`;return t.set(o,(t.get(o)??0)+1),`entry:${o}:${t.get(o)}`})}var ka=(e,t)=>e[t+1]??e[t-1];function ya(e,t=""){return e.flatMap(n=>{if(n.hidden)return[];let r=[...t&&n.searchFor?n.searchFor(t):[],...n.searchExtra??[]].map(a=>({id:a.id,text:a.text,path:n.title,topic:n,choice:a.choice,focus:a.focus}));return n.kind==="panel"?[{id:`open-${n.id}`,text:n.title,path:"",topic:n},...r]:(n.groups??[]).flatMap(a=>a.choices.map(l=>({id:l.id,text:l.text,path:[n.title,a.title].filter(Boolean).join(" \u203A "),topic:n,choice:l})))})}var va=8;function wa(e,t,n){let o=i=>i.toLocaleLowerCase(n),r=o(t).split(/\s+/).filter(Boolean);if(!r.length)return[];let a=e.filter(i=>{let d=o(`${i.text} ${i.path} ${i.topic.keywords??""} ${i.choice?.keywords??""}`);return r.every(u=>d.includes(u))}),l=i=>o(i.choice?.keywords??"").split(/\s+/).includes(r[0]),s=i=>l(i)?0:o(i.text).startsWith(r[0])?1:2;return[0,1,2].flatMap(i=>a.filter(d=>s(d)===i)).slice(0,va)}var Co=(e,t,n,o)=>`${e}${t?`, ${t}`:""}${n?o:""}`;function Ea(e,t,n){if(n===0)return null;switch(e){case"ArrowDown":return(t+1)%n;case"ArrowUp":return t<=0?n-1:t-1;case"Home":return 0;case"End":return n-1;default:return null}}function ba(e,t,n,o){let r=n.toLocaleLowerCase(o),a=n.length>1?t:t+1;for(let l=0;l<e.length;l++){let s=(Math.max(0,a)+l)%e.length;if(e[s].trim().toLocaleLowerCase(o).startsWith(r))return s}return null}var gt='[role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"]';function ft(e){return[...e.querySelectorAll(gt)].filter(t=>t.closest('[role="menu"]')===e&&t.getClientRects().length>0)}function Na(e){let t=e.closest(".pk-popover")?.id;return t?Vn(e)?.querySelector(`[aria-controls="${CSS.escape(t)}"]`)??null:null}function xa(e,t){if(e.key!=="Tab"||e.shiftKey)return!1;let n=Na(e.target);return n?n.focus({preventScroll:!0}):e.preventDefault(),t(),!0}function rn({label:e,labelledBy:t,className:n,close:o,children:r,testId:a}){let l=(0,E.useRef)(null),s=(0,E.useRef)(null),i=(0,E.useRef)({text:"",at:0});(0,E.useLayoutEffect)(()=>{let m=l.current;if(!m)return;let p=ft(m),g=p.find(y=>y.dataset.pkItem===s.current)??p.find(y=>y.hasAttribute("data-pk-start"))??p[0];for(let y of p)y.tabIndex=y===g?0:-1});let d=m=>{let p=m.target.closest?.(gt);if(p&&l.current&&p.closest('[role="menu"]')===l.current){s.current=p.dataset.pkItem??null;for(let g of ft(l.current))g.tabIndex=g===p?0:-1}},u=m=>{let p=l.current;if(!p||m.target.closest('[role="menu"]')!==p||m.altKey||m.ctrlKey||m.metaKey||xa(m,o))return;let g=ft(p),y=g.indexOf(ct(p)),f=C=>{C!==null&&g[C]&&(m.preventDefault(),m.stopPropagation(),g[C].focus())},N=m.target.closest("[data-pk-seg]");if(N&&(m.key==="ArrowLeft"||m.key==="ArrowRight")){let C=ft(p).filter(S=>N.contains(S)),x=C.indexOf(m.target)+(m.key==="ArrowRight"?1:-1);x>=0&&x<C.length?(m.preventDefault(),m.stopPropagation(),C[x].focus()):m.key==="ArrowRight"&&(m.preventDefault(),m.stopPropagation());return}let v=m.target.closest("[data-pk-level]");if(v&&(m.key==="ArrowRight"||m.key==="Enter"||m.key===" ")){m.preventDefault(),m.stopPropagation(),v.click();return}let b=Ea(m.key,y,g.length);if(b!==null){f(b);return}if(m.key.length===1&&m.key!==" "){let C=Date.now();i.current={text:C-i.current.at<600?i.current.text+m.key:m.key,at:C},f(ba(g.map(x=>x.dataset.pkText??x.textContent??""),y,i.current.text))}};return E.default.createElement("div",{ref:l,role:"menu","aria-label":e,"aria-labelledby":t,className:`pk-level-menu${n?` ${n}`:""}`,onKeyDown:u,onFocus:d,"data-testid":a},r)}function wt({id:e,text:t,onSelect:n,checked:o,checkbox:r,hint:a,icon:l,danger:s,testId:i,start:d,plain:u,label:m,className:p,disabled:g,reason:y,haspopup:f,level:N,description:v,current:b,children:C}){let x=o===void 0?"menuitem":r?"menuitemcheckbox":"menuitemradio",S=(0,E.useId)(),O=[g&&y?S:null,v?`${S}-d`:null].filter(Boolean).join(" ")||void 0;return E.default.createElement("button",{type:"button",role:x,"aria-checked":o===void 0?void 0:o,"aria-label":m,"aria-haspopup":f,"aria-disabled":g||void 0,"aria-describedby":O,"aria-current":b?"true":void 0,tabIndex:-1,className:`pk-option${o?" pk-checked":""}${s?" pk-danger":""}${g?" pk-disabled":""}${p?` ${p}`:""}`,"data-pk-option":"","data-pk-item":e,"data-pk-text":u??(typeof t=="string"?t:void 0),"data-pk-start":d?"":void 0,"data-pk-level":N,"data-testid":i??e,onClick:g?void 0:n},E.default.createElement("span",{className:"pk-option-icon"},o||b?E.default.createElement(Z,{name:"check"}):l?E.default.createElement(Z,{name:l}):null),E.default.createElement("span",{className:"pk-option-text"},t,g&&y?E.default.createElement("span",{id:S,className:"pk-option-hint","data-testid":`${i??e}-reason`},y):null),a?E.default.createElement("span",{className:"pk-item-hint"},a):null,v?E.default.createElement("span",{id:`${S}-d`,hidden:!0},v):null,C)}function To({choice:e,onPick:t,start:n}){let{explain:o,labels:r}=(0,E.useContext)(et),a=e.info&&o&&r?.settingInfo&&Object.hasOwn(r.settingInfo,e.info)?r.settingInfo[e.info]:null,l=E.default.createElement(wt,{id:e.id,testId:e.testId,text:e.text,hint:e.hint,icon:e.icon,checked:e.checked,checkbox:e.checkbox,current:e.current,disabled:e.disabled,reason:e.reason,description:a,start:n,haspopup:e.open?"dialog":void 0,className:e.open?"pk-topic-row":void 0,onSelect:()=>t(e)},e.open?E.default.createElement(Z,{name:"chevronRight",size:16,className:"pk-topic-chevron"}):null);return!a&&!e.actions?.length?l:E.default.createElement("div",{role:"none",className:"pk-setting-row"},l,(e.actions??[]).map(s=>E.default.createElement("button",{key:s.id,type:"button",role:"menuitem",tabIndex:-1,className:"pk-icon-btn","aria-label":s.label,title:s.label,"aria-haspopup":s.open?"dialog":void 0,"data-pk-item":s.id,"data-pk-text":s.label,"data-testid":s.testId??s.id,onClick:()=>t(s)},E.default.createElement(Z,{name:s.icon}))),a?E.default.createElement("span",{"aria-hidden":"true"},E.default.createElement(_e,{id:e.info,name:e.text,tabIndex:-1})):null)}function Sa({topic:e,labels:t,onOpen:n}){return E.default.createElement(wt,{id:`topic-${e.id}`,level:e.id,text:e.title,plain:e.title,icon:e.icon,label:Co(e.title,e.state,e.changed,t.sectionChanged),haspopup:e.kind==="menu"?"menu":"dialog",className:"pk-topic-row",onSelect:n},e.state?E.default.createElement("span",{className:"pk-topic-state","data-testid":`topic-state-${e.id}`},e.changed?E.default.createElement("span",{className:"pk-section-mark","aria-hidden":"true"},"\u25CF "):null,E.default.createElement("span",{className:"pk-badge-cut"},e.state)):null,E.default.createElement(Z,{name:"chevronRight",size:16,className:"pk-topic-chevron"}))}function Ca({topic:e,onPick:t}){let n=(0,E.useId)(),o=(e.groups??[]).map((r,a)=>{let l=r.choices.map(s=>E.default.createElement(To,{key:s.id,choice:s,start:s.checked,onPick:t}));return r.title?E.default.createElement(E.default.Fragment,{key:a},E.default.createElement("div",{className:"pk-subtitle",id:`${n}-${a}`,role:"presentation"},r.title),E.default.createElement("div",{role:"group","aria-labelledby":`${n}-${a}`},l)):E.default.createElement("div",{key:a,role:"group","aria-label":e.title},l)});return E.default.createElement(E.default.Fragment,null,o,e.note?E.default.createElement("p",{className:"pk-hint pk-menu-hint",role:"none","data-testid":e.noteId},e.note):null)}function Ta({topic:e,labels:t,onPick:n,onOpen:o}){let r=(0,E.useId)();if(e.hidden)return null;if(e.kind==="menu"||e.kind==="panel"){let l=E.default.createElement(Sa,{topic:e,labels:t,onOpen:o});return e.heading?E.default.createElement(E.default.Fragment,null,E.default.createElement("div",{className:"pk-subtitle",id:r,role:"presentation","data-testid":`topic-title-${e.id}`},e.heading),E.default.createElement("div",{role:"group","aria-labelledby":r},l)):l}let a=e.groups?.[0]?.choices??[];return e.kind==="segmented"?E.default.createElement("div",{role:"group","aria-label":Co(e.title,e.state,e.changed,t.sectionChanged),className:"pk-topic-seg","data-pk-seg":"","data-testid":`topic-${e.id}`},E.default.createElement("span",{className:"pk-topic-seg-title","aria-hidden":"true"},E.default.createElement("span",{className:"pk-option-icon"},e.icon?E.default.createElement(Z,{name:e.icon}):null),e.title,e.changed&&!e.state?E.default.createElement("span",{className:"pk-section-mark"}," \u25CF"):null),e.state?E.default.createElement("span",{className:"pk-topic-state pk-topic-seg-state","data-testid":`topic-state-${e.id}`},e.changed?E.default.createElement("span",{className:"pk-section-mark","aria-hidden":"true"},"\u25CF "):null,E.default.createElement("span",{className:"pk-badge-cut"},e.state)):null,E.default.createElement("span",{className:"pk-segmented pk-small"},a.map(l=>E.default.createElement("button",{key:l.id,type:"button",role:"menuitemradio","aria-checked":!!l.checked,tabIndex:-1,"data-pk-option":"","data-pk-item":l.id,"data-pk-text":l.text,"data-testid":l.id,onClick:()=>n(l)},l.text)))):E.default.createElement(E.default.Fragment,null,e.titled?E.default.createElement("div",{className:"pk-subtitle",id:r,role:"presentation","data-testid":`topic-title-${e.id}`},e.title):null,E.default.createElement("div",{role:"group","aria-label":e.titled?void 0:e.title,"aria-labelledby":e.titled?r:void 0,"data-testid":`topic-${e.id}`},a.map(l=>E.default.createElement(To,{key:l.id,choice:l,onPick:n}))),e.note?E.default.createElement("p",{className:"pk-hint pk-menu-hint",role:"none","data-testid":e.noteId},e.note):null)}function La({hits:e,labels:t,onPick:n,onOpen:o,close:r}){return e.length?E.default.createElement(rn,{label:t.searchResults,close:r,testId:"menu-search-hits"},e.map(a=>E.default.createElement(wt,{key:a.id,id:`hit-${a.id}`,text:a.choice?a.text:`${a.text}\u2026`,plain:a.text,checked:a.choice?.checked,icon:a.choice?a.topic.icon:"chevronRight",hint:a.path||void 0,haspopup:a.choice?void 0:"dialog",onSelect:()=>a.choice?n(a.choice):o(a.topic.id,void 0,a.focus)}))):E.default.createElement("p",{className:"pk-hint pk-level-nothing",role:"status","data-testid":"menu-search-nothing"},t.searchNothing)}function nt({name:e,labels:t,topics:n,close:o,onPick:r,panel:a,head:l,foot:s,search:i=!1,locale:d,focusAgain:u}){let[m,p]=(0,E.useState)({stack:[],focus:null}),g=m.stack.length?m.stack[m.stack.length-1].level:null,[y,f]=(0,E.useState)(""),N=(0,E.useRef)(null),v=(0,E.useId)(),b=g?n.find(h=>h.id===g)??null:null;(0,E.useLayoutEffect)(()=>{let h=N.current,R=m.focus;if(!h||!R)return;let A=R.indexOf(":"),[F,w]=[R.slice(0,A),R.slice(A+1)],I=R==="level"?h.querySelector(".pk-level-body [data-autofocus]")??h.querySelector('.pk-level-body [role="menuitemradio"][aria-checked="true"]')??h.querySelector(".pk-level-body :is(button, input, select):not([disabled])")??h.querySelector(".pk-level-back"):R==="search"?h.querySelector(".pk-level-search input"):h.querySelector(F==="row"?`[data-pk-level="${CSS.escape(w)}"]`:`[data-pk-item="${CSS.escape(w)}"]`)??h.querySelector(gt);I?.focus({preventScroll:!0}),I?.scrollIntoView?.({block:"nearest"})},[m,u]);let C=(h,R=`row:${h}`,A=void 0)=>{f(""),p({stack:[...m.stack,{level:h,from:R,hint:A}],focus:"level"})},x=(h=void 0)=>{let R=m.stack[m.stack.length-1];p({stack:m.stack.slice(0,-1),focus:h??R?.from??null})},S=h=>{if(h.open){h.run?.(),C(h.open,h.backTo??`item:${h.id}`);return}h.closes||(p({stack:[],focus:y?"search":m.stack.length?m.stack[0].from:`item:${h.id}`}),f("")),r(h)},O=h=>{if(h.defaultPrevented)return;let R=h.target,A=R.matches("input:not([type=checkbox], [type=radio]), textarea, select");if(h.key==="/"&&i&&!g&&!A){h.preventDefault(),N.current?.querySelector(".pk-level-search input")?.focus();return}g&&(h.key==="Escape"||h.key==="ArrowLeft"&&!A&&!R.closest("[data-pk-seg], .pk-segmented"))&&(h.preventDefault(),h.stopPropagation(),x())},M=()=>{let h=i&&y.trim()?wa(ya(n,y),y,d):null;return E.default.createElement(E.default.Fragment,null,l,i?E.default.createElement("label",{className:"pk-search pk-level-search"},E.default.createElement(Z,{name:"search"}),E.default.createElement("span",{className:"pk-sr"},L(t.searchMenu,{name:e})),E.default.createElement(ke,{type:"search",value:y,placeholder:t.searchMenuShort,onChange:f,clearLabel:t.clearText,"aria-label":L(t.searchMenu,{name:e}),autoComplete:"off","data-testid":"menu-search",onKeyDown:R=>{R.key==="ArrowDown"?(R.preventDefault(),N.current?.querySelector(`.pk-level-first ${gt}`)?.focus()):R.key==="Enter"&&R.preventDefault()}})):null,E.default.createElement("div",{className:"pk-level-first"},h?E.default.createElement(La,{hits:h,labels:t,onPick:S,onOpen:C,close:o}):E.default.createElement(rn,{label:e,close:o,testId:"level-first"},n.map(R=>E.default.createElement(Ta,{key:R.id,topic:R,labels:t,onPick:S,onOpen:()=>C(R.id)})),s?E.default.createElement(E.default.Fragment,null,E.default.createElement("div",{role:"separator",className:"pk-level-sep"}),s):null)))};return E.default.createElement("div",{ref:N,className:"pk-levels",onKeyDown:O,"data-level":g??""},b?E.default.createElement(E.default.Fragment,null,E.default.createElement("div",{className:"pk-level-head"},E.default.createElement("button",{type:"button",className:"pk-link pk-level-back",onClick:()=>x(),"aria-label":L(t.backTo,{name:e}),"data-testid":"level-back"},E.default.createElement(Z,{name:"chevronRight",size:16,className:"pk-flip"}),t.back),E.default.createElement("h3",{id:v,className:"pk-level-title","data-testid":"level-title"},L(t.levelTitle,{name:e,topic:b.levelTitle??b.title})),b.info?E.default.createElement(_e,{id:b.info,name:b.title}):null),E.default.createElement("div",{className:"pk-level-body","data-testid":`level-${b.id}`},b.kind==="menu"?E.default.createElement(rn,{labelledBy:v,close:o},E.default.createElement(Ca,{topic:b,onPick:S})):E.default.createElement("div",{role:"group","aria-labelledby":v,className:"pk-level-panel"},a(b.id,x,m.stack[m.stack.length-1]?.hint)))):M())}function ot(e=450){let t=(0,E.useRef)(null),n=(0,E.useRef)(null),o=()=>{t.current&&clearTimeout(t.current),t.current=null,n.current=null},r=()=>{let l=n.current;o(),l?.()},a=(0,E.useRef)(r);return(0,E.useEffect)(()=>{a.current=r}),(0,E.useEffect)(()=>()=>a.current(),[]),{later:l=>{o(),n.current=l,t.current=setTimeout(r,e)},now:r,cancel:o}}function Lo(e,t,n=450){let[o,r]=(0,E.useState)(e),[a,l]=(0,E.useState)(e);e!==a&&(l(e),o===a&&r(e));let s=(0,E.useRef)({text:o,seen:a,apply:t});(0,E.useEffect)(()=>{s.current={...s.current,seen:a,apply:t}});let i=ot(n),d=()=>{i.cancel(),s.current.text!==s.current.seen&&(s.current.seen=s.current.text,s.current.apply(s.current.text))},u=(0,E.useRef)(d);return(0,E.useEffect)(()=>{u.current=d}),(0,E.useEffect)(()=>()=>u.current(),[]),{text:o,set:m=>{s.current.text=m,r(m),n>0&&i.later(d)},flush:d,restore:()=>(i.cancel(),s.current.text===s.current.seen?!1:(s.current.text=s.current.seen,r(s.current.seen),!0))}}var co=new Map;function Oa(e){let t=co.get(e);if(!t){let n;try{n=new Intl.NumberFormat(e).formatToParts(12345.6)}catch{n=new Intl.NumberFormat("en-US").formatToParts(12345.6)}t={decimal:n.find(o=>o.type==="decimal")?.value??".",group:n.find(o=>o.type==="group")?.value??","},co.set(e,t)}return t}var uo=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Aa=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i;function kt(e,t){let n=String(e??"").replace(/[\s\u00a0\u202f]/g,"").replace(/\u2212/g,"-");if(n==="")return null;let{decimal:o,group:r}=Oa(t),a=/[\s\u00a0\u202f]/.test(r)?"":uo(r),l=uo(o),s=a?`\\d{1,3}(?:${a}\\d{3})+`:"(?!)",d=new RegExp(`^([+-]?)(${s}|\\d+)?(?:${l}(\\d+))?$`).exec(n);if(d&&(d[2]!==void 0||d[3]!==void 0)){let u=(d[2]??"0").split(r).join(""),m=+`${d[1]}${u}${d[3]!==void 0?`.${d[3]}`:""}`;return Number.isFinite(m)?m:null}if(Aa.test(n)){let u=Number(n);return Number.isFinite(u)?u:null}return null}function le(e,t){if(typeof e!="number"||!Number.isFinite(e))return"";try{return e.toLocaleString(t,{useGrouping:!1,maximumFractionDigits:20})}catch{return String(e)}}function we(e,{kind:t="number",required:n=!0,tried:o=!1,max:r,labels:a,locale:l}){let s=kt(e,l);if(r!==void 0&&s!==null&&Number.isInteger(s)&&s>r)return{value:null,problem:L(a.countMax,{max:r.toLocaleString(l)})};let i=s!==null&&(t==="number"||(t==="size"?s>0:Number.isInteger(s)&&s>=1)),d=()=>t==="count"?a.countInvalid:L(t==="size"?a.sizeInvalid:a.numberInvalid,{example:(t==="size"?.5:1234.5).toLocaleString(l)});return e.trim()===""?{value:null,problem:n&&o?d():null}:i?{value:s,problem:null}:{value:null,problem:d()}}function We({value:e,onChange:t,problem:n,label:o,testId:r,className:a="pk-field-label",shown:l,shownClass:s,onKeyDown:i,onBlur:d,onFocus:u,autoFocus:m}){let p=(0,oe.useId)();return oe.default.createElement(oe.default.Fragment,null,oe.default.createElement("label",{className:a},l?oe.default.createElement("span",{className:s},l):oe.default.createElement("span",{className:"pk-sr"},o),oe.default.createElement("input",{type:"text",inputMode:"decimal",autoComplete:"off",spellCheck:!1,value:e,onChange:g=>t(g.target.value),onKeyDown:i,onBlur:d,onFocus:u,"aria-label":o,"aria-invalid":n?!0:void 0,"aria-describedby":n?p:void 0,"data-autofocus":m?"":void 0,"data-testid":r})),n?oe.default.createElement("p",{id:p,className:"pk-form-problem","data-testid":`${r}-problem`},n):null)}var Ge=({now:e,restore:t,back:n})=>o=>{o.key==="Enter"?(o.preventDefault(),e()):o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t()||n())};function Oo({choices:e,names:t,index:n,onChange:o,label:r,prefix:a,testId:l}){return e.length<2?oe.default.createElement("span",{className:"pk-by","data-testid":l},a?`${a} ${t[0]}`:t[0]):oe.default.createElement("label",{className:"pk-field-label pk-by-pick"},a?oe.default.createElement("span",null,a):oe.default.createElement("span",{className:"pk-sr"},r),oe.default.createElement("select",{value:n,onChange:s=>o(Number(s.target.value)),"aria-label":r,"data-testid":l},e.map((s,i)=>oe.default.createElement("option",{key:`${s.field}:${s.agg}`,value:i},t[i]))))}var Ao=(e,t)=>Math.max(0,e.findIndex(n=>Je(n,t)));function Et(e,t,n,o){let r=bo(on(e,a=>t.get(a.toLowerCase())),o);return{choices:r,names:r.map(a=>Ue(e,a,n))}}var Ve=e=>e==="between"||e==="notBetween",Ia=(e,t)=>e.charAt(0).toLocaleUpperCase(t)+e.slice(1),mo=e=>JSON.stringify(e,(t,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).sort(([o],[r])=>o<r?-1:1)):n),$a=e=>e.type==="value"?"total":e.type==="label"?"name":"item",ht=Object.freeze({year:10,month:24,day:90}),Ra=13,Fa=864e5;function Da(e,t){let n=e.unit,o=n===null?e.item==="number"?"value":e.item==="date"?"date":"item":n==="bin"?"range":n==="day"?"day":n.replace(/^year(.)/,(r,a)=>a.toLowerCase());return Object.hasOwn(t.nouns,o)?t.nouns[o]:t.nouns.item}function Ma(e,t,n){let o=Date.parse(`${e.from}T00:00Z`),r=Date.parse(`${e.to}T00:00Z`)+Fa,a=0;return t.dict.forEach((l,s)=>{typeof l=="number"&&l>=o&&l<r&&(a+=n[s])}),a}function Ba(e){let t=new Float64Array(e.dict.length);for(let n=0;n<e.codes.length;n++)e.codes[n]>=0&&t[e.codes[n]]++;return t}function Pa(e,t){let n=new Map;return e.dict.forEach((o,r)=>{if(typeof o=="number"){let a=new Date(o).getUTCFullYear();n.set(a,(n.get(a)??0)+t[r])}}),[...n.entries()].sort((o,r)=>o[0]-r[0]).map(([o,r])=>({year:o,rows:r}))}function Va({out:e,row:t,searching:n,labels:o,locale:r}){let[a,l]=(0,c.useState)(!1),s=(0,c.useId)(),i=a||n,d=(0,c.useRef)(null);return(0,c.useEffect)(()=>{a&&d.current?.firstElementChild?.scrollIntoView?.({block:"nearest"})},[a]),c.default.createElement("li",{className:"pk-values-tail"},c.default.createElement("button",{type:"button",className:"pk-tail-toggle","aria-expanded":i,"aria-controls":s,onClick:()=>l(!i),"data-testid":"tail-toggle"},c.default.createElement(Z,{name:i?"chevronDown":"chevronRight",size:14}),c.default.createElement("span",null,L(G(o.tailOut,e.length,{lang:o.lang,locale:r}),{count:e.length.toLocaleString(r)}))),i?c.default.createElement("ul",{ref:d,id:s,role:"list",className:"pk-tail-list","data-testid":"tail-list"},e.slice(0,un).map(t)):null)}function Zt({id:e,title:t,state:n,open:o,onToggle:r,action:a,children:l}){let s=(0,c.useId)();return c.default.createElement("section",{className:"pk-fsection","data-testid":`fsection-${e}`},c.default.createElement("div",{className:"pk-fsection-head"},c.default.createElement("button",{type:"button",className:"pk-fsection-toggle","aria-expanded":o,"aria-controls":s,onClick:r,"data-testid":`section-${e}`},c.default.createElement(Z,{name:o?"chevronDown":"chevronRight",size:16}),c.default.createElement("span",{className:"pk-fsection-title"},t),n?c.default.createElement("span",{className:"pk-fsection-state"},n):null),a),o?c.default.createElement("div",{className:"pk-fsection-body",id:s,"data-testid":`${e}-body`},l):null)}function ja({ctx:e,state:t}){let{labels:n,locale:o,view:r,field:a}=e,{shown:l,total:s,noun:i,unpicked:d,byQuick:u,byRules:m,byTotals:p,rows:g,rowsAll:y,span:f,yearsText:N,empty:v,quickWords:b}=t,C=h=>h.toLocaleString(o),x={lang:n.lang,locale:o},S=l===0?n.summaryNone:l===s?L(n.summaryAll,{total:C(s),noun:G(i,s,x)}):L(n.summarySome,{shown:C(l),total:C(s),noun:G(i,s,x)}),O=[];l===0&&v?O.push(v):(d&&O.push(L(n.summaryPicks,{count:C(d)})),u&&O.push(L(n.summaryQuick,{count:C(u),quick:b})),m&&O.push(L(G(n.summaryRules,t.itemRules,x),{items:C(m)})),p&&O.push(L(G(n.summaryTotals,t.totalRules,x),{items:C(p)})));let M=[L(n.summaryRows,{rows:C(g),total:C(y)})];return f&&M.push(L(n.summaryData,{range:`${ge(Se(f.min),o)} \u2013 ${ge(Se(f.max),o)}`})),N&&M.push(N),c.default.createElement("div",{className:"pk-filter-summary"},c.default.createElement("div",{className:`pk-summary-card${l===0?" pk-summary-empty":""}`,role:"status","data-testid":"filter-summary"},c.default.createElement("p",{className:"pk-summary-head","data-testid":"filter-summary-head"},S),c.default.createElement("p",{className:"pk-summary-why","data-testid":"filter-summary-why"},O.length?O.join(" \xB7 "):t.rules?n.summaryKept:b?L(n.summaryQuickOnly,{quick:b}):n.summaryOk),c.default.createElement("p",{className:"pk-summary-meta","data-testid":"filter-summary-meta"},M.join(" \xB7 ")),c.default.createElement("button",{type:"button",className:"pk-action pk-summary-reset",disabled:!t.canReset,onClick:()=>e.act(oa(r,a),"section-picks"),"data-testid":"filter-reset"},n.resetFilter)))}function qa({ctx:e,quick:t,anchor:n,setAnchorLocal:o,span:r,column:a,counts:l}){let{view:s,field:i,labels:d,locale:u,fk:m,timeZone:p,commit:g,note:y,back:f}=e,N={lang:d.lang,locale:u},v=r.max,b=Se(v),[C]=(0,c.useState)(()=>Date.now()),x=(B,K)=>Dt({unit:B,count:K,anchor:n},p,C,v),S=B=>{for(let K=1;K<=ht[B];K++){let H=x(B,K);if(H&&H.from<=b)return K}return null},O=(0,c.useMemo)(()=>({year:Math.max(2,S("year")??ht.year),month:S("month")??ht.month,day:S("day")??ht.day}),[n,v,p]),M={year:t.id==="years"?t.count:O.year,month:t.id==="months"?t.count:O.month,day:t.id==="days"?t.count:O.day},[h,R]=(0,c.useState)(()=>Object.fromEntries(Object.entries(M).map(([B,K])=>[B,le(K,u)]))),[A,F]=(0,c.useState)(null),w=`${t.id}:${t.count??""}:${n}`,[I,D]=(0,c.useState)(w);if(w!==I){D(w);let B={...h};for(let K of W.relativeUnits)K!==A&&(B[K]=le(M[K],u));R(B)}let j=ot(),J=(0,c.useId)(),z=B=>g(Eo(s,i,B?{...B,anchor:n}:null),y),te=(B,K,H)=>{let ee=Mn(B,K,r,u);if(ee?.none)return null;let se=ee?`${ee.data} `:Mt(B,K,u),Ne=ee?L(G(d.noData,ee.count,N),{range:ee.missing.join(", ")}):null;return c.default.createElement("span",{className:"pk-quick-sub",id:q(H)},c.default.createElement("span",null,se,Ne?c.default.createElement("span",{className:"pk-quick-missing"},"(",Ne,")"):null),c.default.createElement("span",{className:"pk-quick-rows"},L(d.quickRows,{rows:Ma(B,a,l).toLocaleString(u)})))},q=B=>`${J}-${B}`,Y=(B,K,H,ee,se,Ne,Te=!!Ne)=>c.default.createElement("label",{className:"pk-radio pk-quick",key:B},c.default.createElement("input",{type:"radio",name:J,checked:K,onChange:H,"aria-label":ee,"aria-describedby":Te?q(B):void 0,"data-autofocus":K&&e.hint!=="conditions"?"":void 0,"data-testid":`quick-${B}`}),se,Ne),Q=[],Ee=[Y("all",t.id==="all"||t.id==="custom",()=>z(null),d.filterAll,c.default.createElement("span",null,d.filterAll),c.default.createElement("span",{className:"pk-quick-sub",id:q("all")},c.default.createElement("span",null,`${ge(Se(r.min),u)}\u2013${ge(b,u)}`),c.default.createElement("span",{className:"pk-quick-rows"},L(d.quickRows,{rows:a.codes.length.toLocaleString(u)}))))],de=x("year",1),ie=Ia(d.relative.year,u);de&&te(de,"year","thisYear")?Ee.push(Y("thisYear",t.id==="thisYear",()=>z({unit:"year",count:1}),ie,c.default.createElement("span",null,ie),te(de,"year","thisYear"))):de&&Q.push(`${ie} (${Mt(de,"year",u)})`);for(let B of["year","month","day"]){if(B==="month"&&!m.months||B==="day"&&!m.days)continue;let K=we(h[B],{kind:"count",max:W.relativeMaxCount,labels:d,locale:u}),H=K.value,ee=`${B}s`,se=H??M[B],Ne=Object.fromEntries(Object.entries(d.quickLast[B]).map(([xe,Oe])=>[xe,String(Oe).replace("{count}","{n}")])),Te=G(Ne,se,N),[bt,ue]=Te.split("{n}"),ae=x(B,se),je=ae?te(ae,B,ee):null;if(!je&&t.id!==ee){Q.push(L(Te,{n:se.toLocaleString(u)}));continue}let Le=()=>z({unit:B,count:se});Ee.push(c.default.createElement("div",{className:"pk-quick-row",key:B},Y(ee,t.id===ee,Le,L(Te,{n:se.toLocaleString(u)}),c.default.createElement("span",{"aria-hidden":"true"},bt),null,!!je),c.default.createElement(We,{value:h[B],onChange:xe=>{R({...h,[B]:xe}),j.later(()=>{let Oe=we(xe,{kind:"count",max:W.relativeMaxCount,labels:d,locale:u}).value;Oe!==null&&z({unit:B,count:Oe})})},onKeyDown:Ge({now:j.now,restore:()=>{j.cancel();let xe=le(M[B],u);return h[B]===xe?!1:(R({...h,[B]:xe}),!0)},back:f}),onBlur:()=>{F(null),j.now()},onFocus:()=>F(B),problem:K.problem,label:d.quickCount[B],testId:`quick-${ee}-count`,className:"pk-field-label pk-count-input"}),c.default.createElement("span",{"aria-hidden":"true"},ue),je))}let ne=new Date(Dt({unit:"day",count:1},p,C)?.from??Se(C)),be=m.months?Date.UTC(ne.getUTCFullYear(),ne.getUTCMonth(),1):Date.UTC(ne.getUTCFullYear(),0,1),pe=v<be,De=(0,c.useId)();return c.default.createElement(c.default.Fragment,null,c.default.createElement("div",{role:"radiogroup","aria-label":d.quickTitle,className:"pk-radios pk-quick-choices","data-testid":"quick-choices"},Ee),pe?c.default.createElement("div",{className:"pk-quick-anchor"},c.default.createElement("label",{htmlFor:De},d.anchorLabel),c.default.createElement("select",{id:De,value:n,onChange:B=>{let K=B.target.value;o(K),t.filters.length&&g(na(s,i,K),y)},"data-testid":"quick-anchor"},c.default.createElement("option",{value:"today"},L(d.anchorToday,{date:ge(Se(ne.getTime()),u)})),c.default.createElement("option",{value:"latest"},L(d.anchorLatest,{date:ge(b,u)})))):null,Q.length?c.default.createElement("p",{className:"pk-hint pk-quick-hidden","data-testid":"quick-hidden"},L(G(d.quickHidden,Q.length,N),{choices:Q.join(", "),latest:ge(b,u)})):null)}function Ua({ctx:e,years:t,on:n}){let{view:o,field:r,labels:a,locale:l,commit:s,note:i,noun:d}=e,u=t.map(p=>p.year),m=p=>{let g=n.includes(p)?n.filter(y=>y!==p):[...n,p].sort((y,f)=>y-f);s(ta(o,r,g,u),i)};return c.default.createElement(c.default.Fragment,null,c.default.createElement("p",{className:"pk-hint pk-years-hint"},L(a.yearsCombinedHint,{noun:G(d,1,{lang:a.lang,locale:l})})),c.default.createElement("div",{className:"pk-years",role:"group","aria-label":a.yearsCombined,"data-testid":"years-combined"},t.map(p=>{let g=n.includes(p.year);return c.default.createElement("button",{key:p.year,type:"button",className:"pk-year-chip","aria-pressed":g,disabled:g&&n.length===1,onClick:()=>m(p.year),"data-testid":`year-${p.year}`},g?c.default.createElement(Z,{name:"check",size:12}):null,c.default.createElement("span",null,String(p.year)),c.default.createElement("span",{className:"pk-quick-rows"},L(a.quickRows,{rows:p.rows.toLocaleString(l)})))})),n.length===1?c.default.createElement("p",{className:"pk-hint"},L(a.yearsCombinedOne,{year:String(n[0])})):null)}function Ja({items:e,value:t,onChange:n,label:o,testId:r,labels:a,locale:l}){let[s,i]=(0,c.useState)(!1),[d,u]=(0,c.useState)(""),[m,p]=(0,c.useState)(0),g=(0,c.useRef)(null),y=(0,c.useId)(),f=d.trim().toLocaleLowerCase(),N=f?e.filter(h=>h.label.toLocaleLowerCase().includes(f)):e,v=N.slice(0,un),b=e.find(h=>String(h.value)===t),C=()=>{u(""),p(Math.max(0,e.findIndex(h=>String(h.value)===t))),i(!0)},x=()=>i(!1),S=h=>{x(),n(String(h.value))},O=h=>`${y}-${h}`,M=h=>{h.key==="ArrowDown"||h.key==="ArrowUp"?(h.preventDefault(),p(R=>Math.min(v.length-1,Math.max(0,R+(h.key==="ArrowDown"?1:-1))))):h.key==="Enter"?(h.preventDefault(),v[m]&&S(v[m])):h.key==="Escape"&&(h.preventDefault(),h.stopPropagation(),x())};return c.default.createElement("span",{className:"pk-picker"},c.default.createElement("button",{ref:g,type:"button",className:"pk-picker-button","aria-haspopup":"listbox","aria-expanded":s,"aria-label":o,onClick:()=>s?x():C(),onKeyDown:h=>{!s&&(h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),C())},"data-testid":r},b?b.label:t||a.ruleValue),c.default.createElement(jt,{open:s,anchor:g,onClose:x,label:o,className:"pk-picker-pop"},c.default.createElement("input",{type:"search",role:"combobox",className:"pk-picker-search",value:d,onChange:h=>{u(h.target.value),p(0)},onKeyDown:M,"aria-label":a.pickerSearch,"aria-expanded":"true","aria-controls":y,"aria-activedescendant":v[m]?O(m):void 0,"aria-autocomplete":"list",autoComplete:"off",placeholder:a.pickerSearch,"data-autofocus":"","data-testid":"picker-search"}),c.default.createElement("ul",{role:"listbox",id:y,className:"pk-picker-list","aria-label":o,"data-testid":"picker-list"},v.map((h,R)=>c.default.createElement("li",{key:String(h.value),id:O(R),role:"option","aria-selected":String(h.value)===t,className:`pk-picker-option${R===m?" pk-picker-active":""}`,onMouseMove:()=>p(R),onClick:()=>S(h),"data-testid":"picker-option"},c.default.createElement("span",null,h.label),c.default.createElement("span",{className:"pk-count"},h.count.toLocaleString(l)))),v.length?null:c.default.createElement("li",{className:"pk-hint pk-picker-none"},a.pickerNone)),c.default.createElement("p",{className:"pk-hint pk-picker-count","aria-live":"polite","data-testid":"picker-count"},L(a.pickerMatch,{count:N.length.toLocaleString(l),total:e.length.toLocaleString(l)}))))}function Ka({rule:e,ctx:t,apply:n,first:o}){let{field:r,labels:a,locale:l,fk:s,items:i}=t,d=(0,c.useContext)(ut).size==="narrow",u=s.dates?a.dateOps:a.valueOps,m=s.dates?[...W.valueOps,"last"]:W.valueOps,p=w=>w===void 0?"":s.item==="number"?le(w,l):String(w),g=e?.type==="compare"?e:null,y=e?.type==="relative"?e:null,[f,N]=(0,c.useState)(()=>({op:y?"last":g?.op??">=",a:p(g?.value),b:p(g?.value2),count:le(y?.count??5,l),unit:y?.unit??"year"})),v=ot(),b=w=>s.item==="number"?kt(w,l):s.item==="date"?/^\d{4,}-\d{2}-\d{2}$/.test(w)?w:null:w===""?null:Number(w),C=w=>{if(w.op==="last"){let j=we(w.count,{kind:"count",max:W.relativeMaxCount,labels:a,locale:l}).value;return j!==null?{field:r,type:"relative",unit:w.unit,count:j,...y?.anchor==="latest"?{anchor:"latest"}:{}}:null}let[I,D]=[b(w.a),b(w.b)];return I===null||Ve(w.op)&&D===null?null:{field:r,type:"compare",op:w.op,value:I,...Ve(w.op)?{value2:D}:{}}},x=(w,I=!1)=>{let D={...f,...w};N(D);let j=()=>{let J=C(D);J&&n(J)};I?v.later(j):(v.cancel(),j())},S=()=>{v.cancel();let w={a:p(g?.value),b:p(g?.value2),count:le(y?.count??5,l)};return f.a===w.a&&f.b===w.b&&f.count===w.count?!1:(N({...f,...w}),!0)},O=Ge({now:v.now,restore:S,back:t.back}),M=(w,I,D)=>{if(s.item==="number"){let z=we(f[w],{required:!1,labels:a,locale:l}).problem;return c.default.createElement(We,{value:f[w],onChange:te=>x({[w]:te},!0),onKeyDown:O,onBlur:v.now,problem:z,label:I,testId:D,className:"pk-field-label pk-narrow-input"})}if(s.item==="date")return c.default.createElement("input",{type:"date",value:f[w],onChange:z=>x({[w]:z.target.value}),"aria-label":I,"data-testid":D});let j=i.filter(z=>typeof z.value=="number"),J=f[w]!==""&&!j.some(z=>String(z.value)===f[w]);return j.length>=Ra&&!d?c.default.createElement(Ja,{items:J?[{value:Number(f[w]),label:f[w],count:0},...j]:j,value:f[w],onChange:z=>x({[w]:z}),label:I,testId:D,labels:a,locale:l}):c.default.createElement("select",{value:f[w],onChange:z=>x({[w]:z.target.value}),"aria-label":I,"data-testid":D},c.default.createElement("option",{value:"",disabled:!0},a.ruleValue),J?c.default.createElement("option",{value:f[w]},f[w]):null,j.map(z=>c.default.createElement("option",{key:String(z.value),value:String(z.value)},z.label)))},h=s.item==="date"?a.ruleDate:a.ruleValue,R={lang:a.lang,locale:l},A=we(f.count,{kind:"count",max:W.relativeMaxCount,labels:a,locale:l}),F=A.value??2;return c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"pk-rule-subject"},X(r,a.core)),c.default.createElement("select",{className:"pk-rule-op",value:f.op,onChange:w=>x({op:w.target.value}),"aria-label":a.valueFilterOp,"data-autofocus":o?"":void 0,"data-testid":"rule-item-op"},m.map(w=>c.default.createElement("option",{key:w,value:w},w==="last"?G(a.lastOp,F,R):u[w]??w))),f.op==="last"?c.default.createElement(c.default.Fragment,null,c.default.createElement(We,{value:f.count,onChange:w=>x({count:w},!0),onKeyDown:O,onBlur:v.now,problem:A.problem,label:a.quickCount[f.unit],testId:"rule-last-count",className:"pk-field-label pk-count-input"}),c.default.createElement("select",{value:f.unit,onChange:w=>x({unit:w.target.value}),"aria-label":a.ruleUnit,"data-testid":"rule-last-unit"},W.relativeUnits.map(w=>c.default.createElement("option",{key:w,value:w},G(a.ruleUnits[w],F,R))))):c.default.createElement(c.default.Fragment,null,M("a",h,"rule-item-value"),Ve(f.op)?c.default.createElement(c.default.Fragment,null,c.default.createElement("span",null,a.valueFilterTo),M("b",`${a.valueFilterTo} ${h}`,"rule-item-value2")):null,f.op==="!="||f.op==="notBetween"?c.default.createElement("span",{className:"pk-hint pk-rule-note","data-testid":"rule-blanks"},a.blanksOut):null))}function za({rule:e,ctx:t,apply:n,first:o}){let{view:r,types:a,labels:l,locale:s}=t,{choices:i,names:d}=Et(r,a,l,e?.by),[u,m]=(0,c.useState)(()=>({by:Ao(i,e?.by),op:e?.op??">",a:le(e?.value,s),b:le(e?.value2,s)})),p=ot(),g=(v,b=!1)=>{let C={...u,...v};m(C);let x=()=>{let[S,O]=[kt(C.a,s),kt(C.b,s)];if(S!==null&&(!Ve(C.op)||O!==null)){let M=i[C.by];n({field:t.field,type:"value",by:{field:M.field,agg:M.agg},op:C.op,value:S,...Ve(C.op)?{value2:O}:{}})}};b?p.later(x):(p.cancel(),x())},y=()=>{p.cancel();let v={a:le(e?.value,s),b:le(e?.value2,s)};return u.a===v.a&&u.b===v.b?!1:(m({...u,...v}),!0)},f=Ge({now:p.now,restore:y,back:t.back}),N=(v,b,C,x)=>c.default.createElement(We,{value:u[v],onChange:S=>g({[v]:S},!0),onKeyDown:f,onBlur:p.now,problem:we(u[v],{required:!1,labels:l,locale:s}).problem,label:b,shown:x,testId:C,className:"pk-field-label pk-narrow-input"});return c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"pk-rule-subject pk-rule-lead"},L(l.ruleWhose,{field:X(t.field,l.core)})),c.default.createElement(Oo,{choices:i,names:d,index:u.by,onChange:v=>g({by:v}),label:l.valueFilterBy,testId:"value-filter-by"}),c.default.createElement("select",{className:"pk-rule-op",value:u.op,onChange:v=>g({op:v.target.value}),"aria-label":l.valueFilterOp,"data-autofocus":o?"":void 0,"data-testid":"value-filter-op"},W.valueOps.map(v=>c.default.createElement("option",{key:v,value:v},l.valueOps[v]??v))),N("a",l.valueFilterNumber,"value-filter-number"),Ve(u.op)?N("b",`${l.valueFilterTo} ${l.valueFilterNumber}`,"value-filter-number2",l.valueFilterTo):null)}function _a({rule:e,ctx:t,apply:n,first:o}){let{field:r,labels:a}=t,[l,s]=(0,c.useState)(e?.op??"contains"),i=(u,m)=>{m!==""&&n({field:r,type:"label",op:u,value:m})},d=Lo(e?.value??"",u=>i(l,u));return c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"pk-rule-subject"},a.ruleName),c.default.createElement("select",{className:"pk-rule-op",value:l,onChange:u=>{s(u.target.value),i(u.target.value,d.text)},"aria-label":a.condition,"data-autofocus":o?"":void 0,"data-testid":"filter-condition-op"},W.labelOps.map(u=>c.default.createElement("option",{key:u,value:u},a.labelOps[u]??u))),c.default.createElement(ke,{type:"text",value:d.text,onChange:d.set,onBlur:d.flush,onKeyDown:Ge({now:d.flush,restore:d.restore,back:t.back}),onClear:()=>d.set(""),clearLabel:a.clearText,"aria-label":a.conditionValue,placeholder:a.conditionValue,maxLength:1e3,"data-testid":"filter-condition-text"}))}var Ha={item:Ka,total:za,name:_a};function Wa({ctx:e,rules:t,focusFirst:n,quickLine:o,results:r}){let{view:a,field:l,labels:s,locale:i,commit:d,note:u,fk:m,nameKind:p,noun:g}=e,{explain:y}=(0,c.useContext)(et),f={lang:s.lang,locale:i},[N,v]=(0,c.useState)(null),[b,C]=(0,c.useState)(null),[x,S]=(0,c.useState)(0),O=mo(t),[M,h]=(0,c.useState)(O),[R,A]=(0,c.useState)(null);O!==M&&(h(O),O!==R&&(S(x+1),v(null)));let F=(0,c.useRef)(null),w=(0,c.useRef)(!1);(0,c.useEffect)(()=>{w.current&&(w.current=!1,F.current?.querySelector(".pk-rule-adds button:not([disabled])")?.focus())},[x]),(0,c.useEffect)(()=>{if(N){let q=F.current?.querySelector(".pk-rule:last-child");q?.querySelector("[data-autofocus]")?.focus({preventScroll:!0}),q?.scrollIntoView?.({block:"nearest"});let Y=q?.closest(".pk-level-body");if(q&&Y){let Q=q.getBoundingClientRect().bottom-Y.getBoundingClientRect().bottom;Q>0&&(Y.scrollTop+=Math.ceil(Q))}}},[N]);let I=["item","total","name"].filter(q=>q==="item"?!!m.item:q==="name"?!!p:!0),D=t.length+(N?1:0),j=D>=ao||a.filters.length>=En.filters,J={item:L(s.addRuleItem,{field:X(l,s.core)}),total:s.addRuleTotal,name:s.addRuleName},z=(q,Y)=>{let Q=G(g,1,f);if(Y==="total"){let Ee=q?.by??Et(a,e.types,s,void 0).choices[0];return L(s.ruleInfo.total,{noun:Q,nouns:G(g,2,f),measure:Ue(a,Ee,s),scope:e.scope})}return Y==="name"?L(s.ruleInfo.name,{noun:Q}):L(s.ruleInfo[m.item==="group"?m.cyclic?"cyclic":"group":m.item??"group"],{noun:Q})},te=(q,Y,Q)=>{let Ee=Ha[Y],de=De=>{let B=ze(a,l,q,De);A(mo(me(B,l,vt).filter(K=>!e.quickFilters.includes(K)))),q||v(null),d(B,u)},ie=()=>{w.current=!0,q?d(ze(a,l,q,null),u):(v(null),S(x+1))},ne=q?r.get(q):null,be=b===Q,pe=`${x}-${Q}`;return c.default.createElement("li",{key:`${x}:${Q}`,className:"pk-rule","data-testid":"rule","data-kind":Y},Q>0||o?c.default.createElement("span",{className:"pk-rule-and"},s.ruleAnd):null,c.default.createElement("span",{className:"pk-rule-body"},c.default.createElement(Ee,{rule:q,ctx:e,apply:de,first:n&&Q===0||!q&&N!==null})),c.default.createElement("span",{className:"pk-rule-tools"},y?c.default.createElement("button",{type:"button",className:"pk-icon-btn pk-rule-info","aria-expanded":be,"aria-controls":be?pe:void 0,onClick:()=>C(be?null:Q),"aria-label":s.explainRule,title:s.explainRule,"data-testid":"rule-info"},c.default.createElement(Z,{name:"info",size:14})):null,c.default.createElement("button",{type:"button",className:"pk-icon-btn pk-rule-remove",onClick:ie,"aria-label":s.removeRule,title:s.removeRule,"data-testid":"rule-remove"},c.default.createElement(Z,{name:"x",size:14}))),c.default.createElement("p",{className:`pk-hint pk-rule-result${ne&&ne.kept===0?" pk-rule-result-empty":""}`,"data-testid":"rule-result"},ne?ne.text:s.ruleIncomplete),be?c.default.createElement("p",{className:"pk-rule-info-text",id:pe,"data-testid":"rule-info-text"},z(q,Y)):null)};return c.default.createElement("fieldset",{ref:F,className:"pk-condition pk-rules","data-testid":"rules"},c.default.createElement("legend",{className:"pk-sr"},s.rulesTitle),c.default.createElement("p",{className:"pk-hint"},L(D||o?s.rulesKeep:s.rulesNone,{noun:G(g,2,f)})),D||o?c.default.createElement("ul",{className:"pk-rule-list",role:"list"},o?c.default.createElement("li",{className:"pk-rule pk-rule-quick","data-testid":"rule-quick"},c.default.createElement("span",null,L(s.quickLine,{text:o})),c.default.createElement("button",{type:"button",className:"pk-action",onClick:e.focusQuick,"data-testid":"rule-quick-change"},s.changeAbove)):null,[...t.map((q,Y)=>te(q,$a(q),Y)),...N?[te(null,N,t.length)]:[]]):null,c.default.createElement("div",{className:"pk-rule-adds",role:"group","aria-label":s.addRule},I.map((q,Y)=>c.default.createElement("button",{key:q,type:"button",className:"pk-btn pk-small-btn",disabled:j,onClick:()=>v(q),"data-autofocus":n&&!D&&Y===0?"":void 0,"data-testid":`rule-add-${q}`},c.default.createElement(Z,{name:"plus",size:14}),c.default.createElement("span",{className:"pk-btn-text"},J[q])))),j?c.default.createElement("p",{className:"pk-hint"},L(s.rulesFull,{max:ao})):null)}var Ga=(e,t,n)=>e.filters.filter(o=>!(typeof o.field=="string"&&o.field.toLowerCase()===t.toLowerCase()&&n.includes(o.type)));function Io({view:e,field:t,encoded:n,types:o,labels:r,locale:a,commit:l,back:s,hint:i}){let d=(0,c.useMemo)(()=>Pe(n,t,{view:e,locale:a,labels:r.core}),[n,t,e,a,r]),u=(0,c.useContext)(ut).size==="narrow",m=(0,c.useMemo)(()=>yo(n,e,t),[n,e,t]),p=Re(e,t),g=m.dates?n.column(p):null,y=(0,c.useMemo)(()=>m.dates?Kt(n,p):null,[n,m.dates,p]),f=(0,c.useMemo)(()=>g?Ba(g):null,[g]),N=(0,c.useMemo)(()=>m.cyclic&&g&&f?Pa(g,f):[],[m.cyclic,g,f]),v=Xo(e,t,m,N.map(T=>T.year)),[b,C]=(0,c.useState)(null),x=v.anchor??b??"today",[S,O]=(0,c.useState)(!0),[M,h]=(0,c.useState)(null),[R,A]=(0,c.useState)(i==="conditions"?!0:null),F=(0,c.useRef)(null),I=me(e,t,vt).filter(T=>!v.filters.includes(T)),D=I.filter(T=>T.type!=="value"),j=I.filter(T=>T.type==="value"),J=I.length>0||v.filters.length>0,z=(0,c.useRef)(J),te=(0,c.useRef)(!1),q=(0,c.useRef)(!1),Y=()=>{if(!q.current)return;let T=F.current?ct(F.current):null;(!T||!T.isConnected||!F.current?.contains(T)||T instanceof HTMLButtonElement&&T.disabled)&&F.current?.querySelector('[data-testid="section-rules"]')?.focus(),q.current=!1};(0,c.useEffect)(Y),(0,c.useEffect)(()=>{z.current!==J&&(z.current=J,te.current?te.current=!1:(A(J),h(!J)),q.current=!0,setTimeout(Y,100))},[J]);let[Q,Ee]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(Q){let T=F.current?.querySelector('[data-testid="quick-choices"] input:checked, [data-testid="years-combined"] [aria-pressed="true"]:not(:disabled)')??F.current?.querySelector('[data-testid="years-combined"] button:not(:disabled)');T?.scrollIntoView?.({block:"center"}),T?.focus({preventScroll:!0})}},[Q]);let de=n.timeZone,ie=Da(m,r),ne={lang:r.lang,locale:a},be=JSON.stringify(e),pe=(0,c.useMemo)(()=>{if(!d)return null;let T=Ga(e,t,["value","top"]),U=j[0]?.by??Et(e,o,r,void 0).choices[0],_=Xt(n,e,t,U,[...T,...j]),fe=new Map;for(let he of j){let At=Xt(n,e,t,he.by,T),it=Xt(n,e,t,he.by,[...T,he]);fe.set(he,{totals:At.totals,kept:it.totals.size})}return{shown:_.totals,rows:_.rows,perRule:fe,by:U}},[n,be,t,d]),De=(0,c.useMemo)(()=>{let T=new Map;for(let U of D){let _=Pe(n,t,{view:{...e,filters:[U]},locale:a,labels:r.core});T.set(U,_?_.items.filter(fe=>fe.kept).length:0)}if(v.filters.length&&D.length){let U=Pe(n,t,{view:{...e,filters:v.filters},locale:a,labels:r.core});T.set("quick",new Set(U?U.items.filter(_=>!_.kept).map(_=>re(_.value)):[]))}return T},[n,be,t,a,r]);if(!d||!pe)return null;let K={step:"filter",field:X(t,r.core)},H=d.items.map(T=>T.value),ee=_t(e,t,H),se=new Set(ee.map(re)),Ne=No(n,e,t)??(I.some(T=>T.type==="label")?"text":null),Te=T=>d.items.find(U=>U.value===T)?.label,bt=T=>vo(e,T,{labels:r,locale:a,timeZone:de,date:m.dates,labelOf:Te,span:y}),ue=T=>T.toLocaleString(a),ae=v.id==="yearsCombined"&&v.years?v.years:N.map(T=>T.year),je=m.cyclic&&N.length>1?ae.length===1?L(r.yearsOne,{year:String(ae[0])}):L(r.yearsAll,{years:ae.length===N.length||ae[ae.length-1]-ae[0]===ae.length-1?`${ae[0]}\u2013${ae[ae.length-1]}`:ae.join(", ")}):null,Le=v.id==="yearsCombined"?je:v.filters.length?Bt(v.filters[0],r,a,de,void 0,y):null,xe=De.get("quick")??(v.filters.length?new Set(d.items.filter(T=>!T.kept).map(T=>re(T.value))):new Set),Oe=d.items.filter(T=>T.kept&&se.has(re(T.value))),Nt=j.length?Oe.filter(T=>pe.shown.has(re(T.value))).length:Oe.length,at=H.length-ee.length,xt=d.items.filter(T=>se.has(re(T.value))&&xe.has(re(T.value))).length,yn=d.items.filter(T=>se.has(re(T.value))&&!T.kept).length-xt,Po=Oe.length-Nt,vn=(T,U)=>{let _=[...T.entries()].filter(([,ce])=>ce!==null);if(!_.length)return null;let[fe,he]=[_.reduce((ce,Qe)=>Qe[1]<ce[1]?Qe:ce),_.reduce((ce,Qe)=>Qe[1]>ce[1]?Qe:ce)],At=e.values.find(ce=>Je({field:ce.field??null,agg:ce.agg},U)),it=Be(At?.format??(U.agg==="count"||U.agg==="countUnique"?"integer":"number"),{locale:a}),wn=ce=>Te(JSON.parse(ce))??ce;return L(r.totalSpread,{low:it(fe[1]),lowItem:wn(fe[0]),high:it(he[1]),highItem:wn(he[0])})},Vo=T=>{let U=Ue(e,T.by,r),_=r.valueOps[T.op]??T.op,fe=he=>typeof he=="number"?he.toLocaleString(a,{maximumFractionDigits:6}):"";return Ve(T.op)?L(r.totalWordsTwo,{measure:U,op:_,from:fe(Math.min(T.value,T.value2)),to:fe(Math.max(T.value,T.value2))}):L(r.totalWords,{measure:U,op:_,number:fe(T.value)})},rt=null;if(Nt===0){let T=j.find(U=>pe.perRule.get(U)?.kept===0);T?rt=L(r.emptyTotal,{noun:G(ie,1,ne),rule:Vo(T),spread:vn(pe.perRule.get(T).totals,T.by)??""}):ee.length===0?rt=r.emptyPicks:xt+yn>0&&(rt=L(r.emptyRules,{noun:G(ie,1,ne),rules:[...Le?[Le]:[],...D.map(bt)].join(r.listAnd)}))}let St=new Map;for(let T of I)if(T.type==="value"){let U=pe.perRule.get(T),_=U.kept===0?L(r.ruleKeepsNone,{total:ue(H.length),noun:G(ie,H.length,ne),spread:vn(U.totals,T.by)??""}):L(r.ruleKeeps,{kept:ue(U.kept),total:ue(H.length),noun:G(ie,H.length,ne)});St.set(T,{kept:U.kept,text:_})}else{let U=De.get(T)??0;St.set(T,{kept:U,text:L(r.ruleKeeps,{kept:ue(U),total:ue(H.length),noun:G(ie,H.length,ne)})})}let Ct=[...e.rows,...e.cols].filter(T=>T.toLowerCase()!==t.toLowerCase()).map(T=>L(r.scopeItems,{count:ue(Pe(n,T,{view:e,locale:a,labels:r.core})?.items.length??0),field:X(T,r.core)}));y&&Ct.push(L(r.scopeDates,{range:`${ge(Se(y.min),a)} \u2013 ${ge(Se(y.max),a)}`}));let jo=Ct.length?Ct.join(r.listAnd):r.scopeRows,qo=()=>{O(!0),Ee(T=>T+1)},Tt=(T,U)=>{l(T,K),requestAnimationFrame(()=>{let _=F.current?ct(F.current):null;(!_||!_.isConnected||!F.current?.contains(_)||_ instanceof HTMLButtonElement&&_.disabled)&&F.current?.querySelector(`[data-testid="${U}"]`)?.focus()})},st={view:e,field:t,types:o,labels:r,locale:a,commit:l,note:K,back:s,fk:m,nameKind:Ne,timeZone:de,hint:i,items:d.items,noun:ie,scope:jo,quickFilters:v.filters,focusQuick:qo,act:Tt},Lt=M??!J,Ot=R??J,Uo=()=>{te.current=!0,h(!Lt),u&&!Lt&&A(!1)},Jo=()=>{te.current=!0,A(!Ot),u&&!Ot&&h(!1)},Ko={shown:Nt,total:H.length,noun:ie,unpicked:at,byQuick:xt,byRules:yn,byTotals:Po,itemRules:D.length,totalRules:j.length,rows:pe.rows,rowsAll:n.length,span:y,yearsText:je,empty:rt,quickWords:Le,rules:I.length,canReset:at>0||J},zo=T=>T.kept===!1,lt=m.quick&&y&&g&&f?{id:"quick",title:r.quickTitle,body:c.default.createElement(qa,{ctx:st,quick:v,anchor:x,setAnchorLocal:C,span:y,column:g,counts:f})}:m.cyclic&&N.length>1&&N.length<=12?{id:"years",title:r.yearsCombined,body:c.default.createElement(Ua,{ctx:st,years:N,on:ae})}:null;return c.default.createElement("div",{ref:F,className:"pk-filter pk-filter-level"},c.default.createElement(ja,{ctx:st,state:Ko}),lt?c.default.createElement(Zt,{id:lt.id,title:lt.title,state:Le&&!S?Le:null,open:S,onToggle:()=>O(!S)},lt.body):null,c.default.createElement(Zt,{id:"picks",title:r.pickItems,state:at?L(r.picksState,{picked:ue(ee.length),total:ue(H.length)}):L(r.picksAll,{total:ue(H.length)}),open:Lt,onToggle:Uo,action:c.default.createElement("button",{type:"button",className:"pk-action",disabled:!at,"aria-label":r.clearPicks,onClick:()=>Tt(nn(e,t,H,H),"section-picks"),"data-testid":"filter-clear-picks"},r.clear)},c.default.createElement(xo,{items:d.items,selected:se,onChange:T=>l(nn(e,t,H.filter(U=>T.has(re(U))),H),K),labels:r,locale:a,autoFocus:!J&&!m.quick&&i!=="conditions",tail:J?{isOut:zo,render:(T,U,_)=>c.default.createElement(Va,{out:T,row:U,searching:_,labels:r,locale:a})}:void 0})),c.default.createElement(Zt,{id:"rules",title:r.rulesTitle,state:I.length?c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"pk-section-mark"},"\u25CF")," ",L(G(r.rulesState,I.length,ne),{count:ue(I.length)})):r.rulesNoneState,open:Ot,onToggle:Jo,action:c.default.createElement("button",{type:"button",className:"pk-action",disabled:!I.length,"aria-label":r.removeRules,onClick:()=>Tt(aa(e,t,v.filters),"section-rules"),"data-testid":"filter-remove-rules"},r.removeAll)},c.default.createElement(Wa,{ctx:st,rules:I,focusFirst:i==="conditions",quickLine:Le,results:St})))}function Qa({view:e,field:t,types:n,labels:o,locale:r,commit:a,back:l}){let s=me(e,t,["top"])[0],{choices:i,names:d}=Et(e,n,o,s?.by),[u,m]=(0,$.useState)(()=>Ao(i,s?.by)),p=s&&!s.bottom&&an.includes(s.count)?s.count:null,[g,y]=(0,$.useState)(!!s&&p===null),[f,N]=(0,$.useState)(!!s?.bottom),[v,b]=(0,$.useState)(le(s?.count??10,r)),C=ot(),x=we(v,{kind:"count",labels:o,locale:r}),S=X(t,o.core),O=A=>a(ko(e,t,A,s),{step:"top",field:S}),M=A=>{let F={bottom:f,count:v,by:u,...A},w=we(F.count,{kind:"count",labels:o,locale:r}).value;w!==null&&O({count:w,bottom:F.bottom,by:i[F.by]})},h=(0,$.useId)(),R=(A,F,w,I)=>$.default.createElement("label",{className:"pk-radio"},$.default.createElement("input",{type:"radio",name:h,checked:w,onChange:I,"data-autofocus":w?"":void 0,"data-testid":`top-${A}`}),$.default.createElement("span",null,F));return $.default.createElement("div",{className:"pk-level-form"},$.default.createElement("div",{role:"radiogroup","aria-label":o.topN,className:"pk-radios"},R("off",o.off,!s&&!g,()=>{y(!1),O(null)}),an.map(A=>$.default.createElement($.default.Fragment,{key:A},R(String(A),L(o.topBadge,{count:A.toLocaleString(r)}),!g&&p===A,()=>{y(!1),O({count:A,bottom:!1,by:i[u]})}))),R("own",o.topOwn,g,()=>{y(!0),M({})})),g?$.default.createElement("div",{className:"pk-inline-form"},$.default.createElement("div",{className:"pk-segmented pk-small",role:"group","aria-label":o.topN},[!1,!0].map(A=>$.default.createElement("button",{key:String(A),type:"button","aria-pressed":f===A,onClick:()=>{N(A),M({bottom:A})},"data-testid":A?"top-bottom":"top-top"},A?o.bottom:o.top))),$.default.createElement(We,{value:v,onChange:A=>{b(A),C.later(()=>M({count:A}))},onKeyDown:Ge({now:C.now,restore:()=>{C.cancel();let A=le(s?.count??10,r);return v===A?!1:(b(A),!0)},back:l}),onBlur:C.now,problem:x.problem,label:o.topCount,testId:"top-count",className:"pk-field-label pk-narrow-input"})):null,$.default.createElement("div",{className:"pk-inline-form"},$.default.createElement(Oo,{choices:i,names:d,index:u,onChange:A=>{m(A),s&&O({count:s.count,bottom:!!s.bottom,by:i[A]})},label:o.topBy,prefix:o.topBy,testId:"top-by"})))}function Ya({view:e,field:t,labels:n,locale:o,range:r,regroup:a,back:l}){let s=dt(e,t),i=s?.by==="bin"?s:null,[d,u]=(0,$.useState)(le(i?.size,o)),[m,p]=(0,$.useState)(le(i?.origin,o)),[g,y]=(0,$.useState)(!1),f=(0,$.useId)(),N=we(d,{kind:"size",tried:g,labels:n,locale:o}),v=we(m,{required:!1,labels:n,locale:o}),b=N.value,C=m.trim()===""?0:v.value,x=b!==null&&C!==null&&Qo(b,C,r)==="far",S=O=>O.toLocaleString(o,{maximumFractionDigits:6});return $.default.createElement("form",{className:"pk-inline-form pk-bin-form",onSubmit:O=>{if(O.preventDefault(),i&&d.trim()===""){a(null);return}y(!0),b!==null&&C!==null&&!x&&a("bin",b,C)},onKeyDown:O=>{O.key==="Escape"&&(O.preventDefault(),O.stopPropagation(),l())}},$.default.createElement(We,{value:d,onChange:u,problem:N.problem,label:n.binSize,shown:n.binSize,testId:"bin-size",autoFocus:!0}),$.default.createElement("label",{className:"pk-field-label"},$.default.createElement("span",null,n.binStart),$.default.createElement(ke,{type:"text",inputMode:"decimal",autoComplete:"off",spellCheck:!1,value:m,placeholder:"0",onChange:p,clearLabel:n.clearText,"data-testid":"bin-start","aria-invalid":x||v.problem?!0:void 0,"aria-describedby":x||v.problem?f:void 0})),v.problem?$.default.createElement("p",{id:f,className:"pk-form-problem","data-testid":"bin-start-problem"},v.problem):x&&r&&C!==null&&b!==null?$.default.createElement("p",{id:f,className:"pk-form-problem","data-testid":"bin-problem"},L(n.binStartFar,{start:S(C),min:S(r.min),max:S(r.max)})):null,$.default.createElement("button",{type:"submit",className:"pk-btn pk-primary",disabled:x,"data-testid":"bin-apply"},n.apply),i?$.default.createElement("button",{type:"button",className:"pk-btn",onClick:()=>a(null),"data-testid":"bin-off"},n.binsOff):null)}function Xa({view:e,index:t,labels:n,commit:o,back:r}){let a=e.values[t],s={step:"value",field:Xe(a,n)},i=Lo(a.label??"",d=>o(tn(e,t,{label:d.trim()||null}),s),0);return $.default.createElement("div",{className:"pk-inline-form pk-level-form"},$.default.createElement(ke,{type:"text",value:i.text,placeholder:Xe({...a,label:null},n),onChange:i.set,onBlur:i.flush,onKeyDown:Ge({now:()=>{i.flush(),r()},restore:i.restore,back:r}),onClear:()=>a.label?o(tn(e,t,{label:null}),s):void 0,clearLabel:n.defaultName,"aria-label":n.rename,maxLength:200,"data-autofocus":"","data-testid":"value-name"}),$.default.createElement("p",{className:"pk-hint"},n.nameHint))}function dn({name:e,info:t,extra:n,labels:o}){let r=$.default.createElement($.default.Fragment,null,t?.description,t?.href?$.default.createElement($.default.Fragment,null," ",$.default.createElement("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"pk-learn-more"},o.learnMore)):null,t?.description&&n?$.default.createElement($.default.Fragment,null,$.default.createElement("br",null),$.default.createElement("br",null)):null,n);return $.default.createElement("div",{className:"pk-level-name"},$.default.createElement("span",{className:"pk-level-name-text","data-testid":"menu-head"},e),t?.description||n?$.default.createElement(qt,{info:{description:r},name:e,labels:o,className:"pk-menu-info",testId:"menu-info"}):null)}function pn({labels:e,onRemove:t,close:n}){return $.default.createElement(wt,{id:"menu-remove",text:e.remove,icon:"trash",danger:!0,onSelect:()=>{n(),t()}})}var fn=(e,t)=>n=>{let o=n.change?.();n.closes&&t(),o&&e(o.view,o.note)};function Qr({view:e,zone:t,index:n,field:o,types:r,labels:a,commit:l,close:s,onRemove:i,defaultsOf:d,rangeOf:u,locale:m,info:p,state:g,encoded:y}){let f=Re(e,o),N=ca({view:e,zone:t,index:n,field:o,types:r,labels:a,locale:m,state:g,defaultsOf:d,encoded:y}),v=(x,S,O)=>{s();let M=X(f,a.core),h=x?Vt(M,x,a,S):null;l(zt(e,o,x,{size:S,origin:O,name:h??void 0}).view,{step:"group",field:M})},b=(x,S,O)=>x==="filter"?$.default.createElement(Io,{view:e,field:o,encoded:y,types:r,labels:a,locale:m,commit:l,back:S,hint:O}):x==="top"?$.default.createElement(Qa,{view:e,field:o,types:r,labels:a,locale:m,commit:l,back:S}):x==="bins"?$.default.createElement(Ya,{view:e,field:o,labels:a,locale:m,range:u?.(f)??null,regroup:v,back:S}):null,C=X(o,a.core);return $.default.createElement(nt,{name:C,labels:a,locale:m,topics:N,close:s,onPick:fn(l,s),panel:b,search:!0,head:$.default.createElement(dn,{name:C,info:p,labels:a}),foot:$.default.createElement(pn,{labels:a,onRemove:i,close:s})})}function Yr({view:e,index:t,field:n,types:o,labels:r,commit:a,close:l,onRemove:s,locale:i,info:d,state:u,encoded:m}){let p=X(n,r.core);return $.default.createElement(nt,{name:p,labels:r,locale:i,topics:ma({view:e,index:t,field:n,types:o,labels:r,locale:i,state:u,encoded:m}),close:l,onPick:fn(a,l),panel:(g,y,f)=>g==="filter"?$.default.createElement(Io,{view:e,field:n,encoded:m,types:o,labels:r,locale:i,commit:a,back:y,hint:f}):null,search:!0,head:$.default.createElement(dn,{name:p,info:d,labels:r}),foot:$.default.createElement(pn,{labels:r,onRemove:s,close:l})})}function Xr({view:e,index:t,types:n,labels:o,commit:r,close:a,onRemove:l,defaultsOf:s,info:i,earlier:d,locale:u="en-US"}){let{explain:m}=$.default.useContext(et),p=Xe(e.values[t],o),g=fa({view:e,index:t,types:n,labels:o,locale:u,defaultsOf:s,earlier:d});return $.default.createElement(nt,{name:p,labels:o,locale:u,topics:g,close:a,onPick:fn(r,a),panel:(y,f)=>y==="name"?$.default.createElement(Xa,{view:e,index:t,labels:o,commit:r,back:f}):null,search:!0,head:$.default.createElement(dn,{name:p,info:i,extra:m?o.settingInfo.valuesFilter:null,labels:o}),foot:$.default.createElement(pn,{labels:o,onRemove:l,close:a})})}var Za=/[<>:"/\\|?*\u0000-\u001F\u007F]+/g,er=/^(con|prn|aux|nul|com\d|lpt\d)$/i;function hn(e){let n=tr((typeof e=="string"?e:"").replace(Za,"-").replace(/^[\s.-]+/,"").slice(0,120));return n&&!er.test(n)?n:"pivot"}function tr(e){let t=e.length;for(;t>0&&(e[t-1]==="."||/\s/.test(e[t-1]));)t--;return e.slice(0,t)}function nr(e){let t=/^data:([^,;]*)((?:;[^,;]*)*?)(;base64)?,(.*)$/s.exec(e);if(!t)throw new TypeError("not a data: URL");let n=t[1]||"application/octet-stream";if(t[3]){let o=atob(t[4]),r=new Uint8Array(o.length);for(let a=0;a<o.length;a++)r[a]=o.charCodeAt(a);return new Blob([r],{type:n})}return new Blob([decodeURIComponent(t[4])],{type:n})}function $o(e,t,n=document){let o=URL.createObjectURL(e),r=n.createElement("a");r.href=o,r.download=t,r.rel="noopener",n.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(o),1e4)}async function sn(e,t){try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}if(!t)return!1;let n=t.ownerDocument,o=n.createElement("textarea");o.value=e,o.readOnly=!0,o.className="pk-sr";let r=t.getRootNode()instanceof ShadowRoot?t.getRootNode().activeElement:n.activeElement;t.appendChild(o);let a;try{o.select(),a=typeof n.execCommand=="function"&&n.execCommand("copy")}catch{a=!1}return o.remove(),r?.focus?.({preventScroll:!0}),a}var or="0.3.0",ar=()=>typeof location<"u"?location.href:void 0;function rr(e,t){let{view:n,viewName:o,sourceId:r,sourceName:a,schemaUrl:l,encoded:s,announce:i,limits:d,param:u}=e,m=()=>Cn(Ye(n,{name:o??"",createdAt:new Date,generator:{name:"pivotkit-react",version:or},source:{id:r,name:a},data:s,...l!==void 0?{schemaUrl:l}:{}}));return{copyLink:async()=>{let p=Wn(e.shareLink,ar());if(p===null)return;let g;try{g=(Gt()??await Wt()).encodeViewLink(Ye(n,{name:o??void 0,source:{id:r}},{link:!0}))}catch(f){i(f&&f.code==="LIMIT_EXCEEDED"?t.toastLinkTooLong:L(t.error,{message:String(f)}),{tone:"error"});return}let y=await sn(Hn(p,u,g),e.root.current);i(y?t.toastLinkCopied:t.toastCopyFailed,y?void 0:{tone:"error"})},copyJson:async()=>{let p=await sn(m(),e.root.current);i(p?t.toastJsonCopied:t.toastCopyFailed,p?void 0:{tone:"error"})},download:()=>{let p=Tn(o||a||hn(e.fileName)),g=new Blob([m()],{type:"application/json"});e.onExport?.({kind:"json",fileName:p,blob:g})!==!1&&($o(g,p,e.root.current?.ownerDocument??document),i(L(t.toastExported,{file:p})))},loadText:async p=>{let g=Gn(p,s,{limits:d,sourceId:r});if(g.failed==="notJson"){let b=p.trim(),x=(b.includes("#")?Qt(b.slice(b.indexOf("#")),u)??Qt(b.slice(b.indexOf("#")),"pivot"):null)??(b.startsWith("1.")?b:null);if(!x)return t.viewFailed.notJson;try{let S=(Gt()??await Wt()).decodeViewLink(x);g=S.view?Qn(S.view,s,{limits:d,sourceId:r}):{view:null,issues:[],failed:"badLink",file:null}}catch{return t.viewFailed.badLink}}if(!g.view)return t.viewFailed[g.failed??"notView"]??t.viewFailed.notView;let y=g,f=Yn(y,t,Array.isArray(e.sources)?e.sources:[]);if(!f)return e.applyLoaded(y),null;let N=f.switchTo,v=e.onSourceSwitch;return{lines:f.lines,load:()=>e.applyLoaded(y),switchTo:N&&typeof v=="function"?{name:N.name,run:()=>v({source:{id:N.id,name:N.name},view:y.file?.view??y.view,name:y.file?.name||void 0})}:void 0}}}}var yt=e=>e.host||e.store,sr=(e,t)=>!!t&&e.name===t.name&&(e.scope==="user"?"user":"shared")===t.scope&&e.at!==void 0===t.store&&(!t.store||(e.sourceId??null)===(t.storeSource??null)),ln=(e,t,n)=>e.find(o=>o.at!==void 0&&o.name===t&&(o.sourceId??null)===(n??null));function lr(e,t,n,o=!1){if(!e)return null;let r;if(e.scope==="shared")r=n.publish?{kind:"publish"}:yt(n)?{kind:null,why:"saveSharedLocked"}:null;else if(e.scope==="user"&&e.store){let a=ln(t,e.name,e.storeSource);r=n.store?a?{kind:"store",at:a.at,storeSource:e.storeSource??null}:{kind:"store",storeSource:n.sourceId??null}:null}else e.scope==="user"?r=n.host?{kind:"host"}:null:r=yt(n)?{kind:null,why:"saveNotInViews"}:null;return r&&r.kind&&o?{kind:null,why:"exportNeedsField"}:r}function ir(e,t,n){if(n.host)return{kind:"host",replaces:t.find(r=>r.scope==="user"&&r.at===void 0&&r.name===e)??null};let o=ln(t,e,n.sourceId)??ln(t,e,null);return o?{kind:"store",at:o.at,storeSource:o.sourceId??null,replaces:o}:{kind:"store",storeSource:n.sourceId??null,replaces:null}}var Ke=Object.freeze({count:100,text:5e5}),po=!1;function Ro(e){return e?e.length>Ke.text?(po||(po=!0,console.warn(`pivotkit: the browser store of views holds more than ${Ke.text} characters; it is not read, and the next save replaces it`)),[]):no(e).templates:[]}function os(e,t){return Ro(e).map((n,o)=>({name:n.name,view:n.view,at:o,...n.source?.id?{sourceId:n.source.id}:{}})).filter(n=>!n.sourceId||!t||n.sourceId===t)}function cr(e,t,n){let o=Ro(e),r=o;if(t.remove!==void 0){if(o[t.remove]?.name!==t.removeName)throw new Error(n("changed",0));r=o.filter((s,i)=>i!==t.remove)}let a=!!(t.name&&t.view);if(a&&t.replace!==void 0){let s=o[t.replace];if(s?.name!==t.name)throw new Error(n("changed",0));r=o.map((i,d)=>d===t.replace?{name:s.name,view:t.view,...s.source?{source:s.source}:{}}:i)}else if(a){let s=t.sourceId;if(r=r.filter(i=>i.name!==t.name||(i.source?.id??void 0)!==s),r.push({name:t.name,view:t.view,...s?{source:{id:s}}:{}}),r.length>Ke.count)throw new Error(n("count",Ke.count))}let l=r.length?JSON.stringify(r.map(s=>Ye(s.view,{name:s.name,source:s.source},{link:!0}))):null;if(a&&l&&l.length>Ke.text)throw new Error(n("text",Ke.text));return l}function ur(e,t,n,o,r){let a={count:n.storeFull,text:n.storeTooLarge,changed:n.storeChanged},l=cr(e,t,(s,i)=>L(a[s],{max:i.toLocaleString(o)}));if(!r(l))throw new Error(n.storeRefused)}function mr({view:e,plan:t,labels:n,onChart:o,close:r}){let a=Ft(e.chart);return Rn.map(l=>k.default.createElement($e,{key:l,icon:Rt[l].icon,checked:e.display==="chart"&&a===l,hint:l==="auto"&&t?L(n.chartAutoNow,{type:n.chartTypes[t.name]}):void 0,onSelect:()=>{r(),o(l)},testId:`chart-${l}`},n.chartTypes[l]))}var fo={slices:["auto","off","value","percent","both"],other:["auto","off","value"]},dr=["outside","inside"],pr=["auto","bottom","right","off"],fr=["auto","all","nth"],hr=["auto","on","off"];function gr({title:e,labels:t,onDisplay:n}){let[o,r]=(0,k.useState)(e??""),[a,l]=(0,k.useState)(e);return e!==a&&(l(e),r(e??"")),k.default.createElement("form",{className:"pk-inline-form",onSubmit:s=>{s.preventDefault(),n({title:o.trim()||null})}},k.default.createElement(ke,{type:"text",value:o,onChange:r,onClear:()=>e?n({title:null}):void 0,clearLabel:t.clearText,placeholder:t.chartTitleNone,"aria-label":t.chartTitle,maxLength:200,"data-testid":"chart-title"}),k.default.createElement("button",{type:"submit",className:"pk-btn pk-primary",disabled:(o.trim()||null)===(e??null)},t.apply))}function kr({view:e,plan:t,labels:n,onDisplay:o}){let r=e.chart,a=t?t.name:Ft(r),l=$n.includes(a),s=Rt[a].axis,i=l?fo.slices:fo.other,d=!l&&(r.valueLabels==="percent"||r.valueLabels==="both")?"value":r.valueLabels;return k.default.createElement(He,{title:n.chartDisplay},k.default.createElement("div",{className:"pk-subtitle"},n.valueLabels),k.default.createElement("div",{className:"pk-choice-grid"},i.map(u=>k.default.createElement($e,{key:u,checked:d===u,onSelect:()=>o({valueLabels:u}),testId:`labels-${u}`},n.valueLabelNames[u]))),l?k.default.createElement(k.default.Fragment,null,k.default.createElement("div",{className:"pk-subtitle pk-setting-row"},k.default.createElement("span",null,n.labelPosition),k.default.createElement(_e,{id:"labelPosition",name:n.labelPosition})),k.default.createElement("div",{className:"pk-choice-grid"},dr.map(u=>k.default.createElement($e,{key:u,checked:(r.labelPosition??"outside")===u,disabled:r.valueLabels==="off",onSelect:()=>o({labelPosition:u}),testId:`label-position-${u}`},n.labelPositionNames[u])))):null,k.default.createElement("div",{className:"pk-subtitle"},n.legend),k.default.createElement("div",{className:"pk-choice-grid"},pr.map(u=>k.default.createElement($e,{key:u,checked:r.legend===u,onSelect:()=>o({legend:u}),testId:`legend-${u}`},n.legendNames[u]))),k.default.createElement("div",{className:"pk-subtitle"},n.chartTitle),k.default.createElement(gr,{title:r.title,labels:n,onDisplay:o}),s?k.default.createElement(k.default.Fragment,null,k.default.createElement("div",{className:"pk-subtitle"},n.axisLabels),k.default.createElement("div",{className:"pk-choice-grid"},fr.map(u=>k.default.createElement($e,{key:u,checked:r.axisLabels===u,onSelect:()=>o({axisLabels:u}),testId:`axis-${u}`},n.axisLabelNames[u])))):null,s&&e.rows.length>=2?k.default.createElement(k.default.Fragment,null,k.default.createElement("div",{className:"pk-subtitle pk-setting-row"},k.default.createElement("span",null,n.groupLabels),k.default.createElement(_e,{id:"groupLabels",name:n.groupLabels})),k.default.createElement("div",{className:"pk-choice-grid"},hr.map(u=>k.default.createElement($e,{key:u,checked:r.groupLabels===u,onSelect:()=>o({groupLabels:u}),testId:`groups-${u}`},n.groupLabelNames[u])))):null,a==="line"||a==="area"?k.default.createElement(vr,{checked:r.smooth,onChange:u=>o({smooth:u}),testId:"chart-smooth"},n.smoothLines):null)}function as({view:e,plan:t,labels:n,onChart:o,onDisplay:r,close:a}){return k.default.createElement(k.default.Fragment,null,k.default.createElement(He,{title:n.chartType},k.default.createElement("div",{className:"pk-choice-grid"},k.default.createElement(mr,{view:e,plan:t,labels:n,onChart:o,close:a}))),k.default.createElement(kr,{view:e,plan:t,labels:n,onDisplay:r}))}function yr({labels:e,mod:t}){let n=o=>o==="Mod"?t==="\u2318"?"\u2318":e.keys.Mod:Object.hasOwn(e.keys,o)?e.keys[o]:o;return k.default.createElement("dl",{className:"pk-shortcuts","data-testid":"shortcuts"},Xn.map(o=>k.default.createElement("div",{key:o.text,className:"pk-shortcut"},k.default.createElement("dt",null,o.keys.map((r,a)=>k.default.createElement(k.default.Fragment,{key:r},a?" + ":null,k.default.createElement("kbd",null,n(r))))),k.default.createElement("dd",null,e.shortcuts[o.text]))))}function vr({checked:e,onChange:t,testId:n,children:o}){return k.default.createElement("label",{className:"pk-switch"},k.default.createElement("input",{type:"checkbox",checked:e,onChange:r=>t(r.target.checked),"data-testid":n}),k.default.createElement("span",{className:"pk-switch-track","aria-hidden":"true"}),k.default.createElement("span",{className:"pk-switch-text"},o))}function rs({view:e,labels:t,onTotal:n,onExpand:o,onCollapse:r,close:a,tips:l,mod:s,folding:i,help:d}){let u=ha({view:e,labels:t,folding:i,tips:l,explanations:d?.explanations??null,act:{total:n,expand:()=>o(t),collapse:()=>r(t),tipsOn:m=>l.onOn(m),resetTips:()=>l.onReset(),explain:m=>d?.explanations?.set(m)}});return k.default.createElement(nt,{name:t.options,labels:t,topics:u,close:a,onPick:Fo(a),panel:m=>m==="shortcuts"?k.default.createElement(yr,{labels:t,mod:s}):null})}var Fo=e=>t=>{t.closes&&e(),t.run?.()};function Do({question:e,action:t,cancel:n,onYes:o,onNo:r,testId:a,yesId:l,noId:s,danger:i=!1,busy:d=!1,focusYes:u=!1}){let m=(0,k.useRef)(null),p=(0,k.useRef)(null);return(0,k.useEffect)(()=>{(u?p:m).current?.focus({preventScroll:!0})},[u]),k.default.createElement("div",{className:"pk-confirm pk-save-confirm",role:"group","aria-label":e,"data-testid":a},k.default.createElement("span",{className:"pk-confirm-text"},e),k.default.createElement("button",{ref:p,type:"button",className:i?"pk-btn pk-danger-btn":"pk-btn pk-primary",disabled:d,"data-autofocus":u?"":void 0,"data-testid":l,onClick:o},t),k.default.createElement("button",{ref:m,type:"button",className:"pk-btn",disabled:d,"data-autofocus":u?void 0:"","data-testid":s,onClick:r},n))}function wr({labels:e,button:t,onSave:n,resolve:o,close:r}){let[a,l]=(0,k.useState)(""),[s,i]=(0,k.useState)(null),d=(0,k.useRef)(null),u=(0,k.useRef)(!1);return(0,k.useEffect)(()=>{s?u.current=!0:u.current&&d.current?.focus({preventScroll:!0})},[s]),s?k.default.createElement(Do,{question:L(e.replaceConfirm,{name:s.name}),action:e.replaceAction,cancel:e.cancel,testId:"replace-confirm",yesId:"confirm-replace",noId:"cancel-replace",onYes:()=>{r(),n(s.name,s.target)},onNo:()=>i(null)}):k.default.createElement("form",{className:"pk-inline-form",onSubmit:m=>{m.preventDefault();let p=a.trim(),g=p?o(p):null;g?.replaces?i({name:p,target:g}):g&&(r(),n(p,g))}},k.default.createElement(ke,{type:"text",value:a,onChange:l,clearLabel:e.clearText,placeholder:e.viewName,"aria-label":e.viewName,maxLength:120,"data-testid":"saved-view-name",inputRef:d}),k.default.createElement("button",{type:"submit",className:"pk-btn pk-primary",disabled:!a.trim()},t))}function Er({check:e,labels:t,onCancel:n,close:o,title:r,quiet:a=!1}){let l=(0,k.useId)(),s=(0,k.useRef)(null);return(0,k.useEffect)(()=>{a||s.current?.focus({preventScroll:!0})},[a]),k.default.createElement("div",{className:"pk-load-check",role:"group","aria-labelledby":l,"data-testid":"load-check"},k.default.createElement("p",{id:l,className:"pk-load-check-title"},k.default.createElement(Z,{name:"info",size:16}),k.default.createElement("span",null,r??t.loadCheckTitle)),k.default.createElement("ul",{className:"pk-load-check-lines"},e.lines.map((i,d)=>k.default.createElement("li",{key:d},i))),k.default.createElement("div",{className:"pk-load-check-actions"},e.switchTo?k.default.createElement("button",{ref:s,type:"button",className:"pk-btn pk-primary","data-autofocus":"","data-testid":"load-switch",onClick:()=>{o(),e.switchTo?.run()}},L(t.switchAndLoad,{source:e.switchTo.name})):null,k.default.createElement("button",{ref:e.switchTo?void 0:s,type:"button",className:e.switchTo?"pk-btn":"pk-btn pk-primary","data-autofocus":e.switchTo?void 0:"","data-testid":"load-anyway",onClick:()=>{o(),e.load()}},t.loadAnyway),k.default.createElement("button",{type:"button",className:"pk-btn","data-testid":"load-cancel",onClick:n},t.cancel)),e.switchTo?k.default.createElement("p",{className:"pk-hint"},t.switchStartsFresh):null)}function br({labels:e,onLoadText:t,close:n}){let[o,r]=(0,k.useState)(""),[a,l]=(0,k.useState)(null),[s,i]=(0,k.useState)(null),[d,u]=(0,k.useState)(!1),m=(0,k.useRef)(null),p=(0,k.useRef)(null),g=(0,k.useId)();(0,k.useEffect)(()=>{s||p.current?.focus({preventScroll:!0})},[s]);let y=async f=>{u(!0);let N=await t(f);u(!1),typeof N=="string"?l(N):N?i(N):n()};return s?k.default.createElement(Er,{check:s,labels:e,onCancel:()=>i(null),close:n}):k.default.createElement("form",{className:"pk-inline-form pk-load-view",onSubmit:f=>{f.preventDefault(),y(o)}},k.default.createElement("p",{className:"pk-hint"},e.loadViewHint),k.default.createElement(ke,{multiline:!0,value:o,onChange:f=>{r(f),l(null)},clearLabel:e.clearText,"aria-label":e.loadViewText,placeholder:e.loadViewText,rows:4,spellCheck:!1,"aria-invalid":a?!0:void 0,"aria-describedby":a?g:void 0,"data-testid":"load-view-text",inputRef:p}),a?k.default.createElement("p",{id:g,className:"pk-form-problem",role:"alert","data-testid":"load-view-problem"},a):null,k.default.createElement("input",{ref:m,type:"file",accept:"application/json,.json",className:"pk-sr",tabIndex:-1,"aria-hidden":"true","data-testid":"load-view-file",onChange:async f=>{let N=f.target.files?.[0];if(f.target.value="",N){let v;try{v=N.size>qe.text?null:await N.text()}catch{v=null}v===null?l(N.size>qe.text?e.viewFailed.tooLarge:e.viewFailed.file):y(v)}}}),k.default.createElement("button",{type:"button",className:"pk-btn",onClick:()=>m.current?.click(),disabled:d,"data-testid":"load-view-choose"},k.default.createElement(Z,{name:"file"}),k.default.createElement("span",{className:"pk-btn-text"},e.chooseFile)),k.default.createElement("button",{type:"submit",className:"pk-btn pk-primary",disabled:d||!o.trim(),"data-testid":"load-view-apply"},e.load))}function Nr(e,t){let n=(a,l,s,i,d)=>Promise.resolve().then(a).then(()=>(e.announce(L(l,{name:d})),!0),u=>(e.announce(On(s,i,u),{tone:"error"}),!1)),o=a=>ur(e.viewsText,a,t,e.locale,e.keep);return{save:(a,l)=>{let s=e.viewKey;return n(()=>a.kind==="publish"?e.onPublish(l,e.view):a.kind==="host"?e.onSave(l,e.view,{scope:"user"}):o({name:l,view:e.view,sourceId:e.sourceId,replace:a.at}),t.toastSaved,t.toastSaveFailed,t.toastSaveRejected,l).then(i=>i&&e.onSaved({name:l,scope:a.kind==="publish"?"shared":"user",store:a.kind==="store",storeSource:a.kind==="store"?a.storeSource:null},s))},remove:e.onDelete||e.store?a=>n(()=>a.at!==void 0?o({remove:a.at,removeName:a.name}):e.onDelete(a.name,{scope:a.scope}),t.toastDeleted,t.toastDeleteFailed,t.toastDeleteRejected,a.name):null,publish:e.onPublish?a=>n(()=>e.onPublish(a.name,e.normalized(a.view)),t.toastPublished,t.toastPublishFailed,t.toastPublishRejected,a.name):null}}function ss({templates:e,labels:t,onLoad:n,actions:o,close:r,share:a}){let{save:l,remove:s,publish:i}=Nr(o,t),d={host:!!o.onSave,store:!!o.store,publish:!!i,sourceId:o.sourceId},u=lr(o.loaded,e,d,o.empty),m=o.store&&!o.onSave,[p,g]=(0,k.useState)(null),[y,f]=(0,k.useState)(!1);(0,k.useEffect)(()=>{a?.prepare?.()},[a]);let N=!!i||e.some(F=>F.scope==="shared"&&F.deletable),v=ga(e),b=F=>e.flatMap((w,I)=>w.scope===F?[I]:[]),C=(F,w)=>{let I=e[F],D=v[F],j=ka(w,w.indexOf(F)),J=(z,te)=>()=>g({kind:z,t:I,focus:te});return{id:D,testId:`saved-view-${I.name}`,text:I.name,icon:"bookmark",current:sr(I,o.loaded),closes:!0,run:()=>n(I),info:I.scope==="shared"&&N&&!(s&&I.deletable)?"sharedView":void 0,actions:[...i&&I.scope==="user"?[{id:`publish:${D}`,testId:`publish-view-${I.name}`,text:I.name,label:L(t.publishView,{name:I.name}),icon:"upload",open:"confirm",backTo:`item:${D}`,run:J("publish",`item:${D}`)}]:[],...s&&I.deletable?[{id:`delete:${D}`,testId:`delete-view-${I.name}`,text:I.name,label:L(t.deleteView,{name:I.name}),icon:"trash",open:"confirm",backTo:`item:${D}`,run:J("delete",j===void 0?void 0:`item:${v[j]}`)}]:[]]}},x=b("shared"),S=b("user"),O=[];u&&O.push({id:"save-loaded",text:L(t.saveNamed,{name:o.loaded.name}),icon:"save",disabled:u.kind===null,reason:u.kind===null?t[u.why]:void 0,...u.kind==="publish"?{open:"confirm",run:()=>g({kind:"replaceShared"})}:{closes:!0,run:()=>l(u,o.loaded.name)}}),yt(d)&&O.push({id:"save-as",text:o.loaded?t.saveAs:`${t.saveView}\u2026`,icon:"save",open:"saveAs"}),O.push({id:"new-report",text:t.newEmpty,icon:"newFile",disabled:!o.canNew,reason:o.canNew?void 0:t.newAlready,info:"newReport",closes:!0,run:()=>o.onNew()});let M=a?rr(a,t):null,h=p?.kind==="replaceShared"?{text:L(t.replaceSharedConfirm,{name:o.loaded?.name}),action:t.replaceAction,testId:"replace-shared-confirm",yesId:"confirm-replace-shared",noId:"cancel-replace-shared"}:p?{text:L(p.kind==="publish"?t.publishConfirm:t.deleteConfirm,{name:p.t.name}),action:p.kind==="publish"?t.publishAction:t.deleteAction,testId:`${p.kind}-confirm`,yesId:`confirm-${p.kind}`,noId:`cancel-${p.kind}`}:null,R=[{id:"thisView",title:t.thisView,kind:"inline",titled:!0,groups:[{choices:O}]},...x.length?[{id:"sharedViews",title:t.sharedViews,kind:"inline",titled:!0,groups:[{choices:x.map(F=>C(F,x))}]}]:[],...S.length||yt(d)||!x.length?[{id:"myViews",title:t.myViews,kind:"inline",titled:!0,groups:[{choices:S.map(F=>C(F,S))}],note:S.length?m?t.storeNote:null:m?t.noViewsStore:t.noViews,noteId:m?"store-note":void 0}]:[],...M?[{id:"share",title:t.share,heading:t.shareThisView,kind:"menu",icon:"link",groups:[{choices:[...a.canLink?[{id:"copy-link",text:t.copyLink,icon:"link",closes:!0,run:M.copyLink}]:[],{id:"copy-json",text:t.copyJson,icon:"copy",closes:!0,run:M.copyJson},{id:"download-view",text:t.downloadView,icon:"download",closes:!0,run:M.download},{id:"load-view",text:t.loadView,icon:"upload",open:"load"}]}],note:t.sharePrivacy,noteId:"share-privacy"}]:[],{id:"saveAs",title:t.saveAs,levelTitle:(o.loaded?t.saveAs:t.saveView).replace(/…$/,""),kind:"panel",hidden:!0},{id:"load",title:t.loadView,levelTitle:t.loadView.replace(/…$/,""),kind:"panel",hidden:!0},{id:"confirm",title:h?.action??"",kind:"panel",hidden:!0}],A=(F,w)=>F==="saveAs"?k.default.createElement(wr,{labels:t,button:o.loaded?t.saveAs.replace(/…$/,""):t.save,onSave:(I,D)=>l(D,I),resolve:I=>ir(I,e,d),close:r}):F==="load"&&M?k.default.createElement(br,{labels:t,onLoadText:M.loadText,close:r}):F==="confirm"&&h&&p?k.default.createElement(Do,{question:h.text,action:h.action,cancel:t.cancel,danger:p.kind==="delete",focusYes:p.kind!=="replaceShared",busy:y,testId:h.testId,yesId:h.yesId,noId:h.noId,onNo:()=>w(),onYes:async()=>{if(p.kind==="replaceShared"){r(),l(u,o.loaded.name);return}f(!0);let I=await(p.kind==="publish"?i:s)?.(p.t);f(!1),I&&w(p.focus)}}):null;return k.default.createElement(nt,{name:t.views,labels:t,topics:R,close:r,onPick:Fo(r),panel:A,focusAgain:e.length})}function Ce({icon:e,text:t,info:n,onSelect:o,testId:r,disabled:a,reason:l}){let s=k.default.createElement($e,{icon:e,onSelect:o,disabled:a,reason:l,testId:r},t);return n?k.default.createElement("div",{className:"pk-setting-row"},s,k.default.createElement(_e,{id:n,name:t})):s}function ls({labels:e,onExport:t,chartReady:n,display:o,empty:r=!1,prepare:a,close:l}){(0,k.useEffect)(()=>{a()},[a]);let s=d=>()=>{l(),t(d)},i=r?{disabled:!0,reason:e.exportNeedsField}:{};return k.default.createElement(k.default.Fragment,null,k.default.createElement(He,{title:e.exportDownload},k.default.createElement(Ce,{icon:"file",text:e.exportXlsx,info:"exportXlsx",onSelect:s("xlsx"),...i,testId:"export-xlsx"}),k.default.createElement(Ce,{icon:"file",text:e.exportCsv,info:"exportCsv",onSelect:s("csv"),...i,testId:"export-csv"}),k.default.createElement(Ce,{icon:"image",text:e.exportPng,disabled:r||!n,reason:r?i.reason:o!=="chart"?e.exportPngNeedsChart:void 0,onSelect:s("png"),testId:"export-png"})),k.default.createElement(He,{title:e.exportCopy},k.default.createElement(Ce,{icon:"copy",text:e.copyTable,info:"copyTable",onSelect:s("copy-table"),...i,testId:"export-copy-table"}),k.default.createElement(Ce,{icon:"copy",text:e.copyDataJson,info:"copyDataJson",onSelect:s("copy-json"),...i,testId:"export-copy-json"})))}var Mo="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",gn=null,en=null;function kn(){return en??=import("./export-GKVGFFWM.js").then(e=>(gn=e,e),e=>{throw en=null,e}),en}var xr=()=>gn,Sr=()=>{kn().catch(()=>{})};function cn(e,{doc:t,onExport:n,...o}){return n?.({...o,blob:e})===!1?!1:($o(e,o.fileName,t),!0)}async function Bo(e,{type:t,container:n,onExport:o,...r}){return o?.({...r,blob:new Blob([e],{type:t}),text:e})===!1?"kept":await sn(e,n)?"copied":"blocked"}async function cs(e,{fileName:t,result:n,locale:o,labels:r,limits:a,root:l,chartRef:s,announce:i,onExport:d}){r=to(r);let u=hn(t),m=l.current?.ownerDocument;try{if(e==="png"){let N=l.current?getComputedStyle(l.current).getPropertyValue("--pk-surface").trim():"",v=s.current?.getDataURL({type:"png",pixelRatio:2,backgroundColor:N||void 0}),b=`${u}.png`;v&&cn(nr(v),{kind:e,fileName:b,doc:m,onExport:d})&&i(L(r.toastExported,{file:b}));return}if(!n)return;let p=gn??await kn(),g=Sn(n,{locale:o,labels:r.core,limits:a});if(e==="copy-table"||e==="copy-json"){let N=e==="copy-json",v=await Bo(N?p.toJson(g):p.toTsv(g),{kind:e,fileName:`${u}.${N?"json":"tsv"}`,type:N?"application/json":"text/tab-separated-values",container:l.current,onExport:d});v!=="kept"&&i(v==="copied"?N?r.toastDataCopied:r.toastTableCopied:r.toastCopyBlocked,v==="copied"?void 0:{tone:"error"});return}let y=`${u}.${e}`,f=e==="xlsx"?p.toXlsx(g,{sheetName:u}):p.toCsvBytes(g,{bom:!0});cn(new Blob([f],{type:e==="xlsx"?Mo:"text/csv;charset=utf-8"}),{kind:e,fileName:y,doc:m,onExport:d})&&i(L(r.toastExported,{file:y}))}catch(p){i(L(r.toastExportFailed,{message:$t(p)}),{tone:"error"})}}function Cr({shown:e,count:t},n,o){return e<t?L(n.drillPart,{shown:e.toLocaleString(o),count:t.toLocaleString(o)}):G(n.drillCount,t,{lang:n.lang,locale:o})}async function Tr(e,{drill:t,encoded:n,labels:o,onExport:r,announce:a,root:l}){let{locale:s}=t,i={shown:t.rows.length,count:t.count},d=Cr(i,o,s),u=hn(t.name);try{let m=xr()??await kn();if(e==="drill-copy"||e==="drill-json"){let b=e==="drill-json",C=b?JSON.stringify(Array.from(t.indices,S=>Pn(n,S)),null,2):m.toTsv([t.columns.map(S=>S.label??S.name),...t.rows]),x=await Bo(C,{kind:e,fileName:`${u}.${b?"json":"tsv"}`,type:b?"application/json":"text/tab-separated-values",container:l,onExport:r,rows:i});x!=="kept"&&a(x==="copied"?L(b?o.drillCopiedJson:o.drillCopied,{rows:d}):o.toastCopyBlocked,x==="copied"?void 0:{tone:"error"});return}let p=e==="drill-xlsx",g=Object.fromEntries(t.columns.map(b=>[b.name,b.label??b.name])),y={locale:s,formats:t.formats,labels:{fields:g,true:o.core.true,false:o.core.false}},f=`${u}.${p?"xlsx":"csv"}`,N=p?m.rowsToXlsx(n,t.indices,{...y,sheetName:t.name}):m.rowsToCsvBytes(n,t.indices,y),v=new Blob([N],{type:p?Mo:"text/csv;charset=utf-8"});cn(v,{kind:e,fileName:f,doc:l?.ownerDocument,onExport:r,rows:i})&&a(L(o.drillExported,{file:f,rows:d}))}catch(m){a(L(o.toastExportFailed,{message:$t(m)}),{tone:"error"})}}var ho=new Set(["date","datetime","time"]);function Lr(e,{locale:t,labels:n,format:o}){let r=typeof o=="string"&&Me(o)?o.trim().toLowerCase():null;if(e.type==="date")return{text:Be(r&&ho.has(r.split(":")[0])?r:e.dateOnly?"date":"datetime",{locale:t}),numeric:!1};if(e.type==="number"){let a=new Intl.NumberFormat(t,{maximumFractionDigits:6});return{text:r&&!ho.has(r.split(":")[0])?Be(r,{locale:t}):s=>a.format(s),numeric:r!=="text"}}return e.type==="boolean"?{text:a=>a?n.true:n.false,numeric:!1}:{text:a=>String(a),numeric:!1}}function Or(e,t,{locale:n,labels:o,formatOf:r=()=>{}}){let a=e.columns.map(s=>({column:s,...Lr(s,{locale:n,labels:o,format:r(s.name)})})),l=Array.from(t,s=>a.map(({column:i,text:d})=>{let u=i.codes[s],m=u<0?null:i.dict[u];return m==null?"":d(m)}));return{columns:a.map(s=>({name:s.column.name,numeric:s.numeric})),rows:l}}function Ar(e,t,n,o){let r=[],a=[],l=(s,i,d)=>{let u=Nn(e,s,d);for(let m=u;m&&m.parent;m=m.parent){let p=e.label(s,m,o.core);r.unshift(`${X(i[m.depth-1],o.core)}: ${p}`),a.unshift(p)}};return l("cols",e.colFields,n),l("rows",e.rowFields,t),{title:r.length?r.join(" \xB7 "):o.core.grandTotal,name:a.length?a.join(" \u2013 "):o.core.grandTotal}}function Ir({result:e,rowPath:t,colPath:n,count:o,indices:r,formatOf:a,nameOf:l,infoOf:s},i){let d=Or(e.encoded,r,{locale:e.locale,labels:i.core,formatOf:a}),u=d.columns.map(p=>({...p,label:l(p.name),description:s(p.name)?.description})),m=Object.fromEntries(d.columns.map(p=>[p.name,a(p.name)]).filter(([,p])=>typeof p=="string"));return{...Ar(e,t,n,i),count:o,rows:d.rows,columns:u,indices:r,formats:m,locale:e.locale}}function ms({drill:e,onClose:t,labels:n,locale:o,exportContext:r}){let a=(0,P.useId)(),l=(0,P.useMemo)(()=>e?Ir(e,n):null,[e,n]),s=(0,P.useRef)(null),[i,d]=(0,P.useState)(!1),u=(0,P.useContext)(ut).size==="narrow",{onKeyDown:m}=jn(s,!!l,i?()=>d(!1):t);if((0,P.useEffect)(()=>{l&&r&&Sr()},[l,r]),!l)return null;let p=l.count.toLocaleString(o),g=l.rows.length<l.count,y=(f,N)=>()=>{N(),r&&Tr(f,{drill:l,labels:n,...r,root:r.root.current})};return P.default.createElement(P.default.Fragment,null,P.default.createElement("div",{className:"pk-scrim pk-drill-scrim",onClick:t,"aria-hidden":"true"}),P.default.createElement("div",{className:`pk-drill${i&&!u?" pk-drill-big":""}`,role:"dialog","aria-modal":"true","aria-labelledby":a,"data-testid":"drill-panel","data-pk-enlarged":i&&!u?"":void 0,ref:s,tabIndex:-1,onKeyDown:f=>{f.target instanceof Node&&s.current?.contains(f.target)&&m(f)}},P.default.createElement("div",{className:"pk-drill-head"},P.default.createElement("div",{className:"pk-drill-heading"},P.default.createElement("h2",{id:a},n.drillTitle),P.default.createElement("p",{className:"pk-drill-path"},l.title),P.default.createElement("p",{className:"pk-muted","data-testid":"drill-count"},g?L(n.drillShown,{shown:l.rows.length.toLocaleString(o),count:p}):G(n.drillCount,l.count,{lang:n.lang,locale:o}))),P.default.createElement("div",{className:"pk-drill-actions"},r?P.default.createElement(qn,{label:n.exportLabel,icon:"download",text:n.exportLabel,role:"dialog",align:"end",testId:"drill-export",className:"pk-btn pk-small-btn"},f=>P.default.createElement(P.default.Fragment,null,g?P.default.createElement("p",{className:"pk-hint pk-menu-hint","data-testid":"drill-export-note"},L(n.drillExportNote,{shown:l.rows.length.toLocaleString(o),count:p})):null,P.default.createElement(He,{title:n.exportDownload},P.default.createElement(Ce,{icon:"file",text:n.drillCsv,onSelect:y("drill-csv",f),testId:"drill-csv"}),P.default.createElement(Ce,{icon:"file",text:n.drillXlsx,onSelect:y("drill-xlsx",f),testId:"drill-xlsx"})),P.default.createElement(He,{title:n.exportCopy},P.default.createElement(Ce,{icon:"copy",text:n.drillCopy,info:"drillCopy",onSelect:y("drill-copy",f),testId:"drill-copy"}),P.default.createElement(Ce,{icon:"copy",text:n.drillJson,info:"drillJson",onSelect:y("drill-json",f),testId:"drill-json"})))):null,u?null:P.default.createElement("button",{type:"button",className:"pk-btn pk-pressable pk-small-btn","data-pk-on":i?"":void 0,onClick:()=>d(f=>!f),"data-testid":"drill-enlarge"},P.default.createElement(Z,{name:"enlarge",size:14}),P.default.createElement("span",{className:"pk-btn-text"},i?n.reduce:n.enlarge)),P.default.createElement("button",{type:"button",className:"pk-icon-btn",onClick:t,"data-autofocus":"","aria-label":n.close,title:n.close},P.default.createElement(Z,{name:"x"})))),P.default.createElement("div",{className:"pk-drill-body",tabIndex:0,"aria-label":l.title},P.default.createElement("table",{className:"pk-drill-table"},P.default.createElement("thead",null,P.default.createElement("tr",null,l.columns.map(f=>P.default.createElement("th",{key:f.name,scope:"col",className:f.numeric?"pk-num":void 0,title:f.description,"aria-description":f.description},f.label??f.name)))),P.default.createElement("tbody",null,l.rows.map((f,N)=>P.default.createElement("tr",{key:N},l.columns.map((v,b)=>P.default.createElement("td",{key:v.name,className:v.numeric?"pk-num":void 0},v.numeric||f[b].length<24?f[b]:P.default.createElement("div",{className:"pk-drill-text"},f[b]))))))))))}export{Qr as AxisMenu,as as ChartTypePanel,ms as DrillPanel,ls as ExportPanel,Yr as FilterMenu,Wr as FilterPopover,Er as LoadCheck,rs as OptionsPanel,Xr as ValueMenu,ss as ViewsPanel,_o as addMenuTexts,Ho as hasMenuTexts,to as menuLabels,Sr as prepareExporters,cs as runExport,os as storedViews};
@@ -1 +0,0 @@
1
- import"./chunk-DCANE7XH.js";var k={item:"{subject}: {text}",quote:"\u201C{key}\u201D",position:"{subject} (no. {n} in {part})",view:"The view",sections:{sort:"Sorting",derived:"Groupings",totals:"Totals",collapsed:"Collapsed groups",display:"Table or chart",chart:"Chart",formatting:"Formatting"},settings:{display:"display",type:"chart type",valueLabels:"value labels",legend:"legend position",axisLabels:"axis labels",groupLabels:"group labels",labelPosition:"label position",other:"setting"},dropped:{rows:"it is left out of Rows",cols:"it is left out of Columns",values:"this value is left out",filters:"this filter is left out",sort:"the usual order is used",derived:"this grouping is left out",other:"it is left out"},codes:{notView:"this is not a pivotkit view - the report starts empty",notJson:"this is not valid JSON - the report starts empty",tooLarge:"the view is too large - the report starts empty",badVersion:"the view has an unknown version - the report starts empty",newerVersion:"the view comes from a newer pivotkit - the report starts empty; update pivotkit to open it",noMigration:"the view cannot be brought to this version - the report starts empty",unknownKey:"this setting is unknown here - it is ignored",notList:"this is not a list - nothing of it is used",tooMany:"more than {max} entries - only the first {max} are used",tooManyItems:"more than {max} items - only the first {max} are used",itemType:"the item \u201C{value}\u201D does not fit a {type} field - it is left out",unknownField:"the data has no field \u201C{field}\u201D - {dropped}",unknownFieldHere:"the data has no field of this name - {dropped}",placedTwice:"the field is in Rows or Columns twice - only its first place is used",groupingNoName:"the grouping has no name - it is left out",groupingNameTaken:"the data already has a field of this name - the grouping is left out",groupingNoSource:"the data has no field \u201C{field}\u201D to group - the grouping is left out",groupingUnknown:"the grouping \u201C{value}\u201D is unknown - it is left out",binsNeedNumber:"ranges need a number field, \u201C{field}\u201D is not one - the grouping is left out",groupingNeedsDate:"a date grouping needs a date field, \u201C{field}\u201D is not one - the grouping is left out",binSize:"ranges need a size above zero - the grouping is left out",notValueRef:"this is not a value - {dropped}",unknownAggregator:"the calculation \u201C{value}\u201D is unknown - {dropped}",aggregatorNeedsField:"{agg} needs a field - {dropped}",aggregatorType:"{agg} does not work on \u201C{field}\u201D ({type}) - {dropped}",unknownFormat:"the number format \u201C{value}\u201D is unknown - the usual format is used",badLabel:"the name is empty or longer than {max} characters - the usual name is used",unknownShowAs:"\u201CShow as\u201D \u201C{value}\u201D is unknown - the plain value is shown",showAsNotAdditive:"this \u201CShow as\u201D needs a sum or a count, not {agg} - the plain value is shown",showAsNotNumber:"{agg} gives no number to show as a share - the plain value is shown",unknownConditional:"the colour format \u201C{value}\u201D is unknown - the value is shown without colours",conditionalNotNumber:"colours need a number value - the value is shown without colours",colorScaleColors:"the colour scale needs two or three colours - the default colours are used",dataBarColor:"the bar colour is not a colour - the default colour is used",unknownFilterType:"the filter type \u201C{value}\u201D is unknown - this filter is left out",filterNoItems:"the filter lists no items - it is left out",filterLabelOp:"the text condition \u201C{value}\u201D is unknown - this filter is left out",filterText:"the text condition has no text - this filter is left out",filterNotNumber:"{agg} gives no number to filter by - this filter is left out",filterCount:"Top needs a whole number from 1 to {max} - this filter is left out",filterValue:"the condition needs a comparison and a number - this filter is left out",filterValue2:"\u201C{value}\u201D needs a second number - this filter is left out",filterCompareField:"only numbers and dates can be compared - this filter is left out",filterCompareValue:"the comparison needs an operator and a number or a date (2022-03-01) that fits the field - this filter is left out",filterRelativeField:"a range like \u201Clast 5 years\u201D needs a date field - this filter is left out",filterRelativeUnit:"the unit \u201C{value}\u201D is unknown (years, months or days) - this filter is left out",filterRelativeCount:"the range needs a whole number from 1 to {max} - this filter is left out",filterRelativeAnchor:"the range can count back from \u201Ctoday\u201D or from \u201Clatest\u201D (the latest record), not from \u201C{value}\u201D - this filter is left out",sortNoItems:"the custom order lists no items - the usual order is used",sortedTwice:"the field is sorted twice - only its first sort is used",badTotals:"the totals cannot be read - the usual totals are shown",collapsedPath:"a collapsed group does not fit the fields - it is shown expanded",unknownSetting:"the {setting} \u201C{value}\u201D is unknown - the default is used",badTitle:"the title is empty or longer than {max} characters - the chart has no title",unknownLocale:"the language \u201C{value}\u201D is unknown - the report's language is used",unknownTimeZone:"the time zone \u201C{value}\u201D is unknown - the data's time zone is used",timeZoneMismatch:"the view was made for the time zone {value}, the data is in {zone} - times are read in {zone}"},other:"this part could not be used - it is left out"},f=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),i=(e,a)=>f(e)&&Object.hasOwn(e,a)?e[a]:void 0,p=e=>typeof e=="string"&&e.trim()!==""?e.trim():null,g=/^(rows|cols|values|filters|sort|derived)\[(\d+)\]/;function C(e,a){let s=p(i(e,"label"));if(s)return s;let n=i(e,"agg");if(typeof n!="string")return null;let o=i(e,"field");return a.value({field:typeof o=="string"?o:null,agg:n,label:null,showAs:null})}function D(e,a,s,n){if(e.code==="unknownKey")return n.fill(s.quote,{key:e.path});let o=g.exec(e.path);if(o){let r=i(a,o[1]),u=Array.isArray(r)?r[Number(o[2])]:void 0,d=o[1]==="values"?C(u,n):p(o[1]==="rows"||o[1]==="cols"?u:o[1]==="derived"?i(u,"name"):i(u,"field"));if(d)return o[1]==="values"||o[1]==="derived"?d:n.field(d)}let t=/^[a-z]*/i.exec(e.path)?.[0]??"";return i(n.labels.zones,t)??i(s.sections,t)??s.view}function c(e,a,s,n){let{labels:o,fill:t}=n,r=/^[a-z]*/i.exec(e.path)?.[0]??"",u=typeof e.code=="string"?e.code:"",d=u==="unknownField"&&/^(rows|cols|filters|sort)\[\d+\]$/.test(e.path)?"unknownFieldHere":u,m=u?i(s.codes,d)??s.other:"{message}",l=f(e.params)?e.params:{},w=o.core,v={dropped:i(s.dropped,r)??s.dropped.other,setting:i(s.settings,e.path.split(".").pop()??"")??s.settings.other,field:typeof l.field=="string"?n.field(l.field):"",value:l.value??"",agg:typeof l.agg=="string"?i(w.aggregators,l.agg)??l.agg:"",type:typeof l.type=="string"?i(o.types,l.type)??l.type:"",max:typeof l.max=="number"?l.max.toLocaleString(o.lang):"",zone:l.zone??"",message:e.message},[b,y=""]=s.item.split("{subject}"),h={text:t(m,v)};return{pre:t(b,h),subject:D(e,a,s,n),post:t(y,h)}}function N(e,a,s){let n=e.map(t=>({...c(t.issue,t.raw,a,s),at:g.exec(t.issue.path)})),o=new Map;for(let t of n){let r=o.get(t.subject)??new Set;r.add(t.at?t.at[0]:""),o.set(t.subject,r)}return n.map(({at:t,...r})=>{if(!t||o.get(r.subject).size<2)return r;let u=i(s.labels.zones,t[1])??i(a.sections,t[1])??t[1];return{...r,subject:s.fill(a.position,{subject:r.subject,n:Number(t[2])+1,part:u})}})}export{k as en,c as unusedItem,N as unusedItems};
@@ -1 +0,0 @@
1
- import"./chunk-DCANE7XH.js";var e={item:"{subject}: {text}",quote:"\u201E{key}\u201C",position:"{subject} (Nr. {n}, {part})",view:"Die Ansicht",sections:{sort:"Sortierung",derived:"Gruppierungen",totals:"Summen",collapsed:"Zugeklappte Gruppen",display:"Tabelle oder Diagramm",chart:"Diagramm",formatting:"Formatierung"},settings:{display:"Darstellung",type:"Diagrammtyp",valueLabels:"Wertbeschriftung",legend:"Legendenposition",axisLabels:"Achsenbeschriftung",groupLabels:"Gruppenbeschriftung",labelPosition:"Beschriftungsposition",other:"Einstellung"},dropped:{rows:"es wird in Zeilen weggelassen",cols:"es wird in Spalten weggelassen",values:"dieser Wert wird weggelassen",filters:"dieser Filter wird weggelassen",sort:"die \xFCbliche Reihenfolge gilt",derived:"diese Gruppierung wird weggelassen",other:"es wird weggelassen"},codes:{notView:"das ist keine pivotkit-Ansicht - der Bericht beginnt leer",notJson:"das ist kein g\xFCltiges JSON - der Bericht beginnt leer",tooLarge:"die Ansicht ist zu gro\xDF - der Bericht beginnt leer",badVersion:"die Ansicht hat eine unbekannte Version - der Bericht beginnt leer",newerVersion:"die Ansicht stammt aus einem neueren pivotkit - der Bericht beginnt leer; aktualisieren Sie pivotkit, um sie zu \xF6ffnen",noMigration:"die Ansicht l\xE4sst sich nicht auf diese Version bringen - der Bericht beginnt leer",unknownKey:"diese Einstellung ist hier unbekannt - sie wird ignoriert",notList:"das ist keine Liste - nichts davon wird verwendet",tooMany:"mehr als {max} Eintr\xE4ge - nur die ersten {max} werden verwendet",tooManyItems:"mehr als {max} Eintr\xE4ge - nur die ersten {max} werden verwendet",itemType:"der Eintrag \u201E{value}\u201C passt nicht zu einem Feld vom Typ {type} - er wird weggelassen",unknownField:"die Daten haben kein Feld \u201E{field}\u201C - {dropped}",unknownFieldHere:"die Daten haben kein Feld mit diesem Namen - {dropped}",placedTwice:"das Feld steht zweimal in Zeilen oder Spalten - nur sein erster Platz gilt",groupingNoName:"die Gruppierung hat keinen Namen - sie wird weggelassen",groupingNameTaken:"die Daten haben schon ein Feld mit diesem Namen - die Gruppierung wird weggelassen",groupingNoSource:"die Daten haben kein Feld \u201E{field}\u201C zum Gruppieren - die Gruppierung wird weggelassen",groupingUnknown:"die Gruppierung \u201E{value}\u201C ist unbekannt - sie wird weggelassen",binsNeedNumber:"Bereiche brauchen ein Zahlenfeld, \u201E{field}\u201C ist keines - die Gruppierung wird weggelassen",groupingNeedsDate:"eine Datumsgruppierung braucht ein Datumsfeld, \u201E{field}\u201C ist keines - die Gruppierung wird weggelassen",binSize:"Bereiche brauchen eine Gr\xF6\xDFe \xFCber null - die Gruppierung wird weggelassen",notValueRef:"das ist kein Wert - {dropped}",unknownAggregator:"die Berechnung \u201E{value}\u201C ist unbekannt - {dropped}",aggregatorNeedsField:"{agg} braucht ein Feld - {dropped}",aggregatorType:"{agg} geht nicht mit \u201E{field}\u201C ({type}) - {dropped}",unknownFormat:"das Zahlenformat \u201E{value}\u201C ist unbekannt - das \xFCbliche Format gilt",badLabel:"der Name ist leer oder l\xE4nger als {max} Zeichen - der \xFCbliche Name gilt",unknownShowAs:"\u201EAnzeigen als\u201C \u201E{value}\u201C ist unbekannt - der Wert wird ohne Berechnung gezeigt",showAsNotAdditive:"dieses \u201EAnzeigen als\u201C braucht eine Summe oder Anzahl, nicht {agg} - der Wert wird ohne Berechnung gezeigt",showAsNotNumber:"{agg} ergibt keine Zahl f\xFCr einen Anteil - der Wert wird ohne Berechnung gezeigt",unknownConditional:"die Farbformatierung \u201E{value}\u201C ist unbekannt - der Wert wird ohne Farben gezeigt",conditionalNotNumber:"Farben brauchen einen Zahlenwert - der Wert wird ohne Farben gezeigt",colorScaleColors:"die Farbskala braucht zwei oder drei Farben - die Standardfarben werden verwendet",dataBarColor:"die Balkenfarbe ist keine Farbe - die Standardfarbe wird verwendet",unknownFilterType:"die Filterart \u201E{value}\u201C ist unbekannt - dieser Filter wird weggelassen",filterNoItems:"der Filter nennt keine Eintr\xE4ge - er wird weggelassen",filterLabelOp:"die Textbedingung \u201E{value}\u201C ist unbekannt - dieser Filter wird weggelassen",filterText:"die Textbedingung hat keinen Text - dieser Filter wird weggelassen",filterNotNumber:"{agg} ergibt keine Zahl zum Filtern - dieser Filter wird weggelassen",filterCount:"\u201EOberste\u201C braucht eine ganze Zahl von 1 bis {max} - dieser Filter wird weggelassen",filterValue:"die Bedingung braucht einen Vergleich und eine Zahl - dieser Filter wird weggelassen",filterValue2:"\u201E{value}\u201C braucht eine zweite Zahl - dieser Filter wird weggelassen",filterCompareField:"nur Zahlen und Daten lassen sich vergleichen - dieser Filter wird weggelassen",filterCompareValue:"der Vergleich braucht einen Operator und eine Zahl oder ein Datum (2022-03-01), das zum Feld passt - dieser Filter wird weggelassen",filterRelativeField:"ein Zeitraum wie \u201Eletzte 5 Jahre\u201C braucht ein Datumsfeld - dieser Filter wird weggelassen",filterRelativeUnit:"die Einheit \u201E{value}\u201C ist unbekannt (Jahre, Monate oder Tage) - dieser Filter wird weggelassen",filterRelativeCount:"der Zeitraum braucht eine ganze Zahl von 1 bis {max} - dieser Filter wird weggelassen",filterRelativeAnchor:"der Zeitraum kann ab \u201Etoday\u201C (heute) oder \u201Elatest\u201C (dem letzten Datensatz) zur\xFCckz\xE4hlen, nicht ab \u201E{value}\u201C - dieser Filter wird weggelassen",sortNoItems:"die eigene Reihenfolge nennt keine Eintr\xE4ge - die \xFCbliche Reihenfolge gilt",sortedTwice:"das Feld wird zweimal sortiert - nur seine erste Sortierung gilt",badTotals:"die Summen lassen sich nicht lesen - die \xFCblichen Summen werden gezeigt",collapsedPath:"eine zugeklappte Gruppe passt nicht zu den Feldern - sie wird aufgeklappt gezeigt",unknownSetting:"{setting} \u201E{value}\u201C ist unbekannt - die Voreinstellung gilt",badTitle:"der Titel ist leer oder l\xE4nger als {max} Zeichen - das Diagramm hat keinen Titel",unknownLocale:"die Sprache \u201E{value}\u201C ist unbekannt - die Sprache des Berichts gilt",unknownTimeZone:"die Zeitzone \u201E{value}\u201C ist unbekannt - die Zeitzone der Daten gilt",timeZoneMismatch:"die Ansicht wurde f\xFCr die Zeitzone {value} gemacht, die Daten sind in {zone} - Zeiten gelten in {zone}"},other:"dieser Teil konnte nicht verwendet werden - er wird weggelassen"};export{e as de};