text: (function($,undefined){"use strict";var consentQuestionID=0;$.widget('s3.consentQuestion',{options:{},_create:function(){this.id=consentQuestionID;consentQuestionID+=1;this.eventNamespace='.consentQuestion';},_init:function(){var el=$(this.element);this.input=$('#'+el.attr('id')+'-response');this.refresh();},_destroy:function(){$.Widget.prototype.destroy.call(this);},refresh:function(){this._unbindEvents();this._bindEvents();},_deserialize:function(){var jsonData=this.input.val(),parsed={};if(jsonData){try{parsed=JSON.parse(jsonData);}catch(e){}}
  return parsed;},_serialize:function(){var el=$(this.element),responses=this._deserialize();$('.consent-checkbox',el).each(function(){var code=$(this).data('code'),response=responses[code];if(response!==undefined){response[1]=$(this).prop('checked');}});this.input.val(JSON.stringify(responses));},_bindEvents:function(){var el=$(this.element),ns=this.eventNamespace,self=this;el.on('change'+ns,'.consent-checkbox',function(){self._serialize();});return true;},_unbindEvents:function(){var el=$(this.element),ns=this.eventNamespace;el.off(ns);return true;}});})(jQuery);