PageSourceSearch

https://www.tomsears.me/_app/chunks/interpolate-462a9f4d.js

js tomsears.me collected 2026-10-04 04:34:22 UTC 5,415 bytes, 1 lines download raw bytes

vendor: 5,415 bytes, line 1
1import{m as j}from"./use-gesture-vanilla.esm-6fdb85ad.js";import{c as W}from"./clamp-3d9099c5.js";var le=function(){},C=function(){};const N=(e,r,t)=>{const n=r-e;return n===0?1:(t-e)/n},R=(e,r)=>t=>Math.max(Math.min(t,r),e),i=e=>e%1?Number(e.toFixed(5)):e,b=/(-)?([\d]*\.?[\d])+/g,y=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,z=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function p(e){return typeof e=="string"}const d={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$=Object.assign(Object.assign({},d),{transform:R(0,1)});Object.assign(Object.assign({},d),{default:1});const D=e=>({test:r=>p(r)&&r.endsWith(e)&&r.split(" ").length===1,parse:parseFloat,transform:r=>`${r}${e}`}),m=D("%");Object.assign(Object.assign({},m),{parse:e=>m.parse(e)/100,transform:e=>m.transform(e*100)});const M=(e,r)=>t=>Boolean(p(t)&&z.test(t)&&t.startsWith(e)||r&&Object.prototype.hasOwnProperty.call(t,r)),k=(e,r,t)=>n=>{if(!p(n))return n;const[s,a,o,c]=n.match(b);return{[e]:parseFloat(s),[r]:parseFloat(a),[t]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}},f={test:M("hsl","hue"),parse:k("hue","saturation","lightness"),transform:({hue:e,saturation:r,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+m.transform(i(r))+", "+m.transform(i(t))+", "+i($.transform(n))+")"},P=R(0,255),g=Object.assign(Object.assign({},d),{transform:e=>Math.round(P(e))}),u={test:M("rgb","red"),parse:k("red","green","blue"),transform:({red:e,green:r,blue:t,alpha:n=1})=>"rgba("+g.transform(e)+", "+g.transform(r)+", "+g.transform(t)+", "+i($.transform(n))+")"};function Z(e){let r="",t="",n="",s="";return e.length>5?(r=e.substr(1,2),t=e.substr(3,2),n=e.substr(5,2),s=e.substr(7,2)):(r=e.substr(1,1),t=e.substr(2,1),n=e.substr(3,1),s=e.substr(4,1),r+=r,t+=t,n+=n,s+=s),{red:parseInt(r,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const O={test:M("#"),parse:Z,transform:u.transform},h={test:e=>u.test(e)||O.test(e)||f.test(e),parse:e=>u.test(e)?u.parse(e):f.test(e)?f.parse(e):O.parse(e),transform:e=>p(e)?e:e.hasOwnProperty("red")?u.transform(e):f.transform(e)},A="${c}",S="${n}";function q(e){var r,t,n,s;return isNaN(e)&&p(e)&&((t=(r=e.match(b))===null||r===void 0?void 0:r.length)!==null&&t!==void 0?t:0)+((s=(n=e.match(y))===null||n===void 0?void 0:n.length)!==null&&s!==void 0?s:0)>0}function L(e){typeof e=="number"&&(e=`${e}`);const r=[];let t=0;const n=e.match(y);n&&(t=n.length,e=e.replace(y,A),r.push(...n.map(h.parse)));const s=e.match(b);return s&&(e=e.replace(b,S),r.push(...s.map(d.parse))),{values:r,numColors:t,tokenised:e}}function w(e){return L(e).values}function V(e){const{values:r,numColors:t,tokenised:n}=L(e),s=r.length;return a=>{let o=n;for(let c=0;c<s;c++)o=o.replace(c<t?A:S,c<t?h.transform(a[c]):i(a[c]));return o}}const J=e=>typeof e=="number"?0:e;function K(e){const r=w(e);return V(e)(r.map(J))}const B={test:q,parse:w,createTransformer:V,getAnimatableNone:K};function x(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function I({hue:e,saturation:r,lightness:t,alpha:n}){e/=360,r/=100,t/=100;let s=0,a=0,o=0;if(!r)s=a=o=t;else{const c=t<.5?t*(1+r):t+r-t*r,l=2*t-c;s=x(l,c,e+1/3),a=x(l,c,e),o=x(l,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}const Q=(e,r,t)=>{const n=e*e,s=r*r;return Math.sqrt(Math.max(0,t*(s-n)+n))},X=[O,u,f],F=e=>X.find(r=>r.test(e)),H=(e,r)=>{let t=F(e),n=F(r),s=t.parse(e),a=n.parse(r);t===f&&(s=I(s),t=u),n===f&&(a=I(a),n=u);const o=Object.assign({},s);return c=>{for(const l in o)l!=="alpha"&&(o[l]=Q(s[l],a[l],c));return o.alpha=j(s.alpha,a.alpha,c),t.transform(o)}},Y=e=>typeof e=="number",v=(e,r)=>t=>r(e(t)),_=(...e)=>e.reduce(v);function G(e,r){return Y(e)?t=>j(e,r,t):h.test(e)?H(e,r):E(e,r)}const U=(e,r)=>{const t=[...e],n=t.length,s=e.map((a,o)=>G(a,r[o]));return a=>{for(let o=0;o<n;o++)t[o]=s[o](a);return t}},ee=(e,r)=>{const t=Object.assign(Object.assign({},e),r),n={};for(const s in t)e[s]!==void 0&&r[s]!==void 0&&(n[s]=G(e[s],r[s]));return s=>{for(const a in n)t[a]=n[a](s);return t}};function T(e){const r=B.parse(e),t=r.length;let n=0,s=0,a=0;for(let o=0;o<t;o++)n||typeof r[o]=="number"?n++:r[o].hue!==void 0?a++:s++;return{parsed:r,numNumbers:n,numRGB:s,numHSL:a}}const E=(e,r)=>{const t=B.createTransformer(r),n=T(e),s=T(r);return n.numHSL===s.numHSL&&n.numRGB===s.numRGB&&n.numNumbers>=s.numNumbers?_(U(n.parsed,s.parsed),t):o=>`${o>0?r:e}`},re=(e,r)=>t=>j(e,r,t);function te(e){if(typeof e=="number")return re;if(typeof e=="string")return h.test(e)?H:E;if(Array.isArray(e))return U;if(typeof e=="object")return ee}function ne(e,r,t){const n=[],s=t||te(e[0]),a=e.length-1;for(let o=0;o<a;o++){let c=s(e[o],e[o+1]);if(r){const l=Array.isArray(r)?r[o]:r;c=_(l,c)}n.push(c)}return n}function se([e,r],[t]){return n=>t(N(e,r,n))}function oe(e,r){const t=e.length,n=t-1;return s=>{let a=0,o=!1;if(s<=e[0]?o=!0:s>=e[n]&&(a=n-1,o=!0),!o){let l=1;for(;l<t&&!(e[l]>s||l===n);l++);a=l-1}const c=N(e[a],e[a+1],s);return r[a](c)}}function ue(e,r,{clamp:t=!0,ease:n,mixer:s}={}){const a=e.length;C(a===r.length),C(!n||!Array.isArray(n)||n.length===a-1),e[0]>e[a-1]&&(e=[].concat(e),r=[].concat(r),e.reverse(),r.reverse());const o=ne(r,n,s),c=a===2?se(e,o):oe(e,o);return t?l=>c(W(e[0],e[a-1],l)):c}export{ue as i,le as w};

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.