1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7878],{57878:(e,t,r)=>{r.d(t,{optimizeSVG:()=>i});var o=r(67033),n=r.n(o);async function i(e,t){let r=new Blob([e]).size;if(!e.trim())throw Error("Add SVG code or upload an SVG file first.");if(r>0xa00000)throw Error("SVG files must be 10 MB or smaller.");if(!Number.isInteger(t.precision)||t.precision<0||t.precision>5)throw Error("Number precision must be between 0 and 5.");let o=!t.preserveAnimations,i=t.roundNumbers&&o,s=new(n())({full:!0,multipass:!0,floatPrecision:t.precision,plugins:[{requireSvgRoot:{type:"full",active:!0,fn:e=>{let t=e.content.filter(e=>e.elem),r=t[0],o=r?.elem?.split(":")??[],n=2===o.length,i=n?o[1]:o[0],s=r?.attrs?.[n?`xmlns:${o[0]}`:"xmlns"]?.value;if(1!==t.length||o.length>2||"svg"!==i||"http://www.w3.org/2000/svg"!==s&&!(!n&&void 0===s))throw Error("The document must have a single SVG root element.");return e}}},{removeComments:t.removeComments},{removeMetadata:t.removeMetadata},{cleanupAttrs:!0},{removeEmptyText:t.removeEmptyElements&&o},{removeEmptyContainers:t.removeEmptyElements&&o},{removeHiddenElems:t.removeHiddenElements&&o},{cleanupNumericValues:i},{convertPathData:i},{convertTransform:i},{mergePaths:t.mergePaths&&o}]}),m=await s.optimize(e);if("string"!=typeof m.data)throw Error("SVG optimization did not produce a file.");let a=new Blob([m.data]).size,l=Math.round((r-a)/r*100);return{originalSize:r,optimizedSize:a,reduction:l,optimizedSvg:m.data}}}}]);
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.