Your IP : 216.73.216.52


Current Path : /snap/lxd/38768/share/lxd-ui/assets/
Upload File :
Current File : //snap/lxd/38768/share/lxd-ui/assets/formChangeCount-Kjdextdt.js

import{dn as se,dp as On,cc as Cn}from"./index-BsQN_SZU.js";var X={exports:{}};X.exports;var We;function Sn(){return We||(We=1,(function(a,c){var g=200,o="__lodash_hash_undefined__",s=1,y=2,C=9007199254740991,j="[object Arguments]",G="[object Array]",A="[object AsyncFunction]",N="[object Boolean]",S="[object Date]",U="[object Error]",ue="[object Function]",q="[object GeneratorFunction]",Y="[object Map]",ve="[object Number]",Ye="[object Null]",B="[object Object]",be="[object Promise]",Ze="[object Proxy]",Te="[object RegExp]",Z="[object Set]",we="[object String]",Qe="[object Symbol]",Ve="[object Undefined]",fe="[object WeakMap]",Ae="[object ArrayBuffer]",Q="[object DataView]",ke="[object Float32Array]",et="[object Float64Array]",tt="[object Int8Array]",nt="[object Int16Array]",rt="[object Int32Array]",it="[object Uint8Array]",at="[object Uint8ClampedArray]",st="[object Uint16Array]",ut="[object Uint32Array]",ft=/[\\^$.*+?()[\]{}|]/g,ot=/^\[object .+?Constructor\]$/,ct=/^(?:0|[1-9]\d*)$/,u={};u[ke]=u[et]=u[tt]=u[nt]=u[rt]=u[it]=u[at]=u[st]=u[ut]=!0,u[j]=u[G]=u[Ae]=u[N]=u[Q]=u[S]=u[U]=u[ue]=u[Y]=u[ve]=u[B]=u[Te]=u[Z]=u[we]=u[fe]=!1;var Oe=typeof se=="object"&&se&&se.Object===Object&&se,lt=typeof self=="object"&&self&&self.Object===Object&&self,x=Oe||lt||Function("return this")(),Ce=c&&!c.nodeType&&c,Se=Ce&&!0&&a&&!a.nodeType&&a,xe=Se&&Se.exports===Ce,oe=xe&&Oe.process,me=(function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}})(),Ee=me&&me.isTypedArray;function dt(e,t){for(var n=-1,r=e==null?0:e.length,f=0,i=[];++n<r;){var d=e[n];t(d,n,e)&&(i[f++]=d)}return i}function gt(e,t){for(var n=-1,r=t.length,f=e.length;++n<r;)e[f+n]=t[n];return e}function pt(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ht(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function _t(e){return function(t){return e(t)}}function yt(e,t){return e.has(t)}function vt(e,t){return e?.[t]}function bt(e){var t=-1,n=Array(e.size);return e.forEach(function(r,f){n[++t]=[f,r]}),n}function Tt(e,t){return function(n){return e(t(n))}}function wt(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var At=Array.prototype,Ot=Function.prototype,V=Object.prototype,ce=x["__core-js_shared__"],Ie=Ot.toString,O=V.hasOwnProperty,Pe=(function(){var e=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),De=V.toString,Ct=RegExp("^"+Ie.call(O).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=xe?x.Buffer:void 0,k=x.Symbol,Le=x.Uint8Array,Re=V.propertyIsEnumerable,St=At.splice,L=k?k.toStringTag:void 0,Me=Object.getOwnPropertySymbols,xt=je?je.isBuffer:void 0,mt=Tt(Object.keys,Object),le=H(x,"DataView"),K=H(x,"Map"),de=H(x,"Promise"),ge=H(x,"Set"),pe=H(x,"WeakMap"),$=H(Object,"create"),Et=z(le),It=z(K),Pt=z(de),Dt=z(ge),jt=z(pe),ze=k?k.prototype:void 0,he=ze?ze.valueOf:void 0;function R(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Lt(){this.__data__=$?$(null):{},this.size=0}function Rt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mt(e){var t=this.__data__;if($){var n=t[e];return n===o?void 0:n}return O.call(t,e)?t[e]:void 0}function zt(e){var t=this.__data__;return $?t[e]!==void 0:O.call(t,e)}function Ft(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$&&t===void 0?o:t,this}R.prototype.clear=Lt,R.prototype.delete=Rt,R.prototype.get=Mt,R.prototype.has=zt,R.prototype.set=Ft;function m(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gt(){this.__data__=[],this.size=0}function Nt(e){var t=this.__data__,n=te(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():St.call(t,n,1),--this.size,!0}function Ut(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]}function Bt(e){return te(this.__data__,e)>-1}function Ht(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}m.prototype.clear=Gt,m.prototype.delete=Nt,m.prototype.get=Ut,m.prototype.has=Bt,m.prototype.set=Ht;function M(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qt(){this.size=0,this.__data__={hash:new R,map:new(K||m),string:new R}}function Kt(e){var t=ne(this,e).delete(e);return this.size-=t?1:0,t}function $t(e){return ne(this,e).get(e)}function Jt(e){return ne(this,e).has(e)}function Wt(e,t){var n=ne(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}M.prototype.clear=qt,M.prototype.delete=Kt,M.prototype.get=$t,M.prototype.has=Jt,M.prototype.set=Wt;function ee(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new M;++t<n;)this.add(e[t])}function Xt(e){return this.__data__.set(e,o),this}function Yt(e){return this.__data__.has(e)}ee.prototype.add=ee.prototype.push=Xt,ee.prototype.has=Yt;function I(e){var t=this.__data__=new m(e);this.size=t.size}function Zt(){this.__data__=new m,this.size=0}function Qt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vt(e){return this.__data__.get(e)}function kt(e){return this.__data__.has(e)}function en(e,t){var n=this.__data__;if(n instanceof m){var r=n.__data__;if(!K||r.length<g-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new M(r)}return n.set(e,t),this.size=n.size,this}I.prototype.clear=Zt,I.prototype.delete=Qt,I.prototype.get=Vt,I.prototype.has=kt,I.prototype.set=en;function tn(e,t){var n=re(e),r=!n&&yn(e),f=!n&&!r&&_e(e),i=!n&&!r&&!f&&$e(e),d=n||r||f||i,p=d?ht(e.length,String):[],h=p.length;for(var l in e)O.call(e,l)&&!(d&&(l=="length"||f&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||dn(l,h)))&&p.push(l);return p}function te(e,t){for(var n=e.length;n--;)if(Be(e[n][0],t))return n;return-1}function nn(e,t,n){var r=t(e);return re(e)?r:gt(r,n(e))}function J(e){return e==null?e===void 0?Ve:Ye:L&&L in Object(e)?cn(e):_n(e)}function Fe(e){return W(e)&&J(e)==j}function Ge(e,t,n,r,f){return e===t?!0:e==null||t==null||!W(e)&&!W(t)?e!==e&&t!==t:rn(e,t,n,r,Ge,f)}function rn(e,t,n,r,f,i){var d=re(e),p=re(t),h=d?G:P(e),l=p?G:P(t);h=h==j?B:h,l=l==j?B:l;var v=h==B,w=l==B,_=h==l;if(_&&_e(e)){if(!_e(t))return!1;d=!0,v=!1}if(_&&!v)return i||(i=new I),d||$e(e)?Ne(e,t,n,r,f,i):fn(e,t,h,n,r,f,i);if(!(n&s)){var b=v&&O.call(e,"__wrapped__"),T=w&&O.call(t,"__wrapped__");if(b||T){var D=b?e.value():e,E=T?t.value():t;return i||(i=new I),f(D,E,n,r,i)}}return _?(i||(i=new I),on(e,t,n,r,f,i)):!1}function an(e){if(!Ke(e)||pn(e))return!1;var t=He(e)?Ct:ot;return t.test(z(e))}function sn(e){return W(e)&&qe(e.length)&&!!u[J(e)]}function un(e){if(!hn(e))return mt(e);var t=[];for(var n in Object(e))O.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ne(e,t,n,r,f,i){var d=n&s,p=e.length,h=t.length;if(p!=h&&!(d&&h>p))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var v=-1,w=!0,_=n&y?new ee:void 0;for(i.set(e,t),i.set(t,e);++v<p;){var b=e[v],T=t[v];if(r)var D=d?r(T,b,v,t,e,i):r(b,T,v,e,t,i);if(D!==void 0){if(D)continue;w=!1;break}if(_){if(!pt(t,function(E,F){if(!yt(_,F)&&(b===E||f(b,E,n,r,i)))return _.push(F)})){w=!1;break}}else if(!(b===T||f(b,T,n,r,i))){w=!1;break}}return i.delete(e),i.delete(t),w}function fn(e,t,n,r,f,i,d){switch(n){case Q:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ae:return!(e.byteLength!=t.byteLength||!i(new Le(e),new Le(t)));case N:case S:case ve:return Be(+e,+t);case U:return e.name==t.name&&e.message==t.message;case Te:case we:return e==t+"";case Y:var p=bt;case Z:var h=r&s;if(p||(p=wt),e.size!=t.size&&!h)return!1;var l=d.get(e);if(l)return l==t;r|=y,d.set(e,t);var v=Ne(p(e),p(t),r,f,i,d);return d.delete(e),v;case Qe:if(he)return he.call(e)==he.call(t)}return!1}function on(e,t,n,r,f,i){var d=n&s,p=Ue(e),h=p.length,l=Ue(t),v=l.length;if(h!=v&&!d)return!1;for(var w=h;w--;){var _=p[w];if(!(d?_ in t:O.call(t,_)))return!1}var b=i.get(e);if(b&&i.get(t))return b==t;var T=!0;i.set(e,t),i.set(t,e);for(var D=d;++w<h;){_=p[w];var E=e[_],F=t[_];if(r)var Je=d?r(F,E,_,t,e,i):r(E,F,_,e,t,i);if(!(Je===void 0?E===F||f(E,F,n,r,i):Je)){T=!1;break}D||(D=_=="constructor")}if(T&&!D){var ie=e.constructor,ae=t.constructor;ie!=ae&&"constructor"in e&&"constructor"in t&&!(typeof ie=="function"&&ie instanceof ie&&typeof ae=="function"&&ae instanceof ae)&&(T=!1)}return i.delete(e),i.delete(t),T}function Ue(e){return nn(e,Tn,ln)}function ne(e,t){var n=e.__data__;return gn(t)?n[typeof t=="string"?"string":"hash"]:n.map}function H(e,t){var n=vt(e,t);return an(n)?n:void 0}function cn(e){var t=O.call(e,L),n=e[L];try{e[L]=void 0;var r=!0}catch{}var f=De.call(e);return r&&(t?e[L]=n:delete e[L]),f}var ln=Me?function(e){return e==null?[]:(e=Object(e),dt(Me(e),function(t){return Re.call(e,t)}))}:wn,P=J;(le&&P(new le(new ArrayBuffer(1)))!=Q||K&&P(new K)!=Y||de&&P(de.resolve())!=be||ge&&P(new ge)!=Z||pe&&P(new pe)!=fe)&&(P=function(e){var t=J(e),n=t==B?e.constructor:void 0,r=n?z(n):"";if(r)switch(r){case Et:return Q;case It:return Y;case Pt:return be;case Dt:return Z;case jt:return fe}return t});function dn(e,t){return t=t??C,!!t&&(typeof e=="number"||ct.test(e))&&e>-1&&e%1==0&&e<t}function gn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function pn(e){return!!Pe&&Pe in e}function hn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||V;return e===n}function _n(e){return De.call(e)}function z(e){if(e!=null){try{return Ie.call(e)}catch{}try{return e+""}catch{}}return""}function Be(e,t){return e===t||e!==e&&t!==t}var yn=Fe((function(){return arguments})())?Fe:function(e){return W(e)&&O.call(e,"callee")&&!Re.call(e,"callee")},re=Array.isArray;function vn(e){return e!=null&&qe(e.length)&&!He(e)}var _e=xt||An;function bn(e,t){return Ge(e,t)}function He(e){if(!Ke(e))return!1;var t=J(e);return t==ue||t==q||t==A||t==Ze}function qe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C}function Ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function W(e){return e!=null&&typeof e=="object"}var $e=Ee?_t(Ee):sn;function Tn(e){return vn(e)?tn(e):un(e)}function wn(){return[]}function An(){return!1}a.exports=bn})(X,X.exports)),X.exports}var xn=Sn();const mn=On(xn),En=a=>{let c=0;const g=new Set(["readOnly","profiles","limits_cpu","limits_memory","devices","barePool","editRestriction"]);for(const o in a.values){if(g.has(o))continue;const s=o;mn(a.values[s],a.initialValues[s])||c++}for(const o in a.initialValues){if(g.has(o)||Object.hasOwn(a.values,o))continue;const s=o;a.values[s]!==a.initialValues[s]&&c++}return c},In=a=>{if(!Object.hasOwn(a.values,"profiles"))return 0;const c=a.initialValues.profiles,g=a.values.profiles;let o=Math.abs(g.length-c.length);return c.forEach((s,y)=>{g.length>y&&s!==g[y]&&o++}),o},Xe=a=>JSON.stringify(a,Object.keys(a??{}).sort()),Pn=a=>{let c=0;return["limits_cpu","limits_memory"].forEach(g=>{const o=g,s=a.initialValues[o];if(!Object.hasOwn(a.values,g)){c+=s?1:0;return}const y=a.values[o];Xe(s)!==Xe(y)&&c++}),c},ye=(a,c)=>{let g=0;for(const o in a){const s=o;Cn(a)&&!["size","pool"].includes(s)||JSON.stringify(a[s])!==JSON.stringify(c[s])&&g++}return g},Ln=(a,c)=>{if(!Object.hasOwn(a.values,"devices"))return!1;const g=a.initialValues.devices,o=a.values.devices,s=g.find(C=>C.name===c),y=o.find(C=>C.name===c);return!s&&y?!0:s&&!y?!1:s&&y?ye(s,y)>0:!1},Dn=a=>{let c=0;if(!Object.hasOwn(a.values,"devices"))return 0;const g=a.initialValues.devices,o=a.values.devices,s=g.map(A=>A.name),y=o.map(A=>A.name);let C=0,j=0;const G=[];return s.forEach((A,N)=>{const S=y.indexOf(A);S===-1?(j++,G.push(g[N])):c+=ye(g[N],o[S])}),y.forEach(A=>{if(s.indexOf(A)===-1){const S=o.find(q=>q.name===A),U=G.find(q=>q.type===S?.type);!!U&&S&&U?c+=ye(U,S)-1:C++}}),C+j+c},Rn=a=>En(a)+In(a)+Pn(a)+Dn(a);export{Rn as g,Ln as i};