PageSourceSearch

https://python-fiddle.com/_nuxt/C2e7SNC4.js

js python-fiddle.com collected 2026-09-24 12:13:17 UTC 3,544 bytes, 1 lines download raw bytes

1import C from"./LDmNtPda.js";import S from"./CV6noEc0.js";import b from"./CWbIKBpY.js";import{_ as E}from"./DEWBa1i1.js";import{P as N,r as _,B as $,c as d,a as p,w as L,o as x,j as m,t as g,u as a,k as j,i as h,F as q,q as A}from"#entry";import"./DFuKEkiz.js";import"./IljeZfEr.js";import"./BSVX_odH.js";import"./n2VQwx6s.js";import"./CPdS71ql.js";import"./DGIXZPzC.js";import"./Bbvo2KRq.js";import"./DlAUqK2U.js";import"./DOBxUZCA.js";import"./DLTAocxR.js";import"./CBRtWl27.js";import"./CJ5NhiWv.js";import"./Bf_2DgNn.js";import"./Bv_fBYKe.js";import"./Bd_6KxB9.js";const l=[];for(let t=0;t<256;++t)l.push((t+256).toString(16).slice(1));function w(t,n=0){return(l[t[n+0]]+l[t[n+1]]+l[t[n+2]]+l[t[n+3]]+"-"+l[t[n+4]]+l[t[n+5]]+"-"+l[t[n+6]]+l[t[n+7]]+"-"+l[t[n+8]]+l[t[n+9]]+"-"+l[t[n+10]]+l[t[n+11]]+l[t[n+12]]+l[t[n+13]]+l[t[n+14]]+l[t[n+15]]).toLowerCase()}let y;const F=new Uint8Array(16);function V(){if(!y){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");y=crypto.getRandomValues.bind(crypto)}return y(F)}const H=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v={randomUUID:H};function T(t,n,i){if(v.randomUUID&&!t)return v.randomUUID();t=t||{};const e=t.random??t.rng?.()??V();if(e.length<16)throw new Error("Random bytes length must be >= 16");return e[6]=e[6]&15|64,e[8]=e[8]&63|128,w(e)}const U={};function G(t,n,i){let e;{const o=Date.now(),c=V();P(U,o,c),e=W(c,U.msecs,U.seq,n,i)}return n??w(e)}function P(t,n,i){return t.msecs??=-1/0,t.seq??=0,n>t.msecs?(t.seq=i[6]<<23|i[7]<<16|i[8]<<8|i[9],t.msecs=n):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function W(t,n,i,e,o=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!e)e=new Uint8Array(16),o=0;else if(o<0||o+16>e.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);return n??=Date.now(),i??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],e[o++]=n/1099511627776&255,e[o++]=n/4294967296&255,e[o++]=n/16777216&255,e[o++]=n/65536&255,e[o++]=n/256&255,e[o++]=n&255,e[o++]=112|i>>>28&15,e[o++]=i>>>20&255,e[o++]=128|i>>>14&63,e[o++]=i>>>6&255,e[o++]=i<<2&255|t[10]&3,e[o++]=t[11],e[o++]=t[12],e[o++]=t[13],e[o++]=t[14],e[o++]=t[15],e}const z={class:"text-center text-3xl sm:text-5xl font-bold tracking-tight text-default-text-base my-8"},J={class:"mt-4 mb-8 text-xl sm:text-2xl leading-8 text-default-text-lighter text-center"},K={class:"text-lg my-8"},M={class:"max-w-xl mx-auto"},O={key:0,class:"mt-4"},Q={class:"p-4 rounded bg-default-bg-light rounded"},gt={__name:"uuid",setup(t){const{page:n}=N(),i=_("v4"),e=_(1),o=_([]);function c(){o.value=[];for(let s=0;s<e.value;s++)o.value.push(i.value==="v4"?T():G())}return $([i,e],()=>{c()},{immediate:!0}),(s,r)=>{const D=C,I=S,R=b,k=E;return x(),d("div",null,[p(k,null,{default:L(()=>[m("h1",z,g(a(n).title),1),m("h2",J,g(a(n).description),1),m("div",K,[m("div",M,[p(D,{modelValue:a(i),"onUpdate:modelValue":r[0]||(r[0]=u=>h(i)?i.value=u:null),label:"UUID Version:",options:[{value:"v4",text:"v4 (Random)"},{value:"v7",text:"v7 (Time-based)"}]},null,8,["modelValue"]),p(I,{modelValue:a(e),"onUpdate:modelValue":r[1]||(r[1]=u=>h(e)?e.value=u:null),label:"How many?"},null,8,["modelValue"]),a(o).length>0?(x(),d("div",O,[r[2]||(r[2]=m("h3",{class:"text-xl font-semibold mb-2"},"Generated UUIDs:",-1)),m("ul",Q,[(x(!0),d(q,null,A(a(o),(u,B)=>(x(),d("li",{key:B,class:"mb-1"},g(u),1))),128))])])):j("",!0)]),p(R)])]),_:1})])}}};export{gt 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.