Mini Kabibi Habibi

Current Path : C:/Program Files/Adobe/Adobe Creative Cloud/ACC/resources/legacy/host/libs/
Upload File :
Current File : C:/Program Files/Adobe/Adobe Creative Cloud/ACC/resources/legacy/host/libs/json2xml.min.js

function j2x(t){return(new X2JS).json2xml_str(t)}function X2JS(t){"use strict";void 0===(t=t||{}).escapeMode&&(t.escapeMode=!0),t.attributePrefix=t.attributePrefix||"@",t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"#text",void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],function(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();function e(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!=e||(e=t.nodeName),e}function r(t){return"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):t}function n(e,r,n){if("property"===t.arrayAccessForm&&(e[r]instanceof Array?e[r+"_asArray"]=e[r]:e[r+"_asArray"]=[e[r]]),!(e[r]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=0;i<t.arrayAccessFormPaths.length;i++){var a=t.arrayAccessFormPaths[i];if("string"==typeof a){if(a==n)break}else if(a instanceof RegExp){if(a.test(n))break}else if("function"==typeof a&&a(e,r,n))break}i!=t.arrayAccessFormPaths.length&&(e[r]=[e[r]])}}function i(t){var e=t.split(/[-T:+Z]/g),r=new Date(e[0],e[1]-1,e[2]),n=e[5].split(".");if(r.setHours(e[3],e[4],n[0]),n.length>1&&r.setMilliseconds(n[1]),e[6]&&e[7]){var i=60*e[6]+Number(e[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(t)?"-":"+")?-1*i:i),r.setMinutes(r.getMinutes()-i-r.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function a(r,s){if(9==r.nodeType){for(var o=new Object,c=r.childNodes,l=0;l<c.length;l++)1==(u=c.item(l)).nodeType&&(o[f=e(u)]=a(u,f));return o}if(1==r.nodeType){for((o=new Object).__cnt=0,c=r.childNodes,l=0;l<c.length;l++){var u,f=e(u=c.item(l));8!=u.nodeType&&(o.__cnt++,null==o[f]?(o[f]=a(u,s+"."+f),n(o,f,s+"."+f)):(null!=o[f]&&(o[f]instanceof Array||(o[f]=[o[f]],n(o,f,s+"."+f))),o[f][o[f].length]=a(u,s+"."+f)))}for(var _=0;_<r.attributes.length;_++){var p=r.attributes.item(_);o.__cnt++,o[t.attributePrefix+p.name]=p.value}var g=function(t){return t.prefix}(r);return null!=g&&""!=g&&(o.__cnt++,o.__prefix=g),null!=o["#text"]&&(o.__text=o["#text"],o.__text instanceof Array&&(o.__text=o.__text.join("\n")),t.escapeMode&&(o.__text=o.__text.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")),t.stripWhitespaces&&(o.__text=o.__text.trim()),delete o["#text"],"property"==t.arrayAccessForm&&delete o["#text_asArray"],o.__text=function(e,r,n){if(t.datetimeAccessFormPaths.length>0){for(var a=n.split(".#")[0],s=0;s<t.datetimeAccessFormPaths.length;s++){var o=t.datetimeAccessFormPaths[s];if("string"==typeof o){if(o==a)break}else if(o instanceof RegExp){if(o.test(a))break}else if("function"==typeof o&&o(obj,r,a))break}return s!=t.datetimeAccessFormPaths.length?i(e):e}return e}(o.__text,f,s+"."+f)),null!=o["#cdata-section"]&&(o.__cdata=o["#cdata-section"],delete o["#cdata-section"],"property"==t.arrayAccessForm&&delete o["#cdata-section_asArray"]),1==o.__cnt&&null!=o.__text?o=o.__text:0==o.__cnt&&"text"==t.emptyNodeForm?o="":o.__cnt>1&&null!=o.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""==o.__text||""==o.__text.trim())&&delete o.__text,delete o.__cnt,!t.enableToStringFunc||null==o.__text&&null==o.__cdata||(o.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),o}if(3==r.nodeType||4==r.nodeType)return r.nodeValue}function s(e,n,i,a){var s="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+n;if(null!=i)for(var o=0;o<i.length;o++){var c=i[o],l=e[c];t.escapeMode&&(l=r(l)),s+=" "+c.substr(t.attributePrefix.length)+"='"+l+"'"}return s+(a?"/>":">")}function o(t,e){return"</"+(null!=t.__prefix?t.__prefix+":":"")+e+">"}function c(e,r){return"property"==t.arrayAccessForm&&(i="_asArray",-1!==(n=r.toString()).indexOf(i,n.length-8))||0==r.toString().indexOf(t.attributePrefix)||0==r.toString().indexOf("__")||e[r]instanceof Function;var n,i}function l(t){var e=0;if(t instanceof Object)for(var r in t)c(t,r)||e++;return e}function u(e){var r=[];if(e instanceof Object)for(var n in e)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(t.attributePrefix)&&r.push(n);return r}function f(e){var n="";return e instanceof Object?n+=function(e){var n="";return null!=e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t.escapeMode?n+=r(e.__text):n+=e.__text),n}(e):null!=e&&(t.escapeMode?n+=r(e):n+=e),n}function _(t,e,r){var n="";if(0==t.length)n+=s(t,e,r,!0);else for(var i=0;i<t.length;i++)n+=s(t[i],e,u(t[i]),!1),n+=p(t[i]),n+=o(t[i],e);return n}function p(t){var e="";if(l(t)>0)for(var r in t)if(!c(t,r)){var n=t[r],i=u(n);null==n||null==n?e+=s(n,r,i,!0):n instanceof Object?n instanceof Array?e+=_(n,r,i):n instanceof Date?(e+=s(n,r,i,!1),e+=n.toISOString(),e+=o(n,r)):l(n)>0||null!=n.__text||null!=n.__cdata?(e+=s(n,r,i,!1),e+=p(n),e+=o(n,r)):e+=s(n,r,i,!0):(e+=s(n,r,i,!1),e+=f(n),e+=o(n,r))}return e+f(t)}this.parseXmlString=function(t){var e,r=window.ActiveXObject||"ActiveXObject"in window;if(void 0===t)return null;if(window.DOMParser){var n=new window.DOMParser,i=null;if(!r)try{i=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(t){i=null}try{e=n.parseFromString(t,"text/xml"),null!=i&&e.getElementsByTagNameNS(i,"parsererror").length>0&&(e=null)}catch(t){e=null}}else 0==t.indexOf("<?")&&(t=t.substr(t.indexOf("?>")+2)),(e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t);return e},this.asArray=function(t){return t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"==typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"==typeof t?i(t):t},this.xml2json=function(t){return a(t)},this.xml_str2json=function(t){var e=this.parseXmlString(t);return null!=e?this.xml2json(e):null},this.json2xml_str=function(t){return p(t)},this.json2xml=function(t){var e=this.json2xml_str(t);return this.parseXmlString(e)},this.getVersion=function(){return"1.1.5"}}