PageSourceSearch

https://oicd.net/js/framework.js

js oicd.net collected 2026-10-02 17:44:25 UTC 31,610 bytes, 1 lines download raw bytes

1class Divhunt{config={};hold={};data={debounce:{},triggers:{},counter:{},increaser:{},taken:{},config:{},focus:{window:!0},keys:{focus:{code:0,time:0,password:null,callbacks:{}},alt:{code:18,time:0,password:null,callbacks:{}},ctrl:{code:17,time:0,password:null,callbacks:{}},enter:{code:13,time:0,password:null,callbacks:{}},meta:{code:91,time:0,password:null,callbacks:{}},shift:{code:16,time:0,password:null,callbacks:{}},space:{code:32,time:0,password:null,callbacks:{}},backspace:{code:8,time:0,password:null,callbacks:{}},escape:{code:27,time:0,password:null,callbacks:{}},up:{code:38,time:0,password:null,callbacks:{}},down:{code:40,time:0,password:null,callbacks:{}},dot:{code:190,time:0,password:null,callbacks:{}},a:{code:65,time:0,password:null,callbacks:{}},p:{code:80,time:0,password:null,callbacks:{}},w:{code:87,time:0,password:null,callbacks:{}},q:{code:81,time:0,password:null,callbacks:{}},e:{code:69,time:0,password:null,callbacks:{}},d:{code:68,time:0,password:null,callbacks:{}},c:{code:67,time:0,password:null,callbacks:{}},r:{code:82,time:0,password:null,callbacks:{}},s:{code:83,time:0,password:null,callbacks:{}},v:{code:86,time:0,password:null,callbacks:{}},f:{code:70,time:0,password:null,callbacks:{}},z:{code:90,time:0,password:null,callbacks:{}},y:{code:89,time:0,password:null,callbacks:{}},mouseLeft:{code:null,time:0,password:null,callbacks:{}},mouseMiddle:{code:null,time:0,password:null,callbacks:{}}}};constructor(){window.mouse={left:!1,middle:!1,right:!1,x:!1,y:!1,skip:!1},window.x=!1,window.y=!1;let t=JSON.parse(localStorage.getItem("dh_config"));t&&"object"==typeof t&&(this.data.config=t)}}const dh=new Divhunt,$dh={};$(window).on("blur",(function(){$.each(dh.data.keys,(function(t,e){e.password||(e.time=0,clearInterval(e.interval),e.interval=null)})),window.mouse.left=!1,window.mouse.middle=!1,window.mouse.right=!1,window.mouse.rightskip=!1,window.x=!1,window.y=!1})),$(window).focus((function(){$.each(dh.data.keys,(function(t,e){e.password||(e.time=0,clearInterval(e.interval),e.interval=null)})),window.mouse.left=!1,window.mouse.middle=!1,window.mouse.right=!1,window.mouse.rightskip=!1,window.x=!1,window.y=!1})),$(document).on("click","[dh-clipboard]",(function(){let t=$(this).attr("dh-clipboard");t&&navigator.clipboard.writeText(t).then((()=>{popup.notification("Copied to clipboard.",!0)}))})),$(document).on("blur","input",(function(t){setTimeout((()=>{$("input:focus").length||$("textarea:focus").length||$("[contenteditable]:focus").length||dh.hold.stop("focus")}),1)})),$(document).on("blur","textarea",(function(t){setTimeout((()=>{$("input:focus").length||$("textarea:focus").length||$("[contenteditable]:focus").length||dh.hold.stop("focus")}),1)})),$(document).on("blur","[contenteditable]",(function(t){setTimeout((()=>{$("input:focus").length||$("textarea:focus").length||$("[contenteditable]:focus").length||dh.hold.stop("focus")}),1)})),$(document).on("focus","input",(function(t){dh.hold.start("focus")})),$(document).on("focus","textarea",(function(t){dh.hold.start("focus")})),$(document).on("focus","[contenteditable]",(function(t){dh.hold.start("focus")})),$(document).on("keydown",(function(t){$.each(dh.data.keys,(function(e,n){if(n.interval)return!0;n.code===t.keyCode&&dh.hold.start(e)}))})),$(document).on("keyup",(function(t){$.each(dh.data.keys,(function(e,n){(n.code===t.keyCode||91===t.keyCode&&"focus"!==e)&&dh.hold.stop(e)}))})),$(document).mousemove((function(t){window.x=t.clientX,window.y=t.clientY,window.mouse.skip?window.mouse.skip=!1:window.mouse.skip=!0})),$(document).mouseup((function(t){1===t.which?dh.hold.stop("mouseLeft"):2===t.which&&dh.hold.stop("mouseMiddle")})),$(document).mousedown((function(t){window.mouse.x=window.x,window.mouse.y=window.y,1===t.which?dh.hold.start("mouseLeft"):2===t.which&&dh.hold.start("mouseMiddle")})),dh.config.get=function(t,e=null){return t in dh.data.config?dh.data.config[t]:e},dh.config.set=function(t,e,n=!1){return null===e?delete dh.data.config[t]:dh.data.config[t]=e,n&&localStorage.setItem("dh_config",JSON.stringify(dh.data.config)),e},dh.hold.callback=function(t,e,n=null){let i=dh.data.keys[t];if(null===n)return delete i.callbacks[e];
1i.callbacks[e]=n},dh.hold.start=function(t,e=null){let n=dh.data.keys[t];return!n.interval&&(n.time=1,n.password=e,n.interval=setInterval((()=>{n.time+=25}),25),!0)},dh.hold.stop=function(t,e=null){let n=dh.data.keys[t];return!n.interval||n.password===e&&(clearInterval(n.interval),setTimeout((function(){n.time=0,n.interval=null,n.password=null}),25),!0)},dh.key=function(t,e=null){return t in this.data.keys?null===e?!!this.data.keys[t].interval:this.data.keys[t].time>=e:null},dh.keys=function(t,e=!1){let n=!!e;return t.forEach((t=>{dh.key(t)?e||(n=!0):e&&(n=!1)})),n},dh.keysClear=function(){let t=!1;return $.each(this.data.keys,((e,n)=>{if(n.interval)return t=!0,!1})),!t},dh.keyOnly=function(t){if(!(t in this.data.keys))return!1;let e=!1;return $.each(this.data.keys,(function(n,i){return n===t?(i.interval&&(e=!0),!0):i.interval?(e=!1,!1):void 0})),e},dh.keysOnly=function(t,e=!1){let n=!!e;return t.forEach((t=>{dh.key(t)?e||(n=!0):e&&(n=!1)})),$.each(dh.data.keys,((e,i)=>{if(!t.includes(e)&&i.interval)return n=!1,!1})),n},dh.attributes=function(t,e=!0){let n="",i=/[^a-z0-9-_]/g;return $.each(t,(function(t,a){t=t.toLowerCase().replace(i,""),n+=`${t}="${null!==a?e?dh.sanitize(a):a:""}" `})),n.trim()},dh.command=function(t){let e={name:null,options:{},build:()=>{let t=e.name+" ";return e.name?($.each(e.options,((e,n)=>{n.forEach((n=>{t+=`--${e} ${n}`}))})),t):null},toString:()=>e.build()||""};return"string"!=typeof t?e:0 in(t=t.split("--"))?(e.name=t[0].trim(),t.shift(),t.forEach((t=>{if(!(t=t.split(" "))[0])return!0;let n=t[0].trim();t.shift();let i=t.join(" ").trim();e.options[n]||(e.options[n]=[]),e.options[n].push(i)})),e):e},dh.count=function(t,e=0){return"object"!=typeof t?0:$.isArray(t)?(t.forEach((function(){e++})),e):($.each(t,(function(){e++})),e)},dh.counter=function(t,e=null){return null===e?delete dh.data.counter[t]:(t in dh.data.counter||(dh.data.counter[t]=1),dh.data.counter[t]>=e?(dh.data.counter[t]=1,!0):(dh.data.counter[t]++,!1))},dh.date=function(t,e="D M, Y"){if("string"!=typeof t||"string"!=typeof e)return t;let n=new Date(t),i={Y:n.getFullYear(),m:String(n.getMonth()+1).padStart(2,"0"),D:String(n.getDate()).padStart(2,"0"),H:String(n.getHours()).padStart(2,"0"),i:String(n.getMinutes()).padStart(2,"0"),s:String(n.getSeconds()).padStart(2,"0"),f:String(n.getMilliseconds()).padStart(3,"0"),M:n.toLocaleString("default",{month:"long"})};return e.replace(/Y|m|D|H|i|s|f|M/g,(t=>i[t]))},dh.debounce=function(t,e=100,n="main"){n in dh.data.debounce||(dh.data.debounce[n]=null),clearTimeout(dh.data.debounce[n]),dh.data.debounce[n]=setTimeout((()=>{t()}),e)},dh.extractor=function([t,e]){const n=new RegExp(`${t}(.*?)${e}`,"gm"),i=n=>n.slice(t.length,-1*e.length);return function(t){let e=(t+="").match(n);return null!==e&&e.map(i)}},dh.focus=function(t,e="var(--dh-bg-3)"){t.css("transition","background-color 250ms ease-out").css("background",e),setTimeout((()=>{t.css("background","")}),250)},dh.getPoint=function(t,e){let n=document.elementFromPoint(t,e);if($(n).length)return n},dh.guid=function(){let t=(new Date).getTime(),e="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){let i=16*Math.random();return t>0?(i=(t+i)%16|0,t=Math.floor(t/16)):(i=(e+i)%16|0,e=Math.floor(e/16)),("x"===n?i:3&i|8).toString(16)}))},dh.increaser=function(t,e){return t in dh.data.increaser||(dh.data.increaser[t]=0),dh.data.increaser[t]>=e&&(dh.data.increaser[t]=0),dh.data.increaser[t]++,dh.data.increaser[t]},dh.inView=function(t,e=0,n=0){let i=t[0].getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth;return i.bottom-e>=0&&i.top+e<=a&&i.right-n>=0&&i.left+n<=o},dh.loader=function(t,e){let n=1,i="";for(;n<=e;)i+="<div></div>",n++;return`<div class="dh-loader dh-loader-${t}">${i}</div>`},dh.matrix=function(t,e=null,n=!1){let i=t.css("transform");return"none"===i?n:null===e?i:(i=i.match(/-?[\d\.]+/g),"x"===e?parseInt(i[i.length-2]):"y"===e?parseInt(i[i.length-1]):"scale"===e?parseInt(i[0]):"rotate"===e?parseInt(i[1]):void 0)},dh.offset=function(t,e=10,n=!1,i=null){let a={insert:"inside"};return a.width=t.outerWidth(),a.height=t.outerHeight(),"function"==typeof i&&i(a),a.offset=t.offset(),a.left=window.x-a.offset.left,a.top=window.y-a.offset.top,a.percent={},a.percent.left=a.left/a.width*100,a.percent.top=a.top/a.height*100,a.percent.right=(a.width-a.left)/a.width*100,a.percent.bottom=(a.height-a.top)/a.height*100,n&&(a.percent.left<=e&&(a.insert="before"),a.percent.right<=e&&(a.insert="after")),a.percent.top<=e&&(a.insert="before"),a.percent.bottom<=e&&(a.insert="after"),a},dh.position=function(t){let e={top:0,bottom:0,left:0,right:0,width:0,height:0};return e.width=$(t).outerWidth(),e.height=$(t).outerHeight(),e.top=$(t).offset().top,e.left=$(t).offset().left,e.right=e.width+e.left,e.bottom=e.height+e.top,e},dh.query=function(t,e=null){if("string"!=typeof t)return{};let n={};
1return new URLSearchParams(t.split("?")[1]).forEach((function(t,i){let a={key:i,value:decodeURIComponent(t)};e&&e(a),n[a.key]=a.value})),n},dh.route=function(t,e=null){return t=(t=(t=(t=t.substring(0,70)).replace(/\s+/g,"-")).toLowerCase().split("/")).filter((function(t){return/^[a-z0-9-_:\s]+$/i.test(t)})),e&&"object"==typeof e&&t.forEach(((n,i)=>{if(n.startsWith(":")){let a=n.slice(1);"string"!=typeof e[a]&&"number"!=typeof e[a]||(t[i]=e[a])}})),"/"+t.join("/")},dh.sanitize=function(t){return"string"!=typeof t?t:t.replace(/[^\w. ]/gi,(function(t){return"&#"+t.charCodeAt(0)+";"}))},dh.slug=function(t){if("string"!=typeof t)return null;let e=(t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().trim();return e=e.replace(/[^a-z0-9]+/g,"-"),e=e.replace(/-+/g,"-"),e=e.trim("-"),e},dh.sort=function(t,e,n="ASC"){return $.isArray(e)?"ASC"===n?e.sort((function(e,n){return e[t]-n[t]})):e.sort((function(e,n){return n[t]-e[t]})):"object"==typeof e?"ASC"===n?Object.keys(e).sort((function(n,i){return e[n][t]-e[i][t]})):Object.keys(e).sort((function(n,i){return e[i][t]-e[n][t]})):void 0},dh.taken=function(t,e=null){return t in dh.data.taken||(dh.data.taken[t]=!1),null===e?dh.data.taken[t]:dh.data.taken[t]=e},dh.trigger=function(t,e="",...n){dh.config.get("debug"),$(document).trigger(t,[...n])},dh.updater=function(t,e,n="text"){if(!e)return;let i=$(`[dh-updater="${t}"]`);i.animate({opacity:0}
1,100),setTimeout((()=>{"text"===n?i.text(e):"html"===n&&i.html(html)}),100),setTimeout((()=>{i.animate({opacity:1},100)}),200)},dh.uuid=function(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return Math.abs(e).toString(16)};const Addons=new class{data={};get(){return this.data}getOne(t){return this.data[t]}then(t,e){t in this.data&&e(this.data[t])}create(t,e=null){return t in this.data||(this.data[t]=new Addon({name:t,route:null,items:{callbacks:{add:[],set:[],remove:[]},keys:[],fields:{},data:{},id:1},pages:{},functions:{},actions:{progress:!1,pool:[]},options:{temp:{},save:dh.config.get(t,{})},ready:!1,reload:!0,global:null})),e&&e(this.data[t]),this.data[t]}};class Addon{data;constructor(t){this.data=t}GetName(){return this.data.name}GetReload(){return this.data.reload}GetRoute(){return this.data.route}GetItems(){return this.data.items}GetFunctions(){return this.data.functions}GetOptions(){return this.data.options}GetPages(){return this.data.pages}GetReady(){return this.data.ready}GetCreated(){return this.data.created}GetTemp(t,e=null){return this.OptionGet("temp",t,e)}GetSave(t,e=null){return this.OptionGet("save",t,e)}SetReload(t){return this.data.reload=t,this}SetRoute(t){return this.data.route=t,this}SetTemp(t,e=null){return this.OptionSet("temp",t,e)}SetSave(t,e=null){return this.OptionSet("save",t,e)}FieldAdd(t,e=null,n=null){"function"!=typeof e&&(e=null),"function"!=typeof n&&(n=null),this.data.items.fields[t]={get:e,set:n}}ItemsKeys(t){this.data.items.keys=t}ItemsGet(){return this.data.items.data}ItemsRaw(){let t={};return $.each(this.data.items.data,(function(e,n){t[e]=n.data})),t}ItemGet(t,e=null){let n=null;return t&&"object"==typeof t?n=this.ItemAdd(t,!1):t in this.data.items.data&&(n=this.data.items.data[t]),e?n?e(n):null:n}ItemsTarget(t=null){return null!==t?$(`items[field="${t}"][for="${this.GetName()}"]`):$(`items[for="${this.GetName()}"]`)}ItemsClear(t=!1){if(!t)return this.data.items.data={};$.each(this.data.items.data,(function(t,e){e.Remove()}))}ItemsAdd(...t){let e=[];return t.forEach((t=>{e.push(this.ItemAdd(t,"multiple"))})),e}ItemsArrayAdd(t){let e=[];return t.forEach((t=>{e.push(this.ItemAdd(t,"multiple"))})),e}ItemAdd(t,e="single"){if("object"!=typeof t)return;let n;return Array.isArray(t)&&(t=t.reduce(((t,e,n)=>(t[this.data.items.keys[n]]=e,t)),{})),"id"in t||(t.id=this.data.items.id),t.id in this.data.items.data?(n=this.data.items.data[t.id],$.each(t,(function(t,e){t in n.data&&(n.data[t]=e)}))):(this.data.items.id++,n=new AddonItem(this,this.ItemValidate(t))),this.data.items.data[n.data.id]=n,e&&this.data.items.callbacks.add.forEach((t=>{t(this,n,e)})),n}ItemValidate(t){return $.each(t,(e=>{e in this.data.items.fields||["id","history"].includes(e)||delete t[e]})),$.each(this.data.items.fields,((e,n)=>{e in t||(t[e]=null)})),$.each(this.data.items.fields,((e,n)=>{n.set&&(t[e]=n.set(t[e],t))})),t}ItemCatch(t,e){if("function"!=typeof e)return null;t in this.data.items.callbacks&&this.data.items.callbacks[t].push(e)}OnItemAdd(t){return this.ItemCatch("add",t)}OnItemSet(t){return this.ItemCatch("set",t)}OnItemRemove(t){return this.ItemCatch("remove",t)}ItemNewId(){let t=Math.floor(Date.now()/1e3),e=parseInt((Date.now()%1e3/1e3).toFixed(3).replace(".",""));return parseInt(t+e.toString().padStart(3,"0")+dh.increaser(this.GetName(),999).toString().padStart(3,"0"))}PagesGet(){return this.data.pages}PageGet(t){return this.data.pages[t]}PageAdd(t,e,n){this.data.pages[t]=new AddonPage(this,{slug:t,route:e,description:"",default:!0}),this.FunctionCreate("page."+t,n)}OnPage(t,e=null,n=null){this.FunctionCatch("page."+t,e,n)}Route(t,e={}){let n=this.PageGet(t);return n?n.GetRoute(!0,e):this.GetRoute()}FunctionCreate(t,e){if("function"==typeof e)return t in this.data.functions?void(this.data.functions[t].callback=e):this.data.functions[t]={callback:e,before:[],after:[]}}FunctionGet(t){return this.data.functions[t]}FunctionRun(t,...e){if(!(t in this.data.functions))return"@"===t[0]?"":void 0;this.data.functions[t].trigger&&$.each(this.data.functions[t].before,((t,n)=>{try{n(this,...e)}catch(t){dh.log(t)}}));let n=this.data.functions[t].callback,i=null;if("function"!=typeof n)t[0];else{let t=n.bind({});try{i=t(this,...e),i&&"object"==typeof i&&"init"in i&&(i=i.init())}catch(t){dh.log(t)}}return this.data.functions[t].trigger&&window.location.href.includes("logging"),this.data.functions[t].trigger&&$.each(this.data.functions[t].after,((t,n)=>{try{n(this,i,...e)}catch(t){dh.log(t)}})),i}FunctionCatch(t,e=null,n=!1){t in this.data.functions?this.data.functions[t].trigger=!0:this.data.functions[t]={callback:!1,trigger:!0,before:[],after:[]},"function"==typeof e&&this.data.functions[t].before.push(e),"function"==typeof n&&this.data.functions[t].after.push(n)}Fn(t,...e){return this.FunctionRun(t,...e)}OptionGet(t="save",e,n=null){let i=this.data.options["temp"===t?"temp":"save"];if(!(e in i))return n;let a=i[e];return null!==n&&typeof a!=typeof n?n:a}OptionSet(t="save",e,n=null){let i=this.data.options["temp"===t?"temp":"save"];null===n?delete i[e]:i[e]=n,"save"===t&&dh.config.set(this.GetName(),i,!0)}Render(t,e={},n={},i=!0,a=!1,o=null,d=null){return this.FunctionRun("render."+t,e,n,i,a,o,d)}RenderCatch(t,e=null,n=null){return this.FunctionCatch("render."+t,e,n)}RenderCreate(t,e){return this.FunctionCreate("render."+t,(function(n,i={},a={},o=!0,d=!1,r,l){let s=function(t=null,e=null,n=!1){return null===t?i:"identifier"===t?dh.increaser("callbacks",1e4):t in i?null!==e&&typeof i[t]!=typeof e?n?dh.sanitize(e):e:n?dh.sanitize(i[t]):i[t]:n?dh.sanitize(e):e};a.for=n.GetName(),"main"!==t&&(a.for+="."+t),null===r&&(r=`block[for="${a.for}"]`);let c=e.bind({}),u=l?c(n,l,s,a):c(n,s,a);return o?(a.class="class"in a?a.class+" b"+dh.uuid(n.GetName()+t):"b"+dh.uuid(n.GetName()+t),u=`<block ${dh.attributes(a)}>${u}</block>`,d&&$(r).replaceWith(u),u):(d&&$(r).html(u),u)}))}RenderTarget(t="main"){let e=this.GetName();return"main"!==t&&(e+="."+t),$(`block[for="${e}"]`)}Fetch(t,e,n,i=null,a=null){t=$dh.share()?"share."+t:t;let o=Math.random().toString(36).slice(2),d=mdAjax.Fn("get");return $.each(e,(function(t,e){d.get(t,e)})),d.url("/api/"+this.GetName()+"/"+t),d.run(null,(t=>{let e=n?n(t.out):null,a=$("#dh-addon-fetch-"+o);
1e&&a.length?(a.html(e),mdAnimations.Fn("run","fadeIn",a,200,0,(()=>{a.find(">*").first().unwrap(),i&&i(t.out)}))):i&&i(t.out)}),(t=>{let e=$("#dh-addon-fetch-"+o);e.length&&e.replaceWith("Failed to fetch. "+t.message),a&&a(null)})),'<div id="dh-addon-fetch-'+o+'" class="dh-addon-fetch"></div>'}FetchMulti(t,e,n,i=null,a=null){let o=Math.random().toString(36).slice(2),d=0,r=[],l=!0;return t.forEach(((s,c)=>{this.Fetch(s,s in e?e[s]:{},null,(function(e){if(d++,r[c]=e,d===t.length){if(!l)return void(a&&a(null));let t=n?n(...r):null,e=$("#dh-addon-fetch-"+o);if(!t||!e.length)return void(i&&i(...r));e.html(t),mdAnimations.Fn("run","fadeIn",e,200,0,(()=>{e.find(">*").first().unwrap(),i&&i(...r)}))}}),(function(){d++,l=!1}))})),'<div id="dh-addon-fetch-'+o+'" class="dh-addon-fetch"></div>'}Request(t,e){let n={value:e};this.FunctionCreate("request."+t,(function(t,e){return e}));let i=this.FunctionRun("request."+t,n);return"object"!=typeof i?e:"value"in i?typeof i.value!=typeof e?e:i.value:e}OnRequest(t,e){return this.FunctionCatch("request."+t,null,e)}Ready(...t){return this.GetReady()||(this.data.ready=!0,this.FunctionCreate("ready",(function(){})),this.FunctionRun("ready",...t)),this}OnReady(t=null,e=null){this.GetReady()?(t&&t(this,null),e&&e(this,null)):this.FunctionCatch("ready",t,e)}Reset(...t){t.forEach((t=>{"ready"===t&&(this.data.ready=!1)}))}}class AddonItem{data;addon;constructor(t,e){this.addon=t,this.data=e}Get(t,e=!1){if(!(t in this.addon.data.items.fields)&&"id"!==t)return null;let n=null;return n="id"!==t&&this.addon.data.items.fields[t].get?this.addon.data.items.fields[t].get(this.data[t],this):this.data[t],"string"==typeof n&&e&&(n=dh.sanitize(n)),n}Set(t,e,n=!0){if(!(t in this.addon.data.items.fields))return null;let i=this.data[t];"id"!==t&&this.addon.data.items.fields[t].set?this.data[t]=this.addon.data.items.fields[t].set(e,this.data,this):this.data[t]=e,n&&this.addon.data.items.callbacks.set.forEach((n=>{n(this.addon,t,e,this,i)}))}TargetItem(t=null){return null!==t?$(`item[field="${t}"][for="${this.addon.GetName()}"][data-id="${this.Get("id",!1)}"]`):$(`item[for="${this.addon.GetName()}"][data-id="${this.Get("id",!1)}"]`)}TargetItems(t=null){return null!==t?$(`items[field="${t}"][for="${this.addon.GetName()}"]`):$(`items[for="${this.addon.GetName()}"]`)}TargetValid(t){let e=!0,n=this;return $.each(t.attributes,(function(){if(!e)return!0;if(!this.name.startsWith("data-"))return!0;if(!(this.name.slice(5)in n.data))return!0;let t=n.Get(this.name.slice(5));(null===t||t.toString()!==this.value)&&(e=!1)})),e}Clone(t){return $.each(this.data,(function(e,n){e in t||(t[e]=n)})),this.addon.ItemAdd($.extend({},t))}FieldAdd(t,e){return"object"!=typeof e?null:"Get"in e&&t in this.addon.data.items.fields?(this.data[t]&&"object"==typeof this.data[t]||(this.data[t]={}),void(this.data[t][e.Get("id")]=e)):null}FieldRemove(t,e){return"object"!=typeof e?null:"Get"in e&&t in this.addon.data.items.fields?(this.data[t]&&"object"==typeof this.data[t]||(this.data[t]={}),void delete this.data[t][e.Get("id")]):null}Render(t,e={},n={},i=!0){let a=this.addon.Render("item."+t,e,n,!1,!1,null,this);return n.for=this.addon.GetName(),n["data-id"]=this.Get("id"),n.field=t,n.class="class"in n?n.class+" i"+dh.uuid(this.addon.GetName()+t):"i"+dh.uuid(this.addon.GetName()+t),i?`<item ${dh.attributes(n)}>${a}</item>`:a}Push(t,e={},n={},i=!0,a=null){a=null===a?this.TargetItems(t):$(a),$.each(a,((a,o)=>{if(this.TargetValid(o)){let a=this.Render(t,e,n,i);if("prepend"===$(o).attr("type")?$(o).prepend(a):"before"===$(o).attr("type")?$(o).before(a):"after"===$(o).attr("type")?$(o).after(a):$(o).append(a),"animation"in n){let e=this.TargetItem(t);e.css("opacity",0),mdAnimations.Fn("run","fadeIn",e)}}}))}Replace(t,e={},n={},i=!0,a=null){let o=this.Render(t,e,n,i);n["data-id"]=this.Get("id"),n.field=t,a=null===a?this.TargetItem(t):$(a),i?$(a).replaceWith(o):$(a).html(o)}Remove(t={}){this.addon.data.items.callbacks.remove.forEach((t=>{t(this.addon,this)})),this.UnPush(null,t),delete this.addon.data.items.data[this.Get("id",!1)]}UnPush(t=null,e={}){let n=this.TargetItem(t);"animation"in e?mdAnimations.Fn("run","fadeOut",n,200,0,(function(){n.remove()})):n.remove()}Fn(t,...e){return this.addon.FunctionRun("item."+t,this,...e)}}const mdEvents=Addons.create("md.events",(function(t){t.FieldAdd("name"),t.FieldAdd("description"),t.FieldAdd("callbacks"),t.FieldAdd("settings",null,(t=>t||{})),t.FieldAdd("role",null,(t=>Array.isArray(t)?t:[])),t.FunctionCreate("catch",(function(t,e,n,i=null,a=!1){let o=t.ItemGet(e);o||(o=t.ItemAdd({id:e})),o.Fn("catch",n,i,a)})),t.FunctionCreate("run",(function(t,e,n={},i=null){let a=t.ItemGet(e);a&&a.Fn("run",n,i)})),t.FunctionCreate("item.catch",(function(t,e,n,i=null,a=!1){if(n&&"function"!=typeof n)return;if(i&&"function"!=typeof i)return;let o=e.Get("callbacks");Array.isArray(o)||(o=[]),o.push({callback:n,condition:i,once:!!a}),e.Set("callbacks",o)})),t.FunctionCreate("item.run",(function(t,e,n={}){let i=e.Get("callbacks");if(!Array.isArray(i))return;let a=!1;
1i.forEach((function(t,e){if(t.condition&&!t.condition(n))return!0;t.callback(n),t.once&&(a=!0,delete i[e])})),a&&e.Set("callbacks",i.filter(Boolean))}))})),mdAnimations=Addons.create("md.animations",(function(t){t.FieldAdd("animate"),t.Ready(),t.FunctionCreate("run",(function(t,e,n,i=200,a=0,o=null){let d=mdAnimations.ItemGet(e);if(!d)return mdBugs.ItemAdd({message:`Animation with name ${e} doesn't exist.`});d.Fn("run",n,i,a,o)})),t.FunctionCreate("item.run",(function(t,e,n,i=200,a=0,o=null){if(!n.length)return;let d=a;$.each(n,(function(){a<1?e.Get("animate")(e,this,i,a,o):setTimeout((()=>{e.Get("animate")(e,this,i,a,o)}),d),d+=a}))})),t.ItemsAdd({id:"fadeIn",animate:function(t,e,n,i,a){e.animate([{opacity:"0"},{opacity:"1"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeOut",animate:function(t,e,n,i,a){e.animate([{opacity:"1"},{opacity:"0"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeInTop",animate:function(t,e,n,i,a){e.animate([{opacity:"0",transform:"translateY(-50px)"},{opacity:"1",transform:"translateY(0)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeInDown",animate:function(t,e,n,i,a){e.animate([{opacity:"0",transform:"translateY(-50px)"},{opacity:"1",transform:"translateY(0)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeInLeft",animate:function(t,e,n,i,a){e.animate([{opacity:"0",transform:"translateX(-50px)"},{opacity:"1",transform:"translateX(0)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeInRight",animate:function(t,e,n,i,a){e.animate([{opacity:"0",transform:"translateX(50px)"},{opacity:"1",transform:"translateX(0)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeOutTop",animate:function(t,e,n,i,a){e.animate([{opacity:"1",transform:"translateX(0)"},{opacity:"0",transform:"translateY(-50px)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeOutDown",animate:function(t,e,n,i,a){e.animate([{opacity:"1",transform:"translateX(0)"},{opacity:"0",transform:"translateY(50px)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeOutLeft",animate:function(t,e,n,i,a){e.animate([{opacity:"1",transform:"translateX(0)"},{opacity:"0",transform:"translateX(-50px)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}},{id:"fadeOutRight",animate:function(t,e,n,i,a){e.animate([{opacity:"1",transform:"translateX(0)"},{opacity:"0",transform:"translateX(50px)"}],{duration:n,fill:"forwards"}).onfinish=()=>{a&&a()}}})})),mdModal=Addons.create("md.modal",(function(t){t.FieldAdd("html"),t.FieldAdd("onClose"),t.FieldAdd("clean"),t.FieldAdd("overlay"),t.FieldAdd("timer"),t.FieldAdd("closeable"),t.FieldAdd("corners"),t.FieldAdd("width"),t.FieldAdd("height"),t.FieldAdd("time",null,(function(){return Math.floor(Date.now()/1e3)})),t.FieldAdd("align",(function(t){return t&&"object"==typeof t?t:{x:"center",y:"center"}})),t.FieldAdd("offset",(function(t){return t&&"object"==typeof t?t:{x:0,y:0}})),t.FieldAdd("element",(function(t){return t||$("#dh-modal")})),t.OnItemAdd((function(t,e){e.TargetItem("html").length?e.Replace("html"):e.Push("html",{},{animation:"fade"}),e.Fn("position"),e.Get("timer")&&setTimeout((()=>{e.Remove({animation:"fade"})}),e.Get("timer"))})),t.OnItemRemove((function(t,e){let n=e.Get("onClose");"function"==typeof n&&n(e)})),t.FunctionCreate("item.position",(function(t,e){let n=e.Get("element");if(!n.is(":visible"))return e.Remove({animation:"fade"});let i=e.TargetItem("html").find(">.html"),a=e.Get("align"),o=e.Get("offset"),d=i.innerWidth(),r=i.innerHeight();"inherit"===e.Get("width")?d=n.innerWidth():e.Get("width")&&(d=e.Get("width")),"inherit"===e.Get("height")?r=n.innerHeight():e.Get("height")&&(r=e.Get("height"));let l,s=0,c=n.offset().left+n.innerWidth()/2,u=n.offset().top-$(window).scrollTop()+n.innerHeight()/2;"center"===a.x&&(l=c-d/2+o.x),"center-left"===a.x&&(l=c-d+o.x),"center-right"===a.x&&(l=c+o.x),"left-in"===a.x&&(l=c-n.innerWidth()/2+o.x),"left-out"===a.x&&(l=c-n.innerWidth()/2-d+o.x),"right-in"===a.x&&(l=c+n.innerWidth()/2-d+o.x),"right-out"===a.x&&(l=c+n.innerWidth()/2+o.x),"center"===a.y&&(s=u-r/2+o.y),"center-top"===a.y&&(s=u-r+o.y),"center-bottom"===a.y&&(s=u+o.y),"top-in"===a.y&&(s=u-n.innerHeight()/2+o.y),"top-out"===a.y&&(s=u-n.innerHeight()/2-r+o.y),"bottom-in"===a.y&&(s=u+n.innerHeight()/2-r+o.y),"bottom-out"===a.y&&(s=u+n.innerHeight()/2+o.y),e.Get("
1corners")&&(l+d>window.innerWidth&&(l=window.innerWidth-d-10),s+r>window.innerHeight&&(s=window.innerHeight-r-10),l<0&&(l=10),s<0&&(s=10)),i.css("transform",`translate(${l}px, ${s}px)`),i.css("width",d),i.css("height",r)})),t.RenderCreate("item.content",(function(t,e,n){let i=e.Get("width",!0),a=e.Get("height",!0),o=e.Get("element");return"inherit"===e.Get("width")&&(i=o.innerWidth()),"inherit"===e.Get("height")&&(a=o.innerHeight()),`\n            <div class="html${e.Get("clean")?"":" dh-default"}" style="width: ${i}; height: ${a}">${e.Get("html")(e)}</div>\n        `})),t.RenderCreate("item.html",(function(t,e,n){return`\n            ${e.Render("overlay",{},{},!1)}\n            ${e.Render("content",{},{},!1)}\n        `})),t.RenderCreate("item.overlay",(function(t,e,n){let i=e.Get("overlay");if(!i||"object"!=typeof i)return"";let a="opacity"in i?i.opacity:.2;return`\n            <div class="overlay"${i.closeable?" modal-close ":""}style="opacity: ${dh.sanitize(a)}; ${i.clickable?"pointer-events: none":""}"></div>\n        `})),$(document).on("click","[modal-close]",(function(){let t=$(this).closest('item[for="md.modal"]').attr("data-id"),e=mdModal.ItemGet(t);e&&e.Remove({animation:"fade"})})),$("*").click((function(t){let e=$(t.target).closest('item[for="md.modal"]').attr("data-id"),n=[],i=!1;$.each($('items[for="md.modal"]').children(),(function(){n.push($(this).attr("data-id"))})),n.reverse().forEach((function(t){if(e===t)return!0;let n=mdModal.ItemGet(t);return!n||(Math.floor(Date.now()/1e3)-n.Get("time")<1?void 0:"soft"!==n.Get("closeable")||e||i?void("hard"===n.Get("closeable")&&n.Remove({animation:"fade"})):(n.Remove({animation:"fade"}),i=!0,!0))}))})),$(window).resize((function(){$.each(mdModal.ItemsGet(),(function(t,e){e.Fn("position")}))})),$(window).on("scroll",(function(){$.each(mdModal.ItemsGet(),(function(t,e){e.Fn("position")}))}))})),mdLibraries=Addons.create("md.libraries",(function(t){t.FieldAdd("loaded"),t.FieldAdd("loading"),t.FieldAdd("callbacks",(function(t){return Array.isArray(t)?t:[]})),t.FieldAdd("js",(function(t){return Array.isArray(t)?t:[]})),t.FieldAdd("css",(function(t){return Array.isArray(t)?t:[]})),t.FunctionCreate("load",(function(t,e,n){let i=[],a=0;if(e.forEach((function(t){if(!(t=mdLibraries.ItemGet(t))||t.Get("loaded"))return!0;i.push(t)})),!i.length)return n?n():null;i.forEach((function(t){if(t.Get("loading"))return t.Fn("callback",n),!0;t.Fn("load",(function(){a++,a===i.length&&n&&n()}))}))})),t.FunctionCreate("item.callback",(function(t,e,n){let i=e.Get("callbacks");i.push(n),e.Set("callbacks",i)})),t.FunctionCreate("item.load",(function(t,e,n){let i=[],a=0;if(e.Get("css").forEach((function(t){i.push({type:"css",link:t})})),e.Get("js").forEach((function(t){i.push({type:"js",link:t})})),e.Set("loading",!0),!i.length)return e.Set("loaded",!0),e.Set("loading",!1),e.Set("callbacks",[]),n&&n(),void e.Get("callbacks").forEach((function(t){t()}));i.forEach((function(t){let o;"js"===t.type?(o=document.createElement("script"),o.src=t.link,o.type="text/javascript"):(o=document.createElement("link"),o.rel="stylesheet",o.type="text/css",o.href=t.link),o.onload=function(){a++,a===i.length&&(e.Set("loaded",!0),e.Set("loading",!1),n&&n(),e.Get("callbacks").forEach((function(t){t()})))},document.head.appendChild(o)}))}))})),plugins=Addons.create("plugins",(function(t){})),components=Addons.create("builder.components",(function(t){t.tags=Addons.create(t.GetName()+".tags",(function(t){}))})),transform=Addons.create("builder.transform",(function(t){t.FieldAdd("name"),t.FieldAdd("group"),t.FieldAdd("options"),t.FieldAdd("code",(function(t){return"function"!=typeof t?function(){}:t})),t.FunctionCreate("run",(function(t,e={}){return this.init=()=>{let t=this,e=0;$("[dh-transform]").each((function(){e++,t.target($(this),e)}))},this.target=(t,n)=>{if(t.find(".dh-loader").length)return setTimeout((()=>{this.target(t,n)}),10);let i=transform.ItemGet($(t).attr("dh-transform"));if(i){let a=components.tags.ItemGet({id:$(t).attr("class").split(" ")[0].replace("t","")}),o=i.Fn("options",$(t).attr("dh-transform-options"));try{let d=i.Get("code");"function"==typeof d&&(d=d.bind({}),d=d(transform,a,$(t),o,e,n),d&&"object"==typeof d&&"init"in d&&d.init())}catch(t){}}$(t).removeAttr("dh-transform"),$(t).removeAttr("dh-transform-options")},this})),t.FunctionCreate("item.options",(function(t,e,n,i=!0){return this.init=()=>{let t=e.Get("options"),a=this.data(n,t);
1return i?this.merge(t,a):a},this.data=(t,e)=>{let n={};return $.each(String(t).split("|"),(function(t,i){if(!("0"in(i=i.split(":")))||!("1"in i))return!0;let a=i[0];if(i.shift(),!(a in e))return!0;n[a]=i.join(":")})),n},this.merge=(t,e)=>($.each(t,(function(t,n){if(t in e||(e[t]="value"in n?n.value:null),"value"in n&&typeof e[t]!=typeof n.value){let i=typeof n.value;"number"===i?e[t]=isNaN(parseInt(e[t]))?n.value:parseInt(e[t]):"boolean"===i?"true"===e[t]?e[t]=!0:"false"===e[t]?e[t]=!1:e[t]=n.value:e[t]=n.value}n.type=n.type.toLowerCase(),"component"===n.type&&e[t]?e[t]=components.ItemGet({id:e[t].replace(/\D/g,"")}):["parent","child","tag","sibling"].includes(n.type)&&e[t]&&(e[t]=components.tags.ItemGet({id:e[t].replace(/\D/g,"")}))})),e),this})),t.Ready(),$(document).ready((function(){transform.Fn("run",{mode:"website"})}))}));

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.