text: /**
   * A resource factory inspired by $resource from AngularJS
   * @version v2.3.1 - 2021-07-26
   * @link https://github.com/FineLinePrototyping/angularjs-rails-resource.git
   * @author 
   */
  !function(a){angular.module("rails").factory("RailsResourceSnapshotsMixin",["RailsResourceInjector",function(a){function b(){}function c(){var a=this.constructor.config,b=(a.snapshotSerializer||a.serializer).serialize(this);return delete b.$$snapshots,b}function d(a){var b=this._prepSnapshot();return b.$rollbackCallback=a,this.$$snapshots||(this.$$snapshots=[]),this.$$snapshots.push(b),this.$$snapshots.length-1}function e(a){var b,c,d=this.constructor.config,e=this.$$snapshots,f=this.$$snapshots?this.$$snapshots.length:0;return angular.isArray(e)&&0!==f&&angular.isNumber(a)?(b=e.splice(Math.max(0,Math.min(a,f-1))),angular.isArray(b)&&0!==b.length?(c=b[0].$rollbackCallback,angular.extend(this,(d.snapshotSerializer||d.serializer).deserialize(b[0])),this.$$snapshots=e,delete this.$rollbackCallback,angular.isFunction(c)&&c.call(this),!0):!1):!1}function f(a){var b=this.$$snapshots?this.$$snapshots.length:0;return a=Math.min(a||1,b),0>a&&(a=b),b&&this.rollbackTo(this.$$snapshots.length-a),!0}function g(){if(!this.$$snapshots)return!0;var a=this._prepSnapshot(),b=this.$$snapshots[this.$$snapshots.length-1];return!angular.equals(a,b)}return b.configure=function(b,c){b.snapshotSerializer=a.getService(c.snapshotSerializer)},b.extended=function(a){a.intercept("afterResponse",function(a,b,c){c&&c.hasOwnProperty("$$snapshots")&&angular.isArray(c.$$snapshots)&&(c.$$snapshots.length=0)}),a.include({snapshot:d,rollback:f,rollbackTo:e,unsnappedChanges:g,_prepSnapshot:c})},b}])}();