1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/project-static/dist/netbox.js

68 lines
313 KiB
JavaScript
Raw Normal View History

(()=>{var nb=Object.create;var Qn=Object.defineProperty,ib=Object.defineProperties,rb=Object.getOwnPropertyDescriptor,ob=Object.getOwnPropertyDescriptors,sb=Object.getOwnPropertyNames,zl=Object.getOwnPropertySymbols,ab=Object.getPrototypeOf,Wl=Object.prototype.hasOwnProperty,lb=Object.prototype.propertyIsEnumerable;var Fo=(t,e,n)=>e in t?Qn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(var n in e||(e={}))Wl.call(e,n)&&Fo(t,n,e[n]);if(zl)for(var n of zl(e))lb.call(e,n)&&Fo(t,n,e[n]);return t},Zi=(t,e)=>ib(t,ob(e)),Vl=t=>Qn(t,"__esModule",{value:!0});var A=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),cb=(t,e)=>{Vl(t);for(var n in e)Qn(t,n,{get:e[n],enumerable:!0})},ub=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of sb(e))!Wl.call(t,i)&&i!=="default"&&Qn(t,i,{get:()=>e[i],enumerable:!(n=rb(e,i))||n.enumerable});return t},Oe=t=>ub(Vl(Qn(t!=null?nb(ab(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var K=(t,e,n)=>(Fo(t,typeof e!="symbol"?e+"":e,n),n);var ke=(t,e,n)=>new Promise((i,o)=>{var s=d=>{try{c(n.next(d))}catch(u){o(u)}},a=d=>{try{c(n.throw(d))}catch(u){o(u)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,a);c((n=n.apply(t,e)).next())});var ce=A((TP,Ou)=>{var Tr=function(t){return t&&t.Math==Math&&t};Ou.exports=Tr(typeof globalThis=="object"&&globalThis)||Tr(typeof window=="object"&&window)||Tr(typeof self=="object"&&self)||Tr(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ge=A((xP,Au)=>{Au.exports=function(t){try{return!!t()}catch(e){return!0}}});var jt=A((OP,Cu)=>{var dS=ge();Cu.exports=!dS(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var ws=A(Mu=>{"use strict";var Lu={}.propertyIsEnumerable,Du=Object.getOwnPropertyDescriptor,fS=Du&&!Lu.call({1:2},1);Mu.f=fS?function(e){var n=Du(this,e);return!!n&&n.enumerable}:Lu});var xr=A((CP,Iu)=>{Iu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var In=A((LP,ku)=>{var hS={}.toString;ku.exports=function(t){return hS.call(t).slice(8,-1)}});var Si=A((DP,Pu)=>{var pS=ge(),mS=In(),gS="".split;Pu.exports=pS(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return mS(t)=="String"?gS.call(t,""):Object(t)}:Object});var cn=A((MP,Nu)=>{Nu.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var kn=A((IP,ju)=>{var vS=Si(),bS=cn();ju.exports=function(t){return vS(bS(t))}});var je=A((kP,Ru)=>{Ru.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var wi=A((PP,Hu)=>{var Ts=ce(),yS=function(t){return typeof t=="function"?t:void 0};Hu.exports=function(t,e){return arguments.length<2?yS(Ts[t]):Ts[t]&&Ts[t][e]}});var $u=A((NP,qu)=>{var ES=wi();qu.exports=ES("navigator","userAgent")||""});var Ar=A((jP,Yu)=>{var Bu=ce(),xs=$u(),Fu=Bu.process,zu=Bu.Deno,Wu=Fu&&Fu.versions||zu&&zu.version,Vu=Wu&&Wu.v8,ot,Or;Vu?(ot=Vu.split("."),Or=ot[0]<4?1:ot[0]+ot[1]):xs&&(ot=xs.match(/Edge\/(\d+)/),(!ot||ot[1]>=74)&&(ot=xs.match(/Chrome\/(\d+)/),ot&&(Or=ot[1])));Yu.exports=Or&&+Or});var Os=A((RP,Ku)=>{var Uu=Ar(),_S=ge();Ku.exports=!!Object.getOwnPropertySymbols&&!_S(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Uu&&Uu<41})});var As=A((HP,Gu)=>{var SS=Os();Gu.exports=SS&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Cr=A((qP,Xu)=>{var wS=wi(),TS=As();Xu.exports=TS?function(t){return typeof t=="symbol"}:function(t){var e=wS("Symbol");return typeof e=="function"&&Object(t)instanceof e}});var Ju=A(($P,Qu)=>{var Cs=je();Qu.exports=function(t,e){var n,i;if(e==="string"&&typeof(n=t.toString)=="function"&&!Cs(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Cs(i=n.call(t))||e!=="string"&&typeof(n=t.toString)=="function"&&!Cs(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}});var Lr=A((BP,Zu)=>{Zu.exports=!1});var Dr=A((FP,td)=>{var ed=ce();td.exports=function(t,e){try{Object.defineProperty(ed,t,{value
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Oh=A((rj,xh)=>{var tO=cn(),nO=$t(),iO=va(),Kr="["+iO+"]",rO=RegExp("^"+Kr+Kr+"*"),oO=RegExp(Kr+Kr+"*$"),ba=function(t){return function(e){var n=nO(tO(e));return t&1&&(n=n.replace(rO,"")),t&2&&(n=n.replace(oO,"")),n}};xh.exports={start:ba(1),end:ba(2),trim:ba(3)}});var Lh=A((oj,Ch)=>{var sO=ce(),aO=$t(),lO=Oh().trim,Ah=va(),Gr=sO.parseInt,cO=/^[+-]?0[Xx]/,uO=Gr(Ah+"08")!==8||Gr(Ah+"0x16")!==22;Ch.exports=uO?function(e,n){var i=lO(aO(e));return Gr(i,n>>>0||(cO.test(i)?16:10))}:Gr});var ya=A((aj,Ih)=>{var fO=Ci(),hO=$t(),pO=cn(),Mh=function(t){return function(e,n){var i=hO(pO(e)),o=fO(n),s=i.length,a,c;return o<0||o>=s?t?"":void 0:(a=i.charCodeAt(o),a<55296||a>56319||o+1===s||(c=i.charCodeAt(o+1))<56320||c>57343?t?i.charAt(o):a:t?i.slice(o,o+2):(a-55296<<10)+(c-56320)+65536)}};Ih.exports={codeAt:Mh(!1),charAt:Mh(!0)}});var Ea=A((cj,Nh)=>{var EO=hn();Nh.exports=function(t,e,n){for(var i in e)EO(t,i,e[i],n);return t}});var qh=A((uj,Hh)=>{var _O=kn(),jh=Hr().f,SO={}.toString,Rh=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wO=function(t){try{return jh(t)}catch(e){return Rh.slice()}};Hh.exports.f=function(e){return Rh&&SO.call(e)=="[object Window]"?wO(e):jh(_O(e))}});var Bh=A((dj,$h)=>{var TO=ge();$h.exports=!TO(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Xr=A((fj,Wh)=>{var xO=st(),OO=Oi(),AO=je(),_a=We(),CO=Rt().f,Fh=Hr(),LO=qh(),DO=kr(),MO=Bh(),zh=!1,St=DO("meta"),IO=0,Sa=Object.isExtensible||function(){return!0},wa=function(t){CO(t,St,{value:{objectID:"O"+IO++,weakData:{}}})},kO=function(t,e){if(!AO(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!_a(t,St)){if(!Sa(t))return"F";if(!e)return"E";wa(t)}return t[St].objectID},PO=function(t,e){if(!_a(t,St)){if(!Sa(t))return!0;if(!e)return!1;wa(t)}return t[St].weakData},NO=function(t){return MO&&zh&&Sa(t)&&!_a(t,St)&&wa(t),t},jO=function(){RO.enable=function(){},zh=!0;var t=Fh.f,e=[].splice,n={};n[St]=1,t(n).length&&(Fh.f=function(i){for(var o=t(i),s=0,a=o.length;s<a;s++)if(o[s]===St){e.call(o,s,1);break}return o},xO({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:LO.f}))},RO=Wh.exports={enable:jO,fastKey:kO,getWeakData:PO,onFreeze:NO};OO[St]=!0});var Yh=A((hj,Vh)=>{var HO=Ee(),qO=Pn(),$O=HO("iterator"),BO=Array.prototype;Vh.exports=function(t){return t!==void 0&&(qO.Array===t||BO[$O]===t)}});var Ta=A((pj,Uh)=>{var FO=ga(),zO=Pn(),WO=Ee(),VO=WO("iterator");Uh.exports=function(t){if(t!=null)return t[VO]||t["@@iterator"]||zO[FO(t)]}});var Gh=A((mj,Kh)=>{var YO=Re(),UO=Ta();Kh.exports=function(t,e){var n=arguments.length<2?UO(t):e;if(typeof n!="function")throw TypeError(String(t)+" is not iterable");return YO(n.call(t))}});var Jh=A((gj,Qh)=>{var Xh=Re();Qh.exports=function(t,e,n){var i,o;Xh(t);try{if(i=t.return,i===void 0){if(e==="throw")throw n;return n}i=i.call(t)}catch(s){o=!0,i=s}if(e==="throw")throw n;if(o)throw i;return Xh(i),n}});var xa=A((vj,ep)=>{var KO=Re(),GO=Yh(),XO=pn(),QO=Ys(),JO=Gh(),ZO=Ta(),Zh=Jh(),Ii=function(t,e){this.stopped=t,this.result=e};ep.exports=function(t,e,n){var i=n&&n.that,o=!!(n&&n.AS_ENTRIES),s=!!(n&&n.IS_ITERATOR),a=!!(n&&n.INTERRUPTED),c=QO(e,i,1+o+a),d,u,l,m,f,p,b,y=function(v){return d&&Zh(d,"return",v),new Ii(!0,v)},h=function(v){return o?(KO(v),a?c(v[0],v[1],y):c(v[0],v[1])):a?c(v,y):c(v)};if(s)d=t;else{if(u=ZO(t),typeof u!="function")throw TypeError("Target is not iterable");if(GO(u)){for(l=0,m=XO(t.length);m>l;l++)if(f=h(t[l]),f&&f instanceof Ii)return f;return new Ii(!1)}d=JO(t,u)}for(p=d.next;!(b=p.call(d)).done;){try{f=h(b.value)}catch(v){Zh(d,"throw",v)}if(typeof f=="object"&&f&&f instanceof Ii)return f}return new Ii(!1)}});var Oa=A((bj,tp)=>{tp.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var sp=A((yj,op)=>{var eA=Ee(),np=eA("iterator"),ip=!1;try{rp=0,Aa={next:function(){return{done:!!rp++}},return:function(){ip=!0}},Aa[np]=function(){retur
`)&&t.flags==="s")})});var Tm=A((VR,wm)=>{var vC=ge(),bC=ce(),yC=bC.RegExp;wm.exports=vC(function(){var t=yC("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"})});var mo=A((YR,Am)=>{"use strict";var EC=$t(),_C=vm(),xm=Em(),SC=Ir(),wC=Fr(),TC=fn().get,xC=Sm(),OC=Tm(),po=RegExp.prototype.exec,AC=SC("native-string-replace",String.prototype.replace),il=po,rl=function(){var t=/a/,e=/b*/g;return po.call(t,"a"),po.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),Om=xm.UNSUPPORTED_Y||xm.BROKEN_CARET,ol=/()??/.exec("")[1]!==void 0,CC=rl||ol||Om||xC||OC;CC&&(il=function(e){var n=this,i=TC(n),o=EC(e),s=i.raw,a,c,d,u,l,m,f;if(s)return s.lastIndex=n.lastIndex,a=il.call(s,o),n.lastIndex=s.lastIndex,a;var p=i.groups,b=Om&&n.sticky,y=_C.call(n),h=n.source,v=0,_=o;if(b&&(y=y.replace("y",""),y.indexOf("g")===-1&&(y+="g"),_=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
`)&&(h="(?: "+h+")",_=" "+_,v++),c=new RegExp("^(?:"+h+")",y)),ol&&(c=new RegExp("^"+h+"$(?!\\s)",y)),rl&&(d=n.lastIndex),u=po.call(b?c:n,_),b?u?(u.input=u.input.slice(v),u[0]=u[0].slice(v),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:rl&&u&&(n.lastIndex=n.global?u.index+u[0].length:d),ol&&u&&u.length>1&&AC.call(u[0],c,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(u[l]=void 0)}),u&&p)for(u.groups=m=wC(null),l=0;l<p.length;l++)f=p[l],m[f[0]]=u[f[1]];return u});Am.exports=il});var sl=A(()=>{"use strict";var LC=st(),Cm=mo();LC({target:"RegExp",proto:!0,forced:/./.exec!==Cm},{exec:Cm})});var ll=A((GR,Im)=>{"use strict";sl();var Lm=hn(),DC=mo(),Dm=ge(),Mm=Ee(),MC=_t(),IC=Mm("species"),al=RegExp.prototype;Im.exports=function(t,e,n,i){var o=Mm(t),s=!Dm(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!Dm(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[IC]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return u=!0,null},l[o](""),!u});if(!s||!a||n){var c=/./[o],d=e(o,""[t],function(u,l,m,f,p){var b=l.exec;return b===DC||b===al.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:u.call(m,l,f)}:{done:!1}});Lm(String.prototype,t,d[0]),Lm(al,o,d[1])}i&&MC(al[o],"sham",!0)}});var cl=A((XR,km)=>{"use strict";var kC=ya().charAt;km.exports=function(t,e,n){return e+(n?kC(t,e).length:1)}});var ul=A((QR,Pm)=>{var PC=In(),NC=mo();Pm.exports=function(t,e){var n=t.exec;if(typeof n=="function"){var i=n.call(t,e);if(typeof i!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return i}if(PC(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return NC.call(t,e)}});var Rm=A((ZR,jm)=>{var BC=un(),FC=Math.floor,zC="".replace,WC=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,VC=/\$([$&'`]|\d{1,2})/g;jm.exports=function(t,e,n,i,o,s){var a=n+t.length,c=i.length,d=VC;return o!==void 0&&(o=BC(o),d=WC),zC.call(s,d,function(u,l){var m;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":m=o[l.slice(1,-1)];break;default:var f=+l;if(f===0)return u;if(f>c){var p=FC(f/10);return p===0?u:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[f-1]}return m===void 0?"":m})}});var Fm=A(ml=>{"use strict";ml.parse=uL;ml.serialize=dL;var aL=decodeURIComponent,lL=encodeURIComponent,cL=/; */,yo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function uL(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(cL),s=i.decode||aL,a=0;a<o.length;a++){var c=o[a],d=c.indexOf("=");if(!(d<0)){var u=c.substr(0,d).trim(),l=c.substr(++d,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[u]==null&&(n[u]=fL(l,s))}}return n}function dL(t,e,n){var i=n||{},o=i.encode||lL;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!yo.test(t))throw new TypeError("argument name is invalid");var s=o(e);if(s&&!yo.test(s))throw new TypeError("argument val is invalid");var a=t+"="+s;if(i.maxAge!=null){var c=i.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(i.domain){if(!yo.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!yo.test(i.path))throw new TypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var d=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(d){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function fL(t,e){try{return e(t)}catch(n){return t}}});var yl=A((ag,_o)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof _o=="object"&&_o.exports?_o.expo
<span class='flatpickr-weekday'>
`+E.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function jv(){r.calendarContainer.classList.add("hasWeeks");var g=u("div","flatpickr-weekwrapper");g.appendChild(u("span","flatpickr-weekday",r.l10n.weekAbbreviation));var E=u("div","flatpickr-weeks");return g.appendChild(E),{weekWrapper:g,weekNumbers:E}}function Po(g,E){E===void 0&&(E=!0);var w=E?g:g-r.currentMonth;w<0&&r._hidePrevMonthArrow===!0||w>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=w,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,Z("onYearChange"),Yn()),Yi(),Z("onMonthChange"),Xi())}function Rv(g,E){g===void 0&&(g=!0),E===void 0&&(E=!0),r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,E===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.showTimeInput=!1,r.config.enableTime===!0&&_e(),r.redraw(),g&&Z("onChange")}function Hv(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),Z("onClose")}function qv(){r.config!==void 0&&Z("onDestroy");for(var g=r._handlers.length;g--;){var E=r._handlers[g];E.element.removeEventListener(E.event,E.handler,E.options)}if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){var w=r.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly"),r.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(M){try{delete r[M]}catch(j){}})}function Un(g){return r.config.appendTo&&r.config.appendTo.contains(g)?!0:r.calendarContainer.contains(g)}function No(g){if(r.isOpen&&!r.config.inline){var E=p(g),w=Un(E),M=E===r.input||E===r.altInput||r.element.contains(E)||g.path&&g.path.indexOf&&(~g.path.indexOf(r.input)||~g.path.indexOf(r.altInput)),j=g.type==="blur"?M&&g.relatedTarget&&!Un(g.relatedTarget):!M&&!w&&!Un(g.relatedTarget),N=!r.config.ignoredFocusElements.some(function(q){return q.contains(E)});j&&N&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&te(),r.close(),r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function Ui(g){if(!(!g||r.config.minDate&&g<r.config.minDate.getFullYear()||r.config.maxDate&&g>r.config.maxDate.getFullYear())){var E=g,w=r.currentYear!==E;r.currentYear=E||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),w&&(r.redraw(),Z("onYearChange"),Yn())}}function zt(g,E){E===void 0&&(E=!0);var w=r.parseDate(g,void 0,E);if(r.config.minDate&&w&&k(w,r.config.minDate,E!==void 0?E:!r.minDateHasTime)<0||r.config.maxDate&&w&&k(w,r.config.maxDate,E!==void 0?E:!r.maxDateHasTime)>0)return!1;if(r.config.enable.length===0&&r.config.disable.length===0)return!0;if(w===void 0)return!1;for(var M=r.
`)}:!a.ok&&"detail"in d?{error:d.detail}:d})}function Eo(t,e){return ke(this,null,function*(){return yield Ym(t,"PATCH",e)})}function pL(t){return ke(this,null,function*(){return yield Ym(t,"GET")})}function Um(t){return ke(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 re(t){return document.getElementById(t)}function Km(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 Gm(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 Ce(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*Xm(t){for(let e of t.querySelectorAll("td"))e!==null&&ee(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Le(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 vl(t,e,n,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)}o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function Qm(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=Le(e,"form"),i=e.getAttribute("href");n!==null&&ee(i)&&(n.setAttribute("action",i),n.submit())}}function Jm(){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]);Km(i),t.preventDefault()}}function Zm(){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 eg(){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 tg={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 bl(t,e){var n;for(let i of R(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?Ce(o,"show"):Ce(o,"hide"))}}function ng(t){let e=t.options[t.selectedIndex].innerText.toLowerCase();for(let[n,i]of Object.entries(tg))if(e.endsWith(n)){for(let o of i.hide)bl(`#${o}`,"hide");for(let o of i.show)bl(`#${o}`
div.ss-values div.ss-value[data-id="${n}"],
div.ss-list div.ss-option:not(.ss-disabled)[data-id="${n}"]
{
background-color: ${s} !important;
color: ${a} !important;
}
`.replaceAll(`
`,"").trim(),document.head.appendChild(o)}}resetClasses(){let e=this.slim.slim;if(e)for(let n of this.base.classList)e.container.classList.remove(n)}initResetButton(){let e=Le(this.base,"button[data-reset-select]");e!==null&&e.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}initRefreshButton(){if(this.allowRefresh){let e=vl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[vl("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function Yg(){for(let t of R(".netbox-api-select"))new xl(t)}function Ug(t){return typeof t.value=="string"&&t.value!==""}function Kg(t,e){if(t.slim.singleSelected!==null)if(Ug(e)){let n=`#${e.value}`,i=Fi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function Gg(){for(let t of R("select.netbox-color-select")){for(let n of t.options)if(Ug(n)){let i=`#${n.value}`,o=Fi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Wn({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let n of e.data.data)if("selected"in n&&n.selected){Kg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>Kg(e,n)}}function Xg(){for(let t of R(".netbox-static-select"))if(t!==null){let e=document.querySelector(`label[for=${t.id}]`),n;e!==null&&(n=`Select ${e.innerText.trim()}`);let i=new Wn({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle"></i>',placeholder:n});for(let o of t.classList)i.slim.container.classList.remove(o)}}function Qg(){for(let t of[Yg,Gg,Xg])t()}function XL(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ee(e)&&Eo(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(Bn(o)){Fn("danger","Error",o.error).show();return}else{let a=(s=t.parentElement)==null?void 0:s.parentElement,c=t.querySelector("i.mdi, span.mdi");n?(a.classList.remove("success"),a.classList.add("info"),t.classList.remove("connected","btn-warning"),t.classList.add("btn-info"),t.title="Mark Installed",c.classList.remove("mdi-lan-disconnect"),c.classList.add("mdi-lan-connect")):(a.classList.remove("info"),a.classList.add("success"),t.classList.remove("btn-success"),t.classList.add("connected","btn-warning"),t.title="Mark Installed",c.classList.remove("mdi-lan-connect"),c.classList.add("mdi-lan-disconnect"))}})}function Jg(){for(let t of R("button.cable-toggle"))t.addEventListener("click",()=>XL(t))}var Zg=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Do=class{constructor(e,n){K(this,"handlers");K(this,"proxy");K(this,"options");K(this,"key","");if(this.options=n,typeof this.options.key=="string"?this.key=this.options.key:this.key=this.generateStateKey(e),this.options.persist){let i=this.retrieve();i!==null&&(e=V(V({},e),i))}this.handlers=new Zg,this.proxy=new Proxy(e,this.handlers),this.options.persist&&this.save()}generateStateKey(e){return`netbox-${window.btoa(Object.keys(e).join("---"))}`}get(e){return this.handlers.get(this.proxy,e)}set(e,n){this.handlers.set(this.proxy,e,n),this.options.persist&&this.save()}all(){return this.proxy}keys(){return Object.keys(this.proxy)}values(){return Object.values(this.proxy)}save(){let e=JSON.stringify(this.proxy);localStorage.setItem(this.key,e)}retrieve(){let e=localStorage.getItem(this.key);return e!==null?JSON.parse(e):null}};function Mo(t,e={}){return new Do(t,e)}var Ol=Mo({hidden:!1},{persist:!0,key:"netbox-object-depth"});var Al=Mo({hidden:!1},{persist:!0});function ev(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function tv(){for(let t of R(".record-depth"))t.style.display=""}function nv(){for(let t of R(".record-depth"))t.style.display="none"}function QL(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?nv():tv(),ev(i,e)}f
/* flatpickr v4.6.3, @license MIT */
/*!
* Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
/*!
* Masonry v4.2.2
* Cascading grid layout library
* https://masonry.desandro.com
* MIT License
* by David DeSandro
*/
/*!
* Outlayer v2.1.1
* the brains and guts of a layout library
* MIT license
*/
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
//# sourceMappingURL=netbox.js.map