%PDF- %PDF-
Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/util/ |
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/util/deprecation-min.js |
define("util/deprecation",["underscore","util/events","util/text"],function(T,D,A){var E=Object.prototype.hasOwnProperty;var O=Object.prototype.toString;function C(Z,Y,V,W){if(typeof Z==="function"){return Z}var X=false;return function(){if(!X){X=true;var c=A.toSentenceCase(Z)+" has been deprecated"+(V?" since "+V:"")+" and will be removed in "+(W||"a future release")+".";if(Y){c+=" Use "+Y+" instead."}var b=new Error();var a=b.stack||b.stacktrace;var d=(a&&a.replace(/^Error\n/,""))||"No stack trace of the deprecated usage is available in your current browser.";console.log(c+"\n"+d)}}}function H(Y,a,Z,W,X){var V=C(a||Y.name||"this function",Z,W,X);return function(){V();return Y.apply(this,arguments)}}function P(X,a,Z,V,W){var Y=H(X,a,Z,V,W);Y.prototype=X.prototype;T.extend(Y,X);return Y}var K=false;try{if(Object.defineProperty){Object.defineProperty({},"blam",{get:function(){},set:function(){}});K=true}}catch(Q){}function R(a,c,b,Z,X,Y){if(K){var W=a[c];var V=C(b||c,Z,X,Y);Object.defineProperty(a,c,{get:function(){V();return W},set:function(d){W=d;V();return d}})}else{}}function G(Y,a,Z,X,V,W){if(typeof Y[a]==="function"){Y[a]=H(Y[a],Z||a,X,V,W)}else{R(Y,a,Z,X,V,W)}}function B(a,W,Z,X,Y){for(var V in a){if(E.call(a,V)){G(a,V,W+V,Z+V,X,Y)}}}var U="id";var F=/^(attributes|url|isNew|hasChanged|changed(Attributes)|previous(Attributes)|clone)$/;function S(a,Z,W,X,Y){if(U===W){return }if(F.test(W)){throw new Error("The property "+W+" cannot be deprecated when converting to a Brace model.")}if(K){var V=C(Z+"::"+W,Z+"::get|set('"+W+"')",X,Y);Object.defineProperty(a.prototype,W,{get:function(){V();return this.get(W)},set:function(b){V();this.set(W,b)}})}else{}}function N(b,a,X,Y){var W=b.prototype.namedAttributes;var V;if(O.call(W)==="[object Array]"){var Z=W.length;while(Z--){S(b,a,W[Z],X,Y)}}else{for(V in W){if(E.call(W,V)){S(b,a,V,X,Y)}}}if(!K){var c=b.prototype.set;b.prototype.set=function(f,e){c.apply(this,arguments);if(f&&typeof f==="object"){for(var d in f){if(E.call(f,d)){this[d]=f[d]}}}else{this[f]=e}}}}function J(a,Y,Z,W,X){if(E.call(a.prototype.namedAttributes,Y)){var V=A.toSentenceCase(Y);a.prototype["get"+V]=H(a.prototype["get"+V],Y,Z,W,X);a.prototype["set"+V]=H(a.prototype["set"+V],Y,Z,W,X)}}function M(X,W,Y){X=X.clone();var Z=X.toJSON();var V;var a=C("use of this object's Backbone properties","raw JSON properties on this object",W,Y);for(V in X){if(!E.call(Z,V)){G(X,V,a)}}for(V in Z){if(E.call(Z,V)){X[V]=Z[V]}}return X}var I={};function L(X,Z){if(D.listeners(X).length){if(arguments.length<5){throw new Error("eventName, context, alternativeName, sinceVersion, and removeInVersion must all be provided (but can be null).")}var V=Array.prototype.slice.call(arguments,0,arguments.length-3);var a=arguments[arguments.length-3];var W=arguments[arguments.length-2];var Y=arguments[arguments.length-1];var b=I[X]||(I[X]=C("Event '"+X+"'","'"+a+"'",W,Y));b();D.trigger.apply(D,V)}}return{fn:H,construct:P,prop:G,obj:B,braceAsJson:N,braceAttribute:J,jsonAsBrace:M,triggerDeprecated:L,propertyDeprecationSupported:K,getMessageLogger:C}});