import defineReactive from"./define-reactive";export function extend(a,b){return Object.setPrototypeOf(a,b),defineReactive(a,{set(c,d,e){if(!Object.prototype.hasOwnProperty.call(a,d))return Reflect.set(b,d,e,b)}})}export function toArray(a){return Array.isArray(a)?a:[a]}export function getElement(a){if("string"==typeof a){const b=document.getElementById(a);return b}return a}export function toNumber(a,b=0){return+a||b}export function createUUid(){let a=16;const b=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],c=[];let d;for(a=a||b.length,d=0;d<32;d++)c[d]=b[0|Math.random()*a];return c.join("")}export function randomString(a,b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let c="";for(let d=a;0<d;--d)c+=b[Math.floor(Math.random()*b.length)];return c}export function getUrlParams(){const a=window.location.search.substring(1),b={};return a.split("&").forEach(a=>{const[c,d]=a.split("=");b[decodeURIComponent(c)]=decodeURIComponent(d)}),b}export function isDebugger(){const a=getUrlParams();return a.debug}