(self.webpackChunkapp=self.webpackChunkapp||[]).push([[894],{22777:function(t,e,r){r.g.requireAll=function(t){var e=[];for(keys=t.keys(),i=0;i<keys.length;i++)e.push(t(keys[i]));return e},r.g.requireAll=function(t){var e=[];for(keys=t.keys(),i=0;i<keys.length;i++)e.push(t(keys[i]));return e}},19854:function(t,e,r){var n,i;$=r.g.$=window.$=window.jQuery=r.g.jQuery=r(19755),jQuery.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},i={},(n=jQuery.uaMatch(navigator.userAgent)).browser&&(i[n.browser]=!0,i.version=n.version),i.chrome?i.webkit=!0:i.webkit&&(i.safari=!0),jQuery.browser=i,jQuery.sub=function(){function t(e,r){return new t.fn.init(e,r)}jQuery.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,n){return n&&n instanceof jQuery&&!(n instanceof t)&&(n=t(n)),jQuery.fn.init.call(this,r,n,e)},t.fn.init.prototype=t.fn;var e=t(document);return t}},59808:function(t,e,r){"use strict";var n,i,o,u,a;r.g.currentFunctionName=function(){return currentFunctionName.caller.name},r.g.getScope=function(t){var e,r;return(null!=(e=$(t))&&"function"==typeof e.scope?e.scope():void 0)||("undefined"!=typeof angular&&null!==angular&&"function"==typeof angular.element&&null!=(r=angular.element(t))&&"function"==typeof r.scope?r.scope():void 0)},r.g.markup={bold:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.mark||(e.mark="<b>%s</b>"),this.custom(t,e)},custom:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n;return e.marked||(e.marked="markup"),r=new RegExp(`${e.marked}{(S*(.*?S*)?)}`,"g"),n=e.mark.replace("%s","$1"),`${t}`.replace(r,n).nl2br()}},r.g.I18n={interpolate:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n,i;if(!e)return t;for(r in e)i=e[r],n=new RegExp(`%{${r}}`,"g"),(t=`${t}`).match(n)&&(t=t.replace(n,i));return this.bold(t,e)},bold:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return markup.bold(t,e)},markup:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return markup.custom(t,e)}},r.g.isUrl=function(t){return!!isString(t)&&!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$").test(t)},r.g.isFile=function(t){return!!t&&"object"==typeof t&&t.constructor===File},r.g.isObject=function(t){return!!t&&"object"==typeof t&&t.constructor===Object},r.g.isArray=function(t){return!!t&&"object"==typeof t&&t.constructor===Array},r.g.isNumber=function(t){return"number"==typeof t&&isFinite(t)},r.g.isString=function(t){return"string"==typeof t||t instanceof String},r.g.isFunction=function(t){return"function"==typeof t},r.g.isNull=function(t){return[void 0,null].includes(t)},r.g.isBlank=function(t){var e,r;return e=isArray(t)&&t.empty(),r=isObject(t)&&Object.empty(t),isNull(t)||[""].includes(t)||e||r},r.g.isPresent=function(t){return!isBlank(t)},r.g.trace=function(t){return window.console&&console.log(t)},r.g.openFullScreen=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;document.onwebkitfullscreenchange=e,document.onmozfullscreenchange=e,document.onmsfullscreenchange=e,document.onfullscreenchange=e,document.onwebkitfullscreenerror=r,document.onmozfullscreenerror=r,document.onmsfullscreenerror=r,document.onfullscreenerror=r;try{"function"==typeof t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}catch(t){}try{"function"==typeof t.mozRequestFullScreen&&t.mozRequestFullScreen()}catch(t){}try{"function"==typeof t.msRequestFullscreen&&t.msRequestFullscreen()}catch(t){}try{"function"==typeof t.requestFullscreen&&t.requestFullscreen()}catch(t){}},r.g.closeFullScreen=function(){"function"==typeof document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),"function"==typeof document.webkitExitFullscreen&&document.webkitExitFullscreen(),"function"==typeof document.mozCancelFullScreen&&document.mozCancelFullScreen(),"function"==typeof document.msExitFullscreen&&document.msExitFullscreen(),"function"==typeof document.cancelFullScreen&&document.cancelFullScreen(),"function"==typeof document.exitFullscreen&&document.exitFullscreen()},r.g.isFullScreen=function(){return!!document.msFullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.isFullScreen||document.fullscreen},r.g.compactFullArray=function(t){var e,r;for(e=0;e<t.length;)""!==(r=t[e])&&null!=r||(t.splice(e,1),e--),e++;return t},r.g.idUnico=function(t){var e;return e={prefixo:"item_"},t&&$.extend(e,t),(e.prefixo+Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17)).replace(/\./g,"")},r.g.guid=function(){var t;return[(t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)})()+t(),t(),t(),t(),t()+t()+t()].join("-")},r.g.guidInt=function(){return Math.floor(99999*Math.random())},r.g.ensureNegativeValue=function(t){return t>0?-1*t:t},r.g.completeUrlWithProtocolHost=function(t){return/^(http|https):\/\//.test(t)?t:`${currentHostFull()}${t}`},r.g.baseUrlCliente=function(t){return"/gerenciar/cd/"+t+"/"+(("function"==typeof currentMonthYear?currentMonthYear():void 0)||scTimezone.now.format("MM-YYYY"))},r.g.scNetwork||(r.g.scNetwork={}),r.g.getCurrentIp=function(){var t;return(t=new XMLHttpRequest).open("GET","https://www.cloudflare.com/cdn-cgi/trace"),t.onreadystatechange=()=>{var e,r,n,i,o;if(4===t.readyState&&200===t.status){for(o=[],r=0,n=(i=t.response.split("\n")).length;r<n;r++)(e=i[r]).match(/^ip=/)?o.push(scNetwork.ipClient=e.replace("ip=","")):o.push(void 0);return o}},t.send()},r.g.getCurrentIp(),r.g.currentUser=function(){var t;return null!=(t=$("body").attr("data-current_user"))?t.toJson():void 0},r.g.s=function(){return getScope("#breadcrumb")},r.g.currentCliente=function(){var t;return(t=document.getElementsByTagName("body")[0].dataset.current_cliente)?JSON.parse(decodeURI(t)):{}},o=document.getElementsByTagName("body")[0].dataset.current_user||"{}",r.g.currentAcl=JSON.parse(decodeURI(o)).acl,a=document.getElementsByTagName("body")[0].dataset.current_cidade||"{}",r.g.currentCidade=JSON.parse(decodeURI(a)),i=document.getElementsByTagName("body")[0].dataset.cliente_support||"{}",r.g.cliente_support=JSON.parse(decodeURI(i)),u=document.getElementsByTagName("body")[0].dataset.current_theme||"{}",r.g.currentTheme=JSON.parse(decodeURI(u)),r.g.currentLocale=JSON.parse(decodeURI(document.getElementsByTagName("body")[0].dataset.locale||"{}")),r.g.currentCurrency=currentLocale.currency,n=document.getElementsByTagName("body")[0].dataset.administradora,r.g.currentAdministradora=n?JSON.parse(decodeURI(n)):{},r.g.currentEnviroment=function(){return $("body").data("enviroment")},r.g.isDevelopment=function(){return"development"===currentEnviroment()},r.g.isDev=isDevelopment,r.g.isProduction=function(){return"production"===currentEnviroment()},r.g.isProd=isProduction,r.g.redirect={login:function(){return redirect.url(`/logar?save_current_url=${encodeURIComponent(document.URL)}`)},accessDenied:function(){return redirect.url(`/access_denied?save_current_url=${encodeURIComponent(document.URL)}`)},url:function(t){return $("#body-loading").show(),window.location=t,null}},r.g.redirectTo=function(t){return redirect.url(t)},r.g.refresh=function(){return redirectTo(window.location.href)},r.g.bool=function(t){return"false"!==t&&0!==t&&!1!==t&&null!=t},r.g.bool_null=function(t){return null==t||""===t?null:"false"!==t&&0!==t&&!1!==t&&("true"===t||1===t||!0===t||""!==t||void 0)},r.g.ucfirst=function(t){return(t+="").charAt(0).toUpperCase()+t.substr(1)},r.g.ano_bissexto=function(t){return t%4==0&&(t%400==0||t%100!=0)},r.g.diferencaEntreDatas=function(t,e,r){var n,i,o,u,a,c;if(a=30*(u=24*36e5),i=scTimezone.new(t),c=(o=scTimezone.new(e))-i,isNaN(c))return NaN;switch(n=0,r){case"years":n=o.getFullYear()-i.getFullYear();break;case"months":n=12*o.getFullYear()+o.getMonth()-(12*i.getFullYear()+i.getMonth());break;case"years":n=Math.round(c/31104e6);break;case"months":n=Math.round(c/a);break;case"weeks":n=Math.round(c/6048e5);break;case"days":n=Math.round(c/u);break;case"hours":n=Math.round(c/36e5);break;case"minutes":n=Math.round(c/6e4);break;case"seconds":n=Math.round(c/1e3);break;default:n="falta um desses argumentos dessa funcao diferencaEntreDatas(data_menor, data_maior, interval)"}return-1*n},r.g.multiplicar=function(){for(var t,e,r,n,i,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];for(e=0,r=(i=u.compact()).length;e<r;e++)n=i[e],n=dinheiro_bd(n),t=null!=t?t*n:n;if(null!=t)return parseFloat(t.toFixed(2),10)},r.g.dividir=function(){for(var t,e,r,n,i,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];for(e=0,r=(i=u.compact()).length;e<r;e++)n=i[e],n=dinheiro_bd(n),t=null!=t?t/n:n;if(null!=t)return parseFloat(t.toFixed(2),10)},r.g.somar=function(){for(var t,e,r,n,i,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];for(e=0,r=(i=u.compact()).length;e<r;e++)n=i[e],n=dinheiro_bd(n),t=null!=t?t+n:n;if(null!=t)return parseFloat(t.toFixed(2),10)},r.g.subtrair=function(){for(var t,e,r,n,i,o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];for(e=0,r=(i=u.compact()).length;e<r;e++)n=i[e],n=dinheiro_bd(n),t=null!=t?t-n:n;if(null!=t)return parseFloat(t.toFixed(2),10)},r.g.calculoJuros=function(){var t;return t=["ad","am","aa"],{juros_value:null,is_percent_juros_value:null,is_juros_simples:null,period:null,type_period:null,capital:null,round:2,calc:function(t){var e;if($.extend(this,t),!this.validate_opt()){switch(this.capital=dinheiro_bd(this.capital)||0,this.juros_value=dinheiro_bd(this.juros_value)||0,this.period=Math.abs(this.period),this.type_period){case"ad":this.days=this.period;break;case"am":this.days=parseFloat(this.period/30,10);break;case"aa":this.days=parseFloat(this.period/365,10)}return this.is_percent_juros_value?(this.taxa_percentual=parseFloat(this.juros_value/100,10),e=this.is_juros_simples?this.calc_simples():this.calc_composto()):e=this.juros_value*this.days,parseFloat(e.toFixed(this.round),10)}},calc_simples:function(){var t;return t=this.capital*this.taxa_percentual,parseFloat(t*this.days,10)},calc_composto:function(){var t,e;return e=Math.pow(1+this.taxa_percentual,this.days),t=parseFloat(this.capital*e,10),parseFloat(t-this.capital,10)},validate_opt:function(){var e,r;return e=[],t.includes(this.type_period)||e.push(`invalid 'type_period': ${this.type_period}`),r=[],null==this.capital&&r.push("capital"),null==this.juros_value&&r.push("juros_value"),null==this.is_juros_simples&&this.is_percent_juros_value&&r.push("is_juros_simples"),null==this.is_percent_juros_value&&r.push("is_percent_juros_value"),r.any()&&e.push(`missing params: ${r.toSentence()}`),e.any()&&alert(e.join("; ")),e.any()}}.calc(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},r.g.calculoCorrecao=function(){return{capital:null,correcao:{},data_fim:null,data_inicio:null,calc:function(t){var e,r,n,i;if(this.validate_opt(t))return 0;if(this.capital=dinheiro_bd(t.capital)||0,this.correcao=angular.copy(t.correcao||{}),this.data_fim=t.data_fim.toDate(),this.data_inicio=t.data_inicio.toDate(),n=(this.data_fim>=this.data_inicio?this.data_fim:this.data_inicio).beginningOfMonth(),i=(this.data_inicio>=this.data_fim?this.data_fim:this.data_inicio).beginningOfMonth(),this.correcao.valores=this.correcao.valores.select((function(t){return t.data.toDate()>=i.toDate()&&t.data.toDate()<=n.toDate()&&null!=t.valor})),Object.blank(this.correcao.valores))return 0;switch(this.correcao.valores=this.correcao.valores.sort((function(t,e){return e.data.toDate()-t.data.toDate()})),this.correcao.tipo_calculo){case"calculo2":case"calculo3":if(r=this.correcao.valores.first(),e=this.correcao.valores.select((function(t){return t.data.toDate()<=i.toDate()})).first(),this.correcao.valores=[r,e].compact(),2!==this.correcao.valores.length)return 0}return this.execCalc()},execCalc:function(){switch(this.correcao.tipo_calculo){case"calculo1":return this.calc_1();case"calculo2":return this.calc_2();case"calculo3":return this.calc_3();case"calculo4":return this.calc_4();default:return alert(`Tipo de calculo (${this.correcao.tipo_calculo}) não foi configurado.`)}},calc_1:function(){var t;return t=parseFloat(this.capital),this.correcao.valores.forEach((function(e){return t+=t*(e.valor/100)})),subtrair(t,this.capital)},calc_2:function(){var t,e;return e=this.correcao.valores.first(),t=this.correcao.valores.last(),Object.blank(e)||Object.blank(t)?0:multiplicar(100,t.valor*e.valor-1)},calc_3:function(){var t,e;return e=this.correcao.valores.first(),t=this.correcao.valores.last(),Object.blank(e)||Object.blank(t)?0:subtrair(this.capital*e.valor/t.valor,this.capital)},calc_4:function(){var t;return t=this.correcao.valores.last(),Object.blank(t)?0:subtrair(this.capital*t.valor,this.capital)},validate_opt:function(t){var e,r,n;return r=[],null==t.capital&&r.push("capital"),null==t.data_fim&&r.push("data_fim"),null==t.data_inicio&&r.push("data_inicio"),null==(null!=(n=t.correcao)?n.id:void 0)&&r.push("correcao.id"),e="",r.any()&&(e=`missing params: ${r.toSentence()}`),Object.blank(e)||alert(e),!Object.blank(e)}}.calc(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},r.g.in_array=function(t,e,r){var n;if(n="",r){for(n in e)if(e[n]===t)return!0}else for(n in e)if(e[n]===t)return!0;return!1},r.g.pad=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"l";var n,i;if(i="",e>(t=t.toString()).length)for(n=0;n<e-t.length;)i+="0",n++;return"r"===r?t.toString()+i:i+t.toString()},r.g.padl=function(t,e){return pad(t,e,"l")},r.g.padr=function(t,e){return pad(t,e,"r")},r.g.createAccentRegexp=function(t){var e,r;return e=function(t){return charToAccentedCharClassMap[t]||t},r=_deaccent(t).replace(/([|()[{.+*?^$\\])/g,"\\$1").replace(/\S/g,e),new RegExp(r,"gi")},r.g.fileize=function(t){return _deaccent(t).toLowerCase().replace(/( )+/g,"_")},r.g._deaccent=function(t){var e,r,n;if(!t)return t;for(e in r=t,charToAccentedCharClassMap)n=charToAccentedCharClassMap[e],r=null!=r?r.replace(new RegExp(n,"g"),e):void 0;return r},r.g.MESES=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],r.g.viewport={_width:function(){return $(window).width()},_height:function(){return $(window).height()}},r.g.isTouchable=function(){return"ontouchstart"in document.documentElement},r.g.myBrowser={webkit:function(){return $.browser.webkit||!1},chrome:function(){return $.browser.chrome||!1},mozilla:function(){return $.browser.mozilla||!1},ie7:function(){return!(!$.browser.msie||7!==parseInt($.browser.version,10))},ie8:function(){return!(!$.browser.msie||8!==parseInt($.browser.version,10))},ie9:function(){return!(!$.browser.msie||9!==parseInt($.browser.version,10))},ie10:function(){return!(!$.browser.msie||10!==parseInt($.browser.version,10))},ie11:function(){var t,e;return e=!!navigator.userAgent.match(/Trident\/7.0/),t=!!navigator.userAgent.match(/.NET4.0E/),e&&t},ie:function(){return myBrowser.ie7()||myBrowser.ie8()||myBrowser.ie9()||myBrowser.ie10()||myBrowser.ie11()},iPod:function(){return!!navigator.userAgent.match(/iPod/i)}},r.g.isMobile={Android:function(){return!!navigator.userAgent.match(/Android/i)},BlackBerry:function(){return!!navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return!!navigator.userAgent.match(/iPhone|iPad|iPod/i)},iPad:function(){return!!navigator.userAgent.match(/iPad/i)},iPhone:function(){return!!navigator.userAgent.match(/iPhone/i)},iPod:function(){return!!navigator.userAgent.match(/iPod/i)},Windows:function(){return!!navigator.userAgent.match(/IEMobile/i)},check:function(){return isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()},any:function(){return isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Windows()}},r.g.String.prototype.presence=function(){var t;return""===(t=this.trim())?null:t},r.g.String.prototype.truncate=function(t){var e;return(e=this.replace("","")).length<t?e:e.substring(0,t-3)+"..."},r.g.String.prototype.dinheiroBd=function(){return dinheiro_bd(this)},r.g.String.prototype.capitalize=function(){var t;return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?(t=function(t){return t.capitalize()},this.split(" ").map(t).join(" ")):this.charAt(0).toUpperCase()+this.slice(1)},r.g.String.prototype.toCamel=function(){return this.replace(/(\-[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}))},r.g.String.prototype.toUnderscore=function(){return this.replace(/([A-Z])/g,(function(t){return"_"+t.toLowerCase()})).replace(/^_/g,"")},r.g.String.prototype.toJson=function(){return JSON.parse(this)},r.g.String.prototype.isValidHourMinute=function(){var t;return t=this.trim(),/^([0-1]?[0-9]|2[0-3]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)},r.g.String.prototype.isValidDate=function(){var t,e;return(t=this.trim().split("-"))[0].length<=2&&(t=t.reverse()),(e=scTimezone.new(t[0],t[1]-1,t[2]))&&e.getMonth()+1===Number(t[1])&&e.getDate()===Number(t[2])},r.g.String.prototype.isValidDatePtBr=function(){var t,e;return(t=this.trim().split("/"))[0].length<=2&&(t=t.reverse()),(e=scTimezone.new(t[0],t[1]-1,t[2]))&&e.getMonth()+1===Number(t[1])&&e.getDate()===Number(t[2])},r.g.String.prototype.isEmail=function(){var t,e;return e=/^\w+([\-\+\.\'\w])*@\w+([\-\.]\w+)*\.\w+([\-\.]\w+)*$/,t=this.trim(),!1!==e.test(t)},r.g.String.prototype.isValidEmail=r.g.String.prototype.isEmail,r.g.String.prototype.toI=function(){return this.to_i()},r.g.String.prototype.to_i=function(){return parseInt(this.replace(",","."),10)},r.g.String.prototype.toNumber=function(){return parseFloat(this.replace(",","."),10)},r.g.String.prototype.to_boolean=function(){var t;return"true"===(t=this.trim())||"1"===t},r.g.String.prototype.toBoolean=function(){return this.to_boolean()},r.g.String.prototype.empty=function(){return""===this.trim()},r.g.String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"")},r.g.String.prototype.onlyDate=function(){return this.split(" ")[0]},r.g.String.prototype.toDateBdString=function(){var t,e,r;return t=(r=this.substring(0,10).split("/"))[0],e=r[1],`${r[2]}-${e}-${t}`},r.g.String.prototype.toDatePt=function(){var t,e,r,n,i;return/\//.test(this)?this.trim():(e=(i=this.substring(0,10).split("-"))[2],r=i[1],t=i[0],n="undefined"!=typeof scTimezone&&null!==scTimezone?scTimezone.new(t,r-1,e):new Date(t,r-1,e),dateToPt(n))},r.g.String.prototype.addQueryString=function(t){var e;return isObject(t)&&(t=$.param(t)),(e=this).match(/\?/)?e+="&"+t:e+="?"+t,e},r.g.getQueryStringFromUrl=function(t){var e;return null!=(e=currentUrl())?e.getUrlParam(t):void 0},r.g.String.prototype.getUrlParam=function(t){var e;return null===(e=new RegExp("[?&]"+t+"=([^&#]*)").exec(this))?null:e[1]||0},r.g.String.prototype.removeQueryString=function(){var t;return(t=this).match(/\?/)&&((t=t.split("?")[0]).match(/\/$/)||(t+="/")),t},r.g.String.prototype.replaceQueryString=function(t,e){var r,n;return n=this.trim(),r=new RegExp("([?|&])"+t+"=.*?(&|$)","i"),n.match(r)?n.replace(r,"$1"+t+"="+e+"$2"):n.addQueryString(`${t}=${e}`)},r.g.String.prototype.addOrReplaceQueryString=function(t,e){return this.getUrlParam(t)?this.replaceQueryString(t,e):this.addQueryString(`${t}=${e}`)},r.g.String.prototype.extractHourMinutesFromDateTime=function(){var t;if((t=/[0-9]{2}(\:)[0-9]{2}/g).test(this))return this.match(t)[0]},r.g.hasText=function(t,e){var r;return t=t.toLowerCase(),e=e.toLowerCase(),r=createAccentRegexp(e),!!(t.search(r)>=0)},r.g.String.prototype.hasText=function(t){var e;return e=this.trim(),hasText(e,t)},r.g.String.prototype.toDateTimePt=function(){var t,e,r,n,i,o,u,a,c,s,l,p;return""!==this?(e=(c=this.split("-"))[2].substring(0,2).to_i(),o=c[1].to_i(),t=c[0].to_i(),r=(s=this.extractHourMinutesFromDateTime().split(":"))[0].to_i(),i=s[1].to_i(),a=scTimezone.new(t,o-1,e,r,i),p=!1,this.match(":")&&(p=!0),n=a.getHours(),u=a.getMinutes(),l=this.toDatePt(),!0===p&&(l+=" às "+pad(n,2)+":"+pad(u,2))):l="",l},r.g.Date.prototype.toDatePt=function(){return dateToPt(this)},r.g.Date.prototype.toDateTimePt=function(){var t,e;return t=this.getHours(),e=this.getMinutes(),this.toDatePt()+" às "+pad(t,2)+":"+pad(e,2)},r.g.dateToPt=function(t){var e,r,n;return r=t.getDate(),n=t.getMonth()+1,e=t.getFullYear(),pad(r,2)+"/"+pad(n,2)+"/"+e},r.g.data_to_mes_ano=function(t){var e,r,n;return n=(r=t.split("/"))[1],e=r[2],numero_to_mes_extenso(n)+"/"+e},r.g.mes_to_numero=function(t){var e;for(t=t.capitalize(),e=0;e<MESES.length;){if(MESES[e]===t)return pad(e+1,2);e++}return!1},r.g.numero_to_mes_extenso=function(t){return"string"==typeof t&&(t=t.to_i()),MESES[t-1]},r.g.dateAge=function(t){var e,r,n,i,o,u,a,c;return u=(i=hoje().split("/"))[0],c=i[1],r=i[2],o=(n=t.toDatePt().split("/"))[0],a=n[1],e=r-n[2],a<=c&&o<u&&(e-=1),e},r.g.hoje=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DD/MM/YYYY";return scTimezone.now.format(t)},r.g.dias=function(t){return t>1?t+" dias":t+" dia"},r.g.meses=function(t){return dias>1?t+" meses":t+" mês"},r.g.incrementar_mes=function(t){var e,r,n,i;return""!==t&&void 0!==t?(n=(r=t.split("/"))[0].to_i(),i=r[1].to_i(),e=r[2].to_i(),(i+=1)>12&&(i=1,e+=1),arrumar_data_estourada(pad(n,2)+"/"+pad(i,2)+"/"+pad(e,2))):""},r.g.numberOfDaysInMonth=function(t,e){return scTimezone.new(e,t,0).getDate()},r.g.dayInWeek=function(t){var e,r,n,i;return isObject(t)&&(r=`${t.ano}-${t.mes}-${t.dia}`),r||(r=t),r||(r=scTimezone.new().format("YYYY-MM-DD")),r=scTimezone.new(r),[e,i,n]=r.format("YYYY-MM-DD").split("-"),scTimezone.new(e,i-1,n).getDay()+1},r.g.lastDayMonth=function(t){var e,r;return e=t.split("-"),r=new Date(e[0],e[1]-1,e[2]),new Date(r.getFullYear(),r.getMonth()+1,0).toISOString().substring(0,10)},r.g.lastMonthYear=function(t){var e,r;return e=t.split("-"),r=new Date(e[0],11,e[2]),lastDayMonth(r.toISOString().substring(0,10))},r.g.arrumar_data_estourada=function(t){var e,r,n,i,o,u;return""!==t&&void 0!==t?(o=[4,6,9,11],u=[1,3,5,7,8,10,12],n=(r=t.split("/"))[0].to_i(),i=r[1].to_i(),e=r[2].to_i(),i>12&&(i=12),2===i&&(ano_bissexto(e)?n>29&&(n=29):n>28&&(n=28)),in_array(i,o)&&n>30&&(n=30),in_array(i,u)&&n>31&&(n=31),pad(n,2)+"/"+pad(i,2)+"/"+e):""},r.g.Array.prototype.removeElement=function(t){var e,r,n,i;for(i=void 0,n=(r=arguments).length,e=void 0;n&&this.length;)for(i=r[--n];-1!==(e=this.indexOf(i));)this.splice(e,1);return this},r.g.isMiddleButton=function(t){return 1===t.button},r.g.isLeftButton=function(t){return 0===t.button},r.g.isLeftOrMiddleButton=function(t){return isLeftButton(t)||isMiddleButton(t)},r.g.charToAccentedCharClassMap={A:"[AÁÀÃÂÄǍȀĀȦ]",a:"[aáàãâäǎȁāȧ]",E:"[EÉÈẼÊËĚȄĒĖ]",e:"[eéèẽêëěȅēė]",I:"[IÍÌĨÎÏǏȈĪİ]",i:"[iíìĩîïǐȉīi̇]",O:"[OÓÒÕÔÖǑȌŌȮ]",o:"[oóòõôöǒȍōȯ]",U:"[UÚÙŨÛÜǓȔŪ]",u:"[uúùũûüǔȕū]",C:"[CÇ]",c:"[cç]"},r.g.desabilitar=function(t){return t.animate({opacity:.5},700,(function(){return $(this).addClass("desabilitado")}))},r.g.parcelar=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n,i,o,u,a,c;if(t=`${t}`.toNumber(),e=`${e}`.toNumber(),!(e>0))return[];for(t||(t=0),o=[],i=dividir(t,e),n=0,u=0,t!==(c=multiplicar(i,e))&&(u=subtrair(t,c));n<e;)o[n]=i,n++;for(n=u<0?0:e-1;0!==u;)u<0&&n===e?n=0:u>0&&-1===n&&(n=e-1),a=o[n],u<0?(a=subtrair(a,.01),u=somar(u,.01)):(a=somar(a,.01),u=subtrair(u,.01)),o[n]=a,u<0?n++:n--;return r.formatted?o.map((function(t){return dinheiro(t,{symbol:!1})})):o},r.g.porcentagem_desconto=function(){var t;if(t={valor_total:null,desconto:null},options)return $.extend(t,options)},r.g.descontar=function(t){var e,r;return e={valor_total:null,desconto:null},t&&$.extend(e,t),r=e.valor_total,subtrair(r,multiplicar(r,e.desconto/100))},r.g.escurecerTela=function(t){return $("<div></div>").addClass("tela-escura").appendTo(document.body)},r.g.clarearTela=function(){return $("body").find(".tela-escura").remove()},r.g.compactFullObject=function(t){var e,r,n;for(r in n=void 0,e=t)Object.prototype.hasOwnProperty.call(e,r)&&("null"!==(n=e[r])&&null!==n&&""!==n&&void 0!==n||delete e[r]);return e},r.g.incrementar_mes_ano=function(t){var e,r,n,i;return n=(r=t.split("/"))[0].trim(),e=r[1].to_i(),12===(i=mes_to_numero(n).to_i())&&e++,numero_to_mes_extenso(i%12+1)+"/"+e},r.g.token=function(){var t;return(t=function(){return Math.random().toString(36).substr(2)})()+t()},r.g.fileIsImage=function(t){var e;return"jpg"===(e=t.type.split("/").slice(-1)[0])||"png"===e||"jpeg"===e||"bmp"===e||"gif"===e},r.g.blobToFile=function(t,e){if(!isBlank(t))return new File([t],e,{lastModified:(new Date).getTime(),type:null!=t?t.type:void 0})},r.g.transformDateTimeToTime=function(t){if(!isBlank(t))return(null!=t?t.getHours:void 0)?`${pad(t.getHours(),2)}:${pad(t.getMinutes(),2)}`:t},r.g.transformTimeToDateTime=function(t){var e,r,n;if(!isBlank(t))return(null!=t?t.getHours:void 0)?t:([r,n]=t.split(":"),(e=scTimezone.new()).setHours(r),e.setMinutes(n),e.setSeconds(0),e)},r.g.formDataFromObject=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n;if(isObject(t)||isArray(t))return n=e.formData||new FormData,r=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";var o,u,a,c,s,l,p,d,f;if(!isFunction(t)&&"[object Function]"!=={}.toString.call(t)){if(a=(u=isObject(t))||isArray(t)||"[object Object]"==={}.toString.call(t),c=[void 0,null,""].includes(t),u&&Object.empty(t))return n.append(i,"{}");if(a||"[object Object]"!=={}.toString.call(t)||(t="",c=!0),isFile(t))return n.append(i,t);if(c||!a)return a&&(t=JSON.stringify(t)),c&&(t=""),void n.append(i,t);for(s in d=[],t)if(f=t[s],!["$promise","$resolved"].includes(s))if(l=""===i?`${s}`:`${i}[${s}]`,isArray(f)&&Object.present(f))d.push(function(){var t,e,n;for(n=[],t=0,e=f.length;t<e;t++)o=f[t],isObject(o)?(p=Object.assign({id:o.id},o),n.push(r(p,`${l}[]`))):n.push(r(o,`${l}[]`));return n}());else{if(isBlank(f)&&e.skipBlankValues)continue;if(isBlank(f)&&e.skipBlankHash&&isObject(f))continue;d.push(r(f,l))}return d}},r(t),n;alert("argumento obj deve ser array ou objeto")},r.g.encapsulateData=function(t){return function(e){var r;return(r={})[t]=e,JSON.stringify(r)}},r.g.encapsulateFormData=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var n;return n={},null!=t?n[t]=r:n=r,formDataFromObject(n,e)}},r.g.bestColorForBg=function(t,e,r){var n,i;try{t=scColor.get(t,{format:"hex"})}catch(t){}return i="#"===t.charAt(0)?t.substring(1,7):t,.2126*(n=[parseInt(i.substring(0,2),16)/255,parseInt(i.substring(2,4),16)/255,parseInt(i.substring(4,6),16)/255].map((t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))))[0]+.7152*n[1]+.0722*n[2]>.179?r:e},r.g.toggleFullScreen=function(t){if(void 0!==document.fullScreenElement&&null===document.fullScreenElement||void 0!==document.msFullscreenElement&&null===document.msFullscreenElement||void 0!==document.mozFullScreen&&!document.mozFullScreen||void 0!==document.webkitIsFullScreen&&!document.webkitIsFullScreen){if(t.requestFullScreen)return t.requestFullScreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();if(t.webkitRequestFullScreen)return t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);if(t.msRequestFullscreen)return t.msRequestFullscreen()}else{if(document.cancelFullScreen)return document.cancelFullScreen();if(document.mozCancelFullScreen)return document.mozCancelFullScreen();if(document.webkitCancelFullScreen)return document.webkitCancelFullScreen();if(document.msExitFullscreen)return document.msExitFullscreen()}},r.g.onElementReady=function(t,e){var r,n;r=function(t,r){var n,i,o,u,a;for(u=[],i=0,o=t.length;i<o;i++)n=t[i],a=$(n.target)[0],isBlank(a)||("function"==typeof e&&e(a),u.push(r.unobserve(a)));return u};try{n=new IntersectionObserver(r)}catch(t){}return(null!=n?n.observe:void 0)?n.observe(t):"function"==typeof e?e(t):void 0},r.g.onScopeApply=function(t){return setTimeout((()=>{var e;return e=getScope("body"),isBlank(e)?"function"==typeof t?t():void 0:e.$apply((()=>"function"==typeof t?t():void 0))}))}},70829:function(t,r,n){"use strict";var i=[].indexOf;n.g.Array.prototype.max=function(){return Math.max.apply(null,this)},n.g.Array.prototype.min=function(){return Math.min.apply(null,this)},n.g.Array.prototype.first=function(){return this[0]},n.g.Array.prototype.last=function(){return this.slice(-1)[0]},n.g.Array.prototype.clone=function(){return this.slice(0)},n.g.Array.prototype.equals=function(t){var e;return e=(t||[]).slice(0).sort(),this.length===e.length&&this.sort().every((function(t,r){var n;return n=e[r],isObject(t)?Object.equals(t,n):isArray(t)?t.equals(n):t===n}))},n.g.Array.prototype.groupBy=function(t){return this.reduce((function(e,r){var n;return isFunction(t)&&(n=t(r)),n||(n=r[t]),(e[n]=e[n]||[]).push(r),e}),{})},n.g.Array.prototype.intersection=function(t){return this.filter((function(e){return-1!==t.indexOf(e)})).unique()},Array.prototype.subtract=function(t){return this.filter((function(e){return t.indexOf(e)<0}))},n.g.Array.prototype.toggle=function(t){var e,r;-1===(r=(e=this).indexOf(t))?e.push(t):e.splice(r,1)},n.g.Array.prototype.inArray=function(t){return i.call(this,t)>=0},n.g.Array.prototype.mapObj=function(t){return this.map((function(e){return e[t]}))},n.g.Array.prototype.contains=function(t){return i.call(this,t)>=0},n.g.Array.prototype.include=function(t){return this.inArray(t)},n.g.Array.prototype.includes=n.g.Array.prototype.include,n.g.Array.prototype.isIncluded=n.g.Array.prototype.include,n.g.Array.prototype.one=function(){return 1===this.length},n.g.Array.prototype.any=function(){return this.length>0},n.g.Array.prototype.many=function(){return this.length>1},n.g.Array.prototype.empty=function(){return!this.any()},n.g.Array.prototype.index=function(t,e){return this.transform(e).indexOf(t)},n.g.Array.prototype.transform=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null!=t?this.map((function(e){return e[t]})):e?this.clone():this},n.g.Array.prototype.sortByField=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return this.slice(0).sort((function(r,n){switch(e){case"asc":return r[t]>n[t]?1:r[t]<n[t]?-1:0;case"desc":return r[t]>n[t]?-1:r[t]<n[t]?1:0}}))},n.g.Array.prototype.indexOfById=function(t){var e,r,n,i;for(n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).key||"id",e=r=0,i=this.length;r<i;e=++r)if(this[e][n]===t)return e;return-1},n.g.Array.prototype.getById=function(t){var e;return t instanceof Array?t.map((t=>this.getById(t))):(e=(null!=t?t.id:void 0)||t,this[this.indexOfById(e)])},n.g.Array.prototype.findById=n.g.Array.prototype.getById,n.g.Array.prototype.move=function(t,e){return this.splice(e,0,this.splice(t,1)[0])},n.g.Array.prototype.remove=function(t){var e;if((e=this.indexOf(t))>-1)return this.splice(e,1)},n.g.Array.prototype.removeByIndex=function(t){if(t>-1)return this.splice(t,1)},n.g.Array.prototype.removeAll=function(t){var e;for(e=[];i.call(this,t)>=0;)e.push(this.remove(t));return e},n.g.Array.prototype.removeById=function(t){var e;return e=(null!=t?t.id:void 0)||t,this.removeByField("id",e)},n.g.Array.prototype.getByField=function(t,e){return this[this.getIndexByField(t,e)]},n.g.Array.prototype.findByKey=n.g.Array.prototype.getByField,n.g.Array.prototype.findByField=n.g.Array.prototype.getByField,n.g.Array.prototype.getIndexByField=function(t,e){var r,n,i,o,u;for(void 0===t&&(t="id"),i=null,n=o=0,u=this.length;o<u;n=++o)(null!=(r=this[n])?r[t]:void 0)===e&&(i=n);return i},n.g.Array.prototype.removeByField=function(t,e){var r,n,i,o,u,a;for(void 0===t&&(t="id"),i=[],n=o=0,u=this.length;o<u;n=++o)(null!=(r=this[n])?r[t]:void 0)===e&&i.push(n);for(a=[];i.length>0;)a.push(this.splice(i.pop(),1)[0]);return a},n.g.Array.prototype.extractFrom=function(t){var e,r,n,i;for(r=t,n=0,i=this.length;n<i;n++)e=this[n],r=null!=r?r[e]:void 0;return r},n.g.Array.prototype.getNextEl=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;var r,n;if(isBlank(t)&&1===e)return this.first();if(isBlank(t)&&-1===e)return this.last();if(r=this.find((function(e){return t===e})),1===e){if(r&&r===this.last())return this.first();n=this[this.indexOf(r)+1]}else{if(r&&r===this.first())return this.last();n=this[this.indexOf(r)-1]}return n},n.g.Array.prototype.replaceIfExist=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.replace=!0,e.onlyExist=!0,this.addOrExtend(t,e)},n.g.Array.prototype.extendIfExist=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.onlyExist=!0,this.addOrExtend(t,e)},n.g.Array.prototype.addOrReplace=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.replace=!0,this.addOrExtend(t,e)},n.g.Array.prototype.addOrExtend=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n;if(n=e.key||"id",-1===(r=null!=t&&t.hasOwnProperty(n)&&null!=t[n]?this.indexOfById(t[n],{key:n}):null!=t&&t.hasOwnProperty("guid")&&null!=t.guid?this.indexOfById(t.guid,{key:"guid"}):this.indexOf(t))){if(e.onlyExist)return;return e.unshift?this.unshift(t):this.push(t)}if(!e.onlyNotExist)return e.replace?this[r]=t:angular.extend(this[r],t)},n.g.Array.prototype.pushOrExtend=function(t){return this.addOrExtend(t)},n.g.Array.prototype.unshiftOrExtend=function(t){return this.addOrExtend(t,{unshift:!0})},n.g.Array.prototype.somar=function(t){return(t?this.map((function(e){return e[t]})):this).reduce((function(t,e){return+t+ +e}))},n.g.Array.prototype.chunk=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;var e,r,n,i,o,u;for(o=this,u=[],(i=t)>0?(e=r=0,n=o.length):e=r=o.length-1;i>0?r<n:r>=0;e=r+=i)o[e],u.push(this.slice(e,e+t));return u},n.g.Array.prototype.compact=function(){return this.filter((function(t){return!!t||0===t}))},n.g.Array.prototype.unique=function(t){var e;return e=[],this.filter((function(r){var n;if(n=null!=t?r[t]:r,i.call(e,n)<0)return e.push(n)}))},n.g.Array.prototype.diff=function(t){var e;return(e=this.map((function(e){if(!t.includes(e))return e}))).removeAll(void 0),e},n.g.Array.prototype.diffByFn=function(t,e){var r;return(r=this.map((function(r){if(e(r,t))return r}))).removeAll(void 0),r},n.g.Array.prototype.diffByField=function(t,e){return this.diffByFn(t,(function(r){return t.indexOfById(r[e],{key:e})<0}))},n.g.Array.prototype.diffById=function(t){return this.diffByField(t,"id")},n.g.Array.prototype.clear=function(){return this.length=0,this},n.g.Array.prototype.sum=function(){return this.length?this.reduce((function(t,e){return+t+ +e})):0},n.g.Array.prototype.find=function(t){return this.select(t)[0]},n.g.Array.prototype.select=function(t){var e,r,n,i;for(i=[],r=0,n=this.length;r<n;r++)t(e=this[r])&&i.push(e);return i},n.g.Array.prototype.selectByField=function(t,e){var r;return r=isArray(e),this.select((function(n){var i;return i=isArray(n[t]),r&&i?e.intersection(n[t]).any():r?e.includes(n[t]):i?n[t].includes(e):n[t]===e}))},n.g.Array.prototype.reject=function(t){var e,r,n,i;for(i=[],r=0,n=this.length;r<n;r++)t(e=this[r])||i.push(e);return i},n.g.Array.prototype.rejectByField=function(t,e){var r;return r=isArray(e),this.select((function(n){var i;return i=isArray(n[t]),r&&i?!e.intersection(n[t]).any():r?!e.includes(n[t]):i?!n[t].includes(e):n[t]!==e}))},Array.prototype.flattenCompact=function(){return this.flatten().compact()},Array.prototype.flatten=function(){return this.reduce((function(t,e){return t.concat(Array.isArray(e)?e.flatten():e)}),[])},n.g.Array.prototype.presence=function(){return this.empty()?null:this},n.g.Array.prototype.toSentence=function(){return this.empty()?"":1===this.length?this.first():[this.slice(0,-1).join(", "),this.last()].join(" e ")},n.g.Array.prototype.occurrencesOf=function(t){var e;return function(){var r,n,i;for(i=[],r=0,n=this.length;r<n;r++)(e=this[r])===t&&i.push(e);return i}.call(this).length},n.g.Array.prototype.forEach||(n.g.Array.prototype.forEach=function(t){var r,n,i,o,u;if("function"!=typeof e)throw new TypeError;for(u=[],n=i=0,o=this.length;i<o;n=++i)r=this[n],u.push(t(r,n,this));return u})}}]);