1import{s as b}from"./text-BZmjpdal.js";import{m as x,a as w}from"./cellMap-CL2lBB-A.js";import{m as v,r as C,p as $}from"./harness-CiOCBEeI.js";import"./vite-preload-ckwbz45p.js";import"./util-CkZ8KZK2.js";import"./csvShared-8k83eY5V.js";import"./vendor-papaparse-Btpkh8vH.js";import"./cjs-helpers-D6-XlEtG.js";import"./detectTableRegion-B60ufQHb.js";const O={hyphen:"-",underscore:"_",dot:".",none:""};function A(e){const a=O[e.options.separator??"hyphen"]??"-",u=e.options.letterCase!=="keep",f=e.options.accents!=="keep",l=Math.max(0,C(e.options.maxLength,0)),d=e.options.unique==="on",p=e.options.keep!=="replace",m=new Map;let h=0;const o=x({header:e.header,body:e.body,chosen:e.options.columns,fallback:n=>n.slice(0,1),suffix:"_slug",keepOriginal:p,transform:(n,i)=>{const s=b(n,{separator:a,lowercase:u,foldAccents:f,maxLength:l});if(!d)return{value:s};let t=m.get(i);t||(t=new Map,m.set(i,t));const r=t.get(s)??0;if(t.set(s,r+1),r===0)return{value:s};h+=1;const k=a===""?String(r+1):`${a}${r+1}`;return{value:`${s}${k}`}}});let c=0;for(const n of o.columns){const i=o.header.indexOf(p?`${n}_slug`:n);if(!(i<0))for(const s of o.body){const t=s[i]??"",r=s[o.header.indexOf(n)]??"";t===""&&r!==""&&(c+=1)}}const g=[$(e.body.length,"row"),`slugified ${o.columns.join(", ")||"no column"}`,a===""?"no separator":`separator "${a}"`,u?"lowercased":"case kept",f?"accents folded":"accents kept",...l>0?[`capped at ${l} characters`]:[],p?"original kept":"original replaced"];d&&g.push(`${$(h,"collision")} numbered`);const y=[...w(o,"slugified")];return c>0&&y.push(`${c} cell${c===1?"":"s"} produced an empty slug because nothing in ${c===1?"it":"them"} survives the character filter. Turn accent folding on, or check for values written in a non-Latin script.`),{header:o.header,body:o.body,summary:g,warnings:y}}const I=v("slugified",A);export{I as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.