awv3
Version:
AWV client CAD framework
1 lines • 1.6 kB
JavaScript
;function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function guid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,r="x"==t?e:3&e|8;return r.toString(16)})}function url(t){for(var e=window.location.search.substring(1),r=e.split("&"),o=0;o<r.length;o++){var n=r[o].split("=");if(n[0]==t)return n[1]}}function queryDom(t){return("string"==typeof t||t instanceof String)&&(t=document.querySelector(t)),t}function setPrefixedValue(t,e,r,o){var n,s,i,l=["-moz-","-webkit-","-o-","-ms-","-khtml-"];t.style[e]="",i=t.style[e];try{if(t.style[e]=r,t.style[e]!==i)return}catch(u){}for(n=0;n<l.length;++n){s=l[n]+r;try{if(t.style[e]=s,t.style[e]!==i)return}catch(a){}}t.style[e]=o}exports.__esModule=!0,exports.Performance=void 0;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2);exports.guid=guid,exports.url=url,exports.queryDom=queryDom,exports.setPrefixedValue=setPrefixedValue;var Performance=exports.Performance=function(){function t(){(0,_classCallCheck3["default"])(this,t),this.stamp=void 0,this.total=void 0}return t.prototype.begin=function(){return this.stamp=performance.now(),this},t.prototype.end=function(){return this.stamp=performance.now()-this.stamp,(!this.total||this.stamp>this.total)&&(this.total=this.stamp),this},t.prototype.printCurrent=function(){return console.log(this.stamp),this},t.prototype.printTotal=function(){return console.log(this.total),this},t.prototype.clear=function(){return this.total=void 0,this},t}();