=i.left&&this.mouseX<=i.left+i.width&&this.mouseY>=i.top&&this.mouseY<=i.top+i.height},e.findChild=function(i,o){var s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector;return Array.prototype.filter.call(i.children,function(a){return s.call(a,o)})[0]},t}();he.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};he.instances=new WeakMap;he.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(t){t.getAttribute("data-simplebar")!=="init"&&!he.instances.has(t)&&new he(t,yo(t.attributes))})};he.removeObserver=function(){this.globalObserver.disconnect()};he.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(he.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))};he.handleMutations=function(t){t.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(n){n.nodeType===1&&(n.hasAttribute("data-simplebar")?!he.instances.has(n)&&document.documentElement.contains(n)&&new he(n,yo(n.attributes)):Array.prototype.forEach.call(n.querySelectorAll("[data-simplebar]"),function(i){i.getAttribute("data-simplebar")!=="init"&&!he.instances.has(i)&&document.documentElement.contains(i)&&new he(i,yo(i.attributes))}))}),Array.prototype.forEach.call(e.removedNodes,function(n){n.nodeType===1&&(n.getAttribute("data-simplebar")==="init"?he.instances.has(n)&&!document.documentElement.contains(n)&&he.instances.get(n).unMount():Array.prototype.forEach.call(n.querySelectorAll('[data-simplebar="init"]'),function(i){he.instances.has(i)&&!document.documentElement.contains(i)&&he.instances.get(i).unMount()}))})})};he.getOptions=yo;bo.default&&he.initHtmlApi();var Vm=Le(Wm());function Ym(t){return"error"in t&&"exception"in t}function Wn(t){return"error"in t}function Um(t){return typeof t.next=="string"}function ie(t){let e=["","null","undefined"];return Array.isArray(t)?t.length>0:typeof t=="string"&&!e.includes(t)||typeof t=="number"||typeof t=="boolean"?!0:typeof t=="object"&&t!==null}function Fi(t){return t.every(e=>typeof e!="undefined"&&e!==null)}function Bi(t){for(let e of t.options)e.selected&&(e.selected=!1);t.value=""}function bl(t){return typeof t!==null&&typeof t!="undefined"}function hL(){let{csrftoken:t}=Vm.default.parse(document.cookie);if(typeof t=="undefined")throw new Error("Invalid or missing CSRF token");return t}function Km(t,e,n){return Ne(this,null,function*(){let i=hL(),o=new Headers({"X-CSRFToken":i}),s;typeof n!="undefined"&&(s=JSON.stringify(n),o.set("content-type","application/json"));let a=yield fetch(t,{method:e,body:s,headers:o,credentials:"same-origin"}),c=a.headers.get("Content-Type");if(typeof c=="string"&&c.includes("text"))return{error:yield a.text()};let d=yield a.json();return!a.ok&&Array.isArray(d)?{error:d.join(`
-`)}:!a.ok&&"detail"in d?{error:d.detail}:d})}function So(t,e){return Ne(this,null,function*(){return yield Km(t,"PATCH",e)})}function pL(t){return Ne(this,null,function*(){return yield Km(t,"GET")})}function Gm(t){return Ne(this,null,function*(){return yield pL(t)})}function*R(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function ae(t){return document.getElementById(t)}function Xm(t,e=0){let n=e,i=document.getElementById("content-title");i!==null&&(n+=i.getBoundingClientRect().bottom);let o=t.getBoundingClientRect().top+window.pageYOffset+n;window.scrollTo({top:o,behavior:"smooth"})}function Qm(t){let e=[];for(let n of t.querySelectorAll("select"))if(n!==null){let i={name:n.name,options:[]};for(let o of n.options)o.selected&&i.options.push(o.value);e=[...e,i]}return e}function zi(t,e){t!==null&&(typeof e=="undefined"?window.getComputedStyle(t).display==="none"?t.style.display="":t.style.display="none":e==="show"?t.style.display="":t.style.display="none")}function*Jm(t){for(let e of t.querySelectorAll("td"))e!==null&&ie(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Ie(t,e,n){function i(s){return!!(typeof n=="string"&&s!==null&&s.matches(n))}function o(s){if(s!==null&&s.parentElement!==null&&!i(s)){for(let a of s.parentElement.querySelectorAll(e))if(a!==null)return a;return o(s.parentElement.parentElement)}return null}return o(t)}function Vn(t,e,n=null,i=[]){let o=document.createElement(t);if(e!==null)for(let s of Object.keys(e)){let a=s,c=e[a];a in o&&(o[a]=c)}n!==null&&n.length>0&&o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function Zm(t,e){let n=new Map;for(let i of t){let o=i[e];n.has(o)||n.set(o,i)}return Array.from(n.values())}function mL(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Ie(e,"form"),i=e.getAttribute("href");n!==null&&ie(i)&&(n.setAttribute("action",i),n.submit())}}function eg(){for(let t of R("a.formaction"))t.addEventListener("click",mL)}function gL(t,e){let n=new Set;for(let i of e.querySelectorAll("*[name]"))i.validity.valid?(i.classList.contains("is-invalid")&&i.classList.remove("is-invalid"),i.classList.contains("is-valid")||i.classList.add("is-valid")):(n.add(i.name),i.classList.contains("is-valid")&&i.classList.remove("is-valid"),i.classList.contains("is-invalid")||i.classList.add("is-invalid"));if(n.size!==0){let i=e.elements.namedItem(Array.from(n)[0]);Xm(i),t.preventDefault()}}function tg(){for(let t of R("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>gL(i,t))}}function ng(){for(let t of R("a.set_speed"))if(t!==null){let e=function(n){n.preventDefault();let i=t.getAttribute("data"),o=document.getElementById(t.target);o!==null&&i!==null&&(o.value=i)};t.addEventListener("click",e)}}var yl={vlangroup_edit:{region:{hide:["id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region"]},"site group":{hide:["id_region","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_sitegroup"]},site:{hide:["id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site"]},location:{hide:["id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location"]},rack:{hide:["id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location","id_rack"]},"cluster group":{hide:["id_region","id_sitegroup","id_site","id_location","id_rack","id_cluster"],show:["id_clustergroup"]},cluster:{hide:["id_region","id_sitegroup","id_site","id_location","id_rack"],show:["id_clustergroup","id_cluster"]},default:{hide:["id_region","id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:[]}}};function El(t,e){var n;for(let i of R(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?zi(o,"show"):zi(o,"hide"))}}function ig(t,e){let n=e.options[e.selectedIndex].innerText.toLowerCase();for(let[i,o]of Object.entries(yl[t]))if(n.endsWith(i)){for(let s of o.hide)El(`#${s}`,"hide");for(let s of o.show)El(`#${s}`,"show");break}else for(let s of yl[t].default.hide)El(`#${s}`,"hide")}function rg(){for(let t of Object.keys(yl))for(let e of R(`html[data-netbox-url-name="${t}"] #id_scope_type`))ig(t,e),e.addEventListener("change",()=>ig(t,e))}function vL(t){var n,i;let e=(i=(n=t==null?void 0:t.parentElement)==null?void 0:n.parentElement)!=null?i:null;return e!==null&&e.classList.contains("row")?e:null}function st(t,e){let n=vL(t);if(t!==null&&n!==null){zi(n,e);let i=new Event(`netbox.select.disabled.${t.name}`);switch(e){case"hide":t.disabled=!0,t.dispatchEvent(i);break;case"show":t.disabled=!1,t.dispatchEvent(i)}}}function bL(){let t=[ae("id_tagged_vlans"),ae("id_untagged_vlan"),ae("id_vlan_group")];if(Fi(t)){let[e,n]=t;Bi(n),Bi(e);for(let i of t)st(i,"hide")}}function yL(){let t=[ae("id_tagged_vlans"),ae("id_untagged_vlan"),ae("id_vlan_group")];if(Fi(t)){let[e,n,i]=t;Bi(e),st(i,"show"),st(n,"show"),st(e,"hide")}}function EL(){let t=[ae("id_tagged_vlans"),ae("id_untagged_vlan"),ae("id_vlan_group")];if(Fi(t)){let[e,n,i]=t;st(e,"show"),st(i,"show"),st(n,"show")}}function _L(){let t=[ae("id_tagged_vlans"),ae("id_untagged_vlan"),ae("id_vlan_group")];if(Fi(t)){let[e,n,i]=t;Bi(e),st(i,"show"),st(n,"show"),st(e,"hide")}}function og(t){switch(t.value){case"access":yL();break;case"tagged":EL();break;case"tagged-all":_L();break;case"":bL();break}}function sg(){let t=ae("id_mode");t!==null&&(t.addEventListener("change",()=>og(t)),og(t))}function ag(){for(let t of[eg,tg,ng,rg,sg])t()}var pg=Le(hg());window.Collapse=Me;window.Modal=Nt;window.Popover=an;window.Toast=_t;window.Tooltip=et;function SL(){for(let t of R(".masonry"))new pg.default(t,{itemSelector:".masonry-item",percentPosition:!0})}function wL(){for(let t of R('[data-bs-toggle="tooltip"]'))new et(t,{container:"body"})}function TL(){for(let t of R('[data-bs-toggle="modal"]'))new Nt(t)}function Sn(t,e,n,i){let o="mdi-alert";switch(t){case"warning":o="mdi-alert";break;case"success":o="mdi-check-circle";break;case"info":o="mdi-information";break;case"danger":o="mdi-alert";break}let s=document.createElement("div");s.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let a=document.createElement("div");a.setAttribute("class",`toast bg-${t}`),a.setAttribute("role","alert"),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true");let c=document.createElement("div");c.setAttribute("class",`toast-header bg-${t} text-body`);let d=document.createElement("i");d.setAttribute("class",`mdi ${o}`);let u=document.createElement("strong");u.setAttribute("class","me-auto ms-1"),u.innerText=e;let l=document.createElement("button");l.setAttribute("type","button"),l.setAttribute("class","btn-close"),l.setAttribute("data-bs-dismiss","toast"),l.setAttribute("aria-label","Close");let m=document.createElement("div");if(m.setAttribute("class","toast-body"),c.appendChild(d),c.appendChild(u),typeof i!="undefined"){let p=document.createElement("small");p.setAttribute("class","text-muted"),c.appendChild(p)}return c.appendChild(l),m.innerText=n.trim(),a.appendChild(c),a.appendChild(m),s.appendChild(a),document.body.appendChild(s),new _t(a)}function xL(){let{hash:t}=location;if(t&&t.match(/^#tab_.+$/)){let e=t.replace("tab_","");for(let n of R(`ul.nav.nav-tabs .nav-link[data-bs-target="${e}"]`))new cn(n).show()}}function OL(){let t=document.querySelectorAll(".sidebar .accordion-item");function e(n){for(let i of t)i!==n?i.classList.remove("is-open"):i.classList.toggle("is-open")}for(let n of t)for(let i of n.querySelectorAll(".accordion-button"))i.addEventListener("click",()=>{e(n)})}function AL(){for(let t of R("a.image-preview")){let e=`${Math.round(window.innerWidth/4)}px`,n=Vn("img",{src:t.href});n.style.maxWidth=e;let i=Vn("div",null,null,[n]);new an(t,{customClass:"image-preview-popover",trigger:"hover",html:!0,content:i})}}function mg(){for(let t of[wL,TL,SL,xL,AL,OL])t()}var wl=Le(Sl());function LL(t,e){var c;let n=t.currentTarget,i=Ie(n,"span.search-obj-selected"),o=Ie(n,"input.search-obj-type"),s=n.getAttribute("data-search-value"),a="";i!==null&&o!==null&&(ie(s)&&a!==s?(a=s,i.innerHTML=(c=e.textContent)!=null?c:"Error",o.value=s):(a="",i.innerHTML="All Objects",o.value=""))}function DL(){for(let t of R(".search-obj-selector"))for(let e of t.querySelectorAll("li > button.dropdown-item"))e.addEventListener("click",n=>LL(n,e))}function ML(){var t;for(let e of R("input.interface-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let d of i){let u=d.querySelector('input[type="checkbox"][name="pk"]');u!==null&&(u.checked=!1);let l=d.getAttribute("data-name");typeof l=="string"&&(c.test(l.toLowerCase().trim())?d.classList.contains("d-none")&&d.classList.remove("d-none"):d.classList.add("d-none"))}},n=Ie(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,wl.default)(o,300))}}function IL(){var t;for(let e of R("input.object-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let d of i){let u=d.querySelector('input[type="checkbox"][name="pk"]');u!==null&&(u.checked=!1);for(let l of Jm(d))if(c.test(l.toLowerCase())){d.classList.remove("d-none");break}else d.classList.add("d-none")}},n=Ie(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,wl.default)(o,300))}}function vg(){for(let t of[DL,IL,ML])t()}function bg(t,e,n){return Math.min(Math.max(t,n),e)}var Yn=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}};function kL(t){if(typeof t!="string")throw new Yn(t);if(t.trim().toLowerCase()==="transparent")return[0,0,0,0];let e=t.trim();e=qL.test(t)?function(a){let c=a.toLowerCase().trim(),d=PL[function(u){let l=5381,m=u.length;for(;m;)l=33*l^u.charCodeAt(--m);return(l>>>0)%2341}(c)];if(!d)throw new Yn(a);return`#${d}`}(t):t;let n=NL.exec(e);if(n){let a=Array.from(n).slice(1);return[...a.slice(0,3).map(c=>parseInt(Wi(c,2),16)),parseInt(Wi(a[3]||"f",2),16)/255]}let i=RL.exec(e);if(i){let a=Array.from(i).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,16)),parseInt(a[3]||"ff",16)/255]}let o=jL.exec(e);if(o){let a=Array.from(o).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,10)),parseFloat(a[3]||"1")]}let s=HL.exec(e);if(s){let[a,c,d,u]=Array.from(s).slice(1).map(parseFloat);if(bg(0,100,c)!==c)throw new Yn(t);if(bg(0,100,d)!==d)throw new Yn(t);return[...$L(a,c,d),u||1]}throw new Yn(t)}var yg=t=>parseInt(t.replace(/_/g,""),36),PL="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{let n=yg(e.substring(0,3)),i=yg(e.substring(3)).toString(16),o="";for(let s=0;s<6-i.length;s++)o+="0";return t[n]=`${o}${i}`,t},{}),Wi=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),NL=new RegExp(`^#${Wi("([a-f0-9])",3)}([a-f0-9])?$`,"i"),RL=new RegExp(`^#${Wi("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),jL=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Wi(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),HL=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,qL=/^[a-z]+$/i,Eg=t=>Math.round(255*t),$L=(t,e,n)=>{let i=n/100;if(e===0)return[i,i,i].map(Eg);let o=(t%360+360)%360/60,s=(1-Math.abs(2*i-1))*(e/100),a=s*(1-Math.abs(o%2-1)),c=0,d=0,u=0;o>=0&&o<1?(c=s,d=a):o>=1&&o<2?(c=a,d=s):o>=2&&o<3?(d=s,u=a):o>=3&&o<4?(d=a,u=s):o>=4&&o<5?(c=a,u=s):o>=5&&o<6&&(c=s,u=a);let l=i-s/2;return[c+l,d+l,u+l].map(Eg)};function FL(t){if(t==="transparent")return 0;function e(s){let a=s/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let[n,i,o]=kL(t);return .2126*e(n)+.7152*e(i)+.0722*e(o)}function BL(t){return FL(t)>.179}function Vi(t){return BL(t)?"#000":"#fff"}var Yg=Le(Sl()),Ol=Le(qg());var Mo={};(function(t,e){typeof Mo=="object"&&typeof module=="object"?module.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Mo=="object"?Mo.SlimSelect=e():t.SlimSelect=e()})(window,function(){return n={},t.m=e=[function(i,o,s){"use strict";function a(d,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var l=document.createEvent("CustomEvent");return l.initCustomEvent(d,u.bubbles,u.cancelable,u.detail),l}var c;o.__esModule=!0,o.hasClassInTree=function(d,u){function l(m,f){return f&&m&&m.classList&&m.classList.contains(f)?m:null}return l(d,u)||function m(f,p){return f&&f!==document?l(f,p)?f:m(f.parentNode,p):null}(d,u)},o.ensureElementInView=function(d,u){var l=d.scrollTop+d.offsetTop,m=l+d.clientHeight,f=u.offsetTop,p=f+u.clientHeight;f
{{ object.serial|placeholder }}