PageSourceSearch

https://lifehacker.ru/_nuxt/v7.12-EY0gt0hD.js

js lifehacker.ru collected 2026-09-24 08:27:21 UTC 1,548 bytes, 2 lines download raw bytes

1import{b9 as y,dW as M,dT as N,bR as u,el as c,em as f,en as T}from"./v7.12-_pfsIBSO.js";const b="$s";function O(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[o,n]=t;if(!o||typeof o!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+o);if(n!==void 0&&typeof n!="function")throw new Error("[nuxt] [useState] init must be a function: "+n);const s=b+o,r=y(),a=M(r.payload.state,s);if(a.value===void 0&&n){const i=n();if(N(i))return r.payload.state[s]=i,i;a.value=i}return a}function w(t){return t%10===1&&t%100!==11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2}function m(t,...e){let o;switch(e.length){case 1:throw new Error("Not enough forms");case 2:o=t>1?e[1]:e[0];break;default:o=e[w(t)];break}return o.replace(/%d/g,t.toString())}const $=t=>m(t,"минуту","минуты","минут"),E=t=>m(t,"час","часа","часов"),I=t=>{const e=new Date(t.replace(/-/g,"/")),o=e.getTime(),n=e.getTimezoneOffset(),s=n<=0?Math.abs(n):-n,r=o+s*6e4;return new Date(r)},_=t=>{const e=I(t),o=Math.abs(new Date().getTime()-e.getTime()),n=Math.trunc(o/c/f/T),s=Math.trunc(o/c/f),r=e.getDate(),a=e.getHours(),i=e.getMinutes(),l=e.getFullYear(),g=e.getMonth()+1;if(n>=24){const p=u(g),S=u(i),d=u(a),h=u(r),D=String(l).slice(2);return`${h}.${p}.${D} ${d}:${S}`}if(n<24){if(n<24&&n!==0)return`${n} ${E(n)} назад`;if(s>0)return`${s} ${$(s)} назад`;if(s===0)return"Только что"}return""};export{_ as a,I as g,O as u};
2//# sourceMappingURL=v7.12-EY0gt0hD.js.map

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.