visorus-erp-core 9.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/bundles/visorus-erp-core.umd.js +2771 -2223
  2. package/bundles/visorus-erp-core.umd.js.map +1 -1
  3. package/bundles/visorus-erp-core.umd.min.js +1 -15
  4. package/bundles/visorus-erp-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.module.js +1 -1
  6. package/esm2015/lib/components/acreedor/select/select-acreedor.component.js +33 -45
  7. package/esm2015/lib/components/acreedor/services/acreedor.service.js +1 -1
  8. package/esm2015/lib/components/acreedor/services/acreedorCuentaContable.js +1 -1
  9. package/esm2015/lib/components/agente/models/Agente.js +1 -1
  10. package/esm2015/lib/components/agente/services/agente.service.js +1 -1
  11. package/esm2015/lib/components/almacen/models/Almacen.js +1 -1
  12. package/esm2015/lib/components/almacen/services/almacen.service.js +1 -1
  13. package/esm2015/lib/components/banco/models/Banco.js +1 -1
  14. package/esm2015/lib/components/banco/services/banco.service.js +1 -1
  15. package/esm2015/lib/components/caja/session-create/session-create.component.js +61 -68
  16. package/esm2015/lib/components/caja/sessionCaja.service.js +1 -1
  17. package/esm2015/lib/components/catalogoTipo/models/CatalogoTipo.js +1 -1
  18. package/esm2015/lib/components/catalogoTipo/services/catalogoTipo.service.js +1 -1
  19. package/esm2015/lib/components/clasificadorTipo/models/ClasificadorTipo.js +1 -1
  20. package/esm2015/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +1 -1
  21. package/esm2015/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +1 -1
  22. package/esm2015/lib/components/claveMovimiento/models/ClaveMovimiento.js +1 -1
  23. package/esm2015/lib/components/claveMovimiento/services/claveMovimiento.service.js +1 -1
  24. package/esm2015/lib/components/cliente/models/Cliente.js +1 -1
  25. package/esm2015/lib/components/cliente/models/ClienteCuentaBanco.js +1 -1
  26. package/esm2015/lib/components/cliente/models/ClienteFlete.js +1 -1
  27. package/esm2015/lib/components/cliente/select/select-cliente.component.js +31 -40
  28. package/esm2015/lib/components/cliente/services/cliente.service.js +1 -1
  29. package/esm2015/lib/components/cliente/services/clienteCuentaBanco.service.js +1 -1
  30. package/esm2015/lib/components/cliente/services/clienteFlete.service.js +1 -1
  31. package/esm2015/lib/components/contacto/models/DatoContacto.js +1 -1
  32. package/esm2015/lib/components/contacto/services/datoContacto.service.js +1 -1
  33. package/esm2015/lib/components/dato-direccion/models/DatoDireccion.js +1 -1
  34. package/esm2015/lib/components/dato-direccion/services/datoDireccion.service.js +1 -1
  35. package/esm2015/lib/components/departamento/models/Departamento.js +1 -1
  36. package/esm2015/lib/components/departamento/services/departamento.service.js +1 -1
  37. package/esm2015/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js +1 -1
  38. package/esm2015/lib/components/empresa/models/Empresa.js +1 -1
  39. package/esm2015/lib/components/empresa/services/empresa.service.js +1 -1
  40. package/esm2015/lib/components/error404/error404.component.js +1 -1
  41. package/esm2015/lib/components/flete/models/Flete.js +1 -1
  42. package/esm2015/lib/components/flete/services/flete.service.js +1 -1
  43. package/esm2015/lib/components/formaPago/models/FormaPago.js +1 -1
  44. package/esm2015/lib/components/formaPago/services/FormaPago.service.js +1 -1
  45. package/esm2015/lib/components/loading/loading.component.js +2 -2
  46. package/esm2015/lib/components/loading/loading.service.js +1 -1
  47. package/esm2015/lib/components/loading-screen/loading-screen.component.js +2 -2
  48. package/esm2015/lib/components/loading-screen/loading-screen.service.js +1 -1
  49. package/esm2015/lib/components/login-modal/login-modal.component.js +1 -1
  50. package/esm2015/lib/components/login-modal/login-modal.service.js +1 -1
  51. package/esm2015/lib/components/moneda/models/Moneda.js +1 -1
  52. package/esm2015/lib/components/moneda/services/moneda.service.js +1 -1
  53. package/esm2015/lib/components/pdfModal/pdf-modal.component.js +1 -1
  54. package/esm2015/lib/components/pdfModal/pdf-modal.service.js +1 -1
  55. package/esm2015/lib/components/persona-fisica/models/EstadoCivil.js +1 -1
  56. package/esm2015/lib/components/persona-fisica/models/Genero.js +1 -1
  57. package/esm2015/lib/components/persona-fisica/models/Persona.js +1 -1
  58. package/esm2015/lib/components/persona-fisica/models/PersonaFisica.js +1 -1
  59. package/esm2015/lib/components/persona-fisica/services/personaFisica.service.js +1 -1
  60. package/esm2015/lib/components/proveedor/models/Proveedor.js +1 -1
  61. package/esm2015/lib/components/proveedor/models/ProveedorCuentaBanco.js +1 -1
  62. package/esm2015/lib/components/proveedor/models/ProveedorFlete.js +1 -1
  63. package/esm2015/lib/components/proveedor/select/select-proveedor.component.js +25 -37
  64. package/esm2015/lib/components/proveedor/services/proveedor.service.js +1 -1
  65. package/esm2015/lib/components/proveedor/services/proveedorCuentaBanco.service.js +1 -1
  66. package/esm2015/lib/components/proveedor/services/proveedorFlete.service.js +1 -1
  67. package/esm2015/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +18 -20
  68. package/esm2015/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +1 -1
  69. package/esm2015/lib/components/selecciona-articulo/selecciona-articulo.component.js +140 -145
  70. package/esm2015/lib/components/selecciona-articulo/stock.service.js +1 -1
  71. package/esm2015/lib/components/serieDocumento/models/SerieDocumento.js +1 -1
  72. package/esm2015/lib/components/serieDocumento/services/serieDocumento.service.js +1 -1
  73. package/esm2015/lib/components/tipo-contacto/models/TipoContacto.js +1 -1
  74. package/esm2015/lib/components/tipo-contacto/services/tipoContacto.service.js +1 -1
  75. package/esm2015/lib/components/ubicacion/models/Ubicacion.js +1 -1
  76. package/esm2015/lib/components/ubicacion/services/ubicacion.service.js +1 -1
  77. package/esm2015/lib/contabilidad/componentes/cclista/cclista.component.js +30 -37
  78. package/esm2015/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js +1 -1
  79. package/esm2015/lib/contabilidad/modelos/cuentaContable.model.js +1 -1
  80. package/esm2015/lib/contabilidad/modelos/normaInfoFinanciera.model.js +1 -1
  81. package/esm2015/lib/contabilidad/servicios/cuentacontable.service.js +1 -1
  82. package/esm2015/lib/globalPrimeNg.js +1 -1
  83. package/esm2015/lib/httpInterceptor/httpInterceptor.js +1 -1
  84. package/esm2015/lib/importComponents.js +1 -1
  85. package/esm2015/lib/importComponetsConta.js +1 -1
  86. package/esm2015/lib/models/PersonaMoral.js +1 -1
  87. package/esm2015/lib/models/Usuario.js +1 -1
  88. package/esm2015/lib/models/auth.js +1 -1
  89. package/esm2015/lib/services/auth.service.js +1 -1
  90. package/esm2015/lib/services/authenticated.service.js +1 -1
  91. package/esm2015/lib/services/canActivateGuard.service.ts.js +1 -1
  92. package/esm2015/lib/services/catalogo-adicional.service.js +1 -1
  93. package/esm2015/lib/services/controlAcceso.service.js +1 -1
  94. package/esm2015/lib/services/crud.service.js +1 -1
  95. package/esm2015/lib/services/file.service.js +1 -1
  96. package/esm2015/lib/services/global.service.js +1 -1
  97. package/esm2015/lib/services/init.service.js +1 -1
  98. package/esm2015/lib/services/message.service.js +1 -1
  99. package/esm2015/lib/services/paginate.service.js +1 -1
  100. package/esm2015/lib/services/personaMoral.service.js +1 -1
  101. package/esm2015/lib/services/versionCheck.service.js +1 -1
  102. package/esm2015/lib/utils/tipo_catalogo.ts.js +1 -1
  103. package/esm2015/public_api.js +1 -1
  104. package/esm2015/visorus-erp-core.js +1 -1
  105. package/fesm2015/visorus-erp-core.js +308 -371
  106. package/fesm2015/visorus-erp-core.js.map +1 -1
  107. package/package.json +12 -13
  108. package/esm5/lib/app.module.js +0 -117
  109. package/esm5/lib/components/acreedor/select/select-acreedor.component.js +0 -232
  110. package/esm5/lib/components/acreedor/services/acreedor.service.js +0 -25
  111. package/esm5/lib/components/acreedor/services/acreedorCuentaContable.js +0 -29
  112. package/esm5/lib/components/agente/models/Agente.js +0 -10
  113. package/esm5/lib/components/agente/services/agente.service.js +0 -37
  114. package/esm5/lib/components/almacen/models/Almacen.js +0 -7
  115. package/esm5/lib/components/almacen/services/almacen.service.js +0 -29
  116. package/esm5/lib/components/banco/models/Banco.js +0 -9
  117. package/esm5/lib/components/banco/services/banco.service.js +0 -23
  118. package/esm5/lib/components/caja/session-create/session-create.component.js +0 -223
  119. package/esm5/lib/components/caja/sessionCaja.service.js +0 -25
  120. package/esm5/lib/components/catalogoTipo/models/CatalogoTipo.js +0 -7
  121. package/esm5/lib/components/catalogoTipo/services/catalogoTipo.service.js +0 -23
  122. package/esm5/lib/components/clasificadorTipo/models/ClasificadorTipo.js +0 -7
  123. package/esm5/lib/components/clasificadorTipo/services/clasificadorTipo.service.js +0 -23
  124. package/esm5/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js +0 -23
  125. package/esm5/lib/components/claveMovimiento/models/ClaveMovimiento.js +0 -7
  126. package/esm5/lib/components/claveMovimiento/services/claveMovimiento.service.js +0 -23
  127. package/esm5/lib/components/cliente/models/Cliente.js +0 -14
  128. package/esm5/lib/components/cliente/models/ClienteCuentaBanco.js +0 -10
  129. package/esm5/lib/components/cliente/models/ClienteFlete.js +0 -12
  130. package/esm5/lib/components/cliente/select/select-cliente.component.js +0 -240
  131. package/esm5/lib/components/cliente/services/cliente.service.js +0 -26
  132. package/esm5/lib/components/cliente/services/clienteCuentaBanco.service.js +0 -29
  133. package/esm5/lib/components/cliente/services/clienteFlete.service.js +0 -29
  134. package/esm5/lib/components/contacto/models/DatoContacto.js +0 -9
  135. package/esm5/lib/components/contacto/services/datoContacto.service.js +0 -23
  136. package/esm5/lib/components/dato-direccion/models/DatoDireccion.js +0 -7
  137. package/esm5/lib/components/dato-direccion/services/datoDireccion.service.js +0 -23
  138. package/esm5/lib/components/departamento/models/Departamento.js +0 -7
  139. package/esm5/lib/components/departamento/services/departamento.service.js +0 -23
  140. package/esm5/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js +0 -9
  141. package/esm5/lib/components/empresa/models/Empresa.js +0 -13
  142. package/esm5/lib/components/empresa/services/empresa.service.js +0 -29
  143. package/esm5/lib/components/error404/error404.component.js +0 -38
  144. package/esm5/lib/components/flete/models/Flete.js +0 -7
  145. package/esm5/lib/components/flete/services/flete.service.js +0 -25
  146. package/esm5/lib/components/formaPago/models/FormaPago.js +0 -7
  147. package/esm5/lib/components/formaPago/services/FormaPago.service.js +0 -23
  148. package/esm5/lib/components/loading/loading.component.js +0 -69
  149. package/esm5/lib/components/loading/loading.service.js +0 -32
  150. package/esm5/lib/components/loading-screen/loading-screen.component.js +0 -62
  151. package/esm5/lib/components/loading-screen/loading-screen.service.js +0 -37
  152. package/esm5/lib/components/login-modal/login-modal.component.js +0 -184
  153. package/esm5/lib/components/login-modal/login-modal.service.js +0 -23
  154. package/esm5/lib/components/moneda/models/Moneda.js +0 -7
  155. package/esm5/lib/components/moneda/services/moneda.service.js +0 -25
  156. package/esm5/lib/components/pdfModal/pdf-modal.component.js +0 -85
  157. package/esm5/lib/components/pdfModal/pdf-modal.service.js +0 -31
  158. package/esm5/lib/components/persona-fisica/models/EstadoCivil.js +0 -7
  159. package/esm5/lib/components/persona-fisica/models/Genero.js +0 -7
  160. package/esm5/lib/components/persona-fisica/models/Persona.js +0 -9
  161. package/esm5/lib/components/persona-fisica/models/PersonaFisica.js +0 -11
  162. package/esm5/lib/components/persona-fisica/services/personaFisica.service.js +0 -31
  163. package/esm5/lib/components/proveedor/models/Proveedor.js +0 -14
  164. package/esm5/lib/components/proveedor/models/ProveedorCuentaBanco.js +0 -10
  165. package/esm5/lib/components/proveedor/models/ProveedorFlete.js +0 -12
  166. package/esm5/lib/components/proveedor/select/select-proveedor.component.js +0 -163
  167. package/esm5/lib/components/proveedor/services/proveedor.service.js +0 -25
  168. package/esm5/lib/components/proveedor/services/proveedorCuentaBanco.service.js +0 -29
  169. package/esm5/lib/components/proveedor/services/proveedorFlete.service.js +0 -29
  170. package/esm5/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +0 -159
  171. package/esm5/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js +0 -29
  172. package/esm5/lib/components/selecciona-articulo/selecciona-articulo.component.js +0 -531
  173. package/esm5/lib/components/selecciona-articulo/stock.service.js +0 -37
  174. package/esm5/lib/components/serieDocumento/models/SerieDocumento.js +0 -7
  175. package/esm5/lib/components/serieDocumento/services/serieDocumento.service.js +0 -31
  176. package/esm5/lib/components/tipo-contacto/models/TipoContacto.js +0 -8
  177. package/esm5/lib/components/tipo-contacto/services/tipoContacto.service.js +0 -23
  178. package/esm5/lib/components/ubicacion/models/Ubicacion.js +0 -7
  179. package/esm5/lib/components/ubicacion/services/ubicacion.service.js +0 -23
  180. package/esm5/lib/contabilidad/componentes/cclista/cclista.component.js +0 -329
  181. package/esm5/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js +0 -72
  182. package/esm5/lib/contabilidad/modelos/cuentaContable.model.js +0 -8
  183. package/esm5/lib/contabilidad/modelos/normaInfoFinanciera.model.js +0 -8
  184. package/esm5/lib/contabilidad/servicios/cuentacontable.service.js +0 -28
  185. package/esm5/lib/globalPrimeNg.js +0 -66
  186. package/esm5/lib/httpInterceptor/httpInterceptor.js +0 -94
  187. package/esm5/lib/importComponents.js +0 -24
  188. package/esm5/lib/importComponetsConta.js +0 -7
  189. package/esm5/lib/models/PersonaMoral.js +0 -11
  190. package/esm5/lib/models/Usuario.js +0 -7
  191. package/esm5/lib/models/auth.js +0 -7
  192. package/esm5/lib/services/auth.service.js +0 -209
  193. package/esm5/lib/services/authenticated.service.js +0 -80
  194. package/esm5/lib/services/canActivateGuard.service.ts.js +0 -28
  195. package/esm5/lib/services/catalogo-adicional.service.js +0 -25
  196. package/esm5/lib/services/controlAcceso.service.js +0 -50
  197. package/esm5/lib/services/crud.service.js +0 -51
  198. package/esm5/lib/services/file.service.js +0 -72
  199. package/esm5/lib/services/global.service.js +0 -56
  200. package/esm5/lib/services/init.service.js +0 -54
  201. package/esm5/lib/services/message.service.js +0 -82
  202. package/esm5/lib/services/paginate.service.js +0 -60
  203. package/esm5/lib/services/personaMoral.service.js +0 -23
  204. package/esm5/lib/services/versionCheck.service.js +0 -56
  205. package/esm5/lib/utils/tipo_catalogo.ts.js +0 -9
  206. package/esm5/public_api.js +0 -96
  207. package/esm5/visorus-erp-core.js +0 -5
  208. package/fesm5/visorus-erp-core.js +0 -4203
  209. package/fesm5/visorus-erp-core.js.map +0 -1
@@ -1,16 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("@angular/forms"),require("primeng/inputtext"),require("primeng/treetable"),require("primeng/api"),require("@angular/common"),require("primeng/button"),require("primeng/dialog"),require("rxjs"),require("rxjs/internal/operators"),require("ngx-toastr"),require("@ngx-translate/core"),require("rxjs/operators"),require("@angular/platform-browser"),require("primeng/table"),require("primeng/paginator"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/messages"),require("primeng/message"),require("primeng/confirmdialog"),require("primeng/progressbar"),require("primeng/tristatecheckbox"),require("primeng/keyfilter"),require("primeng/inputswitch"),require("primeng/tabview"),require("primeng/calendar"),require("primeng/panel"),require("primeng/autocomplete"),require("primeng/fieldset"),require("primeng/checkbox"),require("primeng/tree"),require("primeng/radiobutton"),require("primeng/tabmenu"),require("primeng/overlaypanel"),require("primeng/tooltip"),require("primeng/card"),require("primeng/menubar"),require("primeng/splitbutton"),require("primeng/toolbar"),require("@ngx-translate/http-loader"),require("@angular/router")):"function"==typeof define&&define.amd?define("visorus-erp-core",["exports","@angular/core","@angular/common/http","@angular/forms","primeng/inputtext","primeng/treetable","primeng/api","@angular/common","primeng/button","primeng/dialog","rxjs","rxjs/internal/operators","ngx-toastr","@ngx-translate/core","rxjs/operators","@angular/platform-browser","primeng/table","primeng/paginator","primeng/dropdown","primeng/inputmask","primeng/messages","primeng/message","primeng/confirmdialog","primeng/progressbar","primeng/tristatecheckbox","primeng/keyfilter","primeng/inputswitch","primeng/tabview","primeng/calendar","primeng/panel","primeng/autocomplete","primeng/fieldset","primeng/checkbox","primeng/tree","primeng/radiobutton","primeng/tabmenu","primeng/overlaypanel","primeng/tooltip","primeng/card","primeng/menubar","primeng/splitbutton","primeng/toolbar","@ngx-translate/http-loader","@angular/router"],t):t((e=e||self)["visorus-erp-core"]={},e.ng.core,e.ng.common.http,e.ng.forms,e.inputtext,e.treetable,e.api,e.ng.common,e.button,e.dialog,e.rxjs,e.rxjs["internal/operators"],e.ngxToastr,e.core$1,e.rxjs.operators,e.ng.platformBrowser,e.table,e.paginator,e.dropdown,e.inputmask,e.messages,e.message,e.confirmdialog,e.progressbar,e.tristatecheckbox,e.keyfilter,e.inputswitch,e.tabview,e.calendar,e.panel,e.autocomplete,e.fieldset,e.checkbox,e.tree,e.radiobutton,e.tabmenu,e.overlaypanel,e.tooltip,e.card,e.menubar,e.splitbutton,e.toolbar,e.httpLoader,e.ng.router)}(this,(function(e,t,n,o,r,i,a,l,s,c,u,p,d,m,f,h,g,v,b,S,y,x,C,w,E,I,M,A,k,j,P,_,O,T,D,H,F,B,U,z,q,R,L,N){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function J(e,t){function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Z(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))}function W(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function G(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var Y=function(){function e(e){this.http=e}return e.prototype.setConfiguracion=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))}))},e.prototype.obtieneConfiguracion=function(){return JSON.parse(localStorage.getItem("config"))},e.prototype.getUrl=function(e){return this.obtieneConfiguracion().url+(e?"/"+e:"")},e.prototype.auth=function(e){return this.http.post(this.getUrl()+"/login",e)},e.prototype.getUsuarioActual=function(){return this.http.get(this.getUrl()+"/usuario/obtieneUsuarioActual",this.buildAuth())},e.prototype.buildAuth=function(){var e=this.getUsuario();return{headers:new n.HttpHeaders({Authorization:e.token_type+" "+e.access_token,"Content-Type":"application/json",Accept:"application/json"})}},e.prototype.validateEndPoint=function(){return this.http.get(this.getUrl()+"/validate",this.buildAuth())},e.prototype.closeEndPoint=function(){localStorage.removeItem("usuario"),this.setUsuarioInstance(null)},e.prototype.getUsuario=function(){return JSON.parse(localStorage.getItem("usuario"))},e.prototype.setUsuarioInstance=function(e){this.usuarioInstance=e},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.setModulo=function(e){return this.http.post(this.getUrl()+"/usuario/setModulo",e,this.buildAuth())},e}(),K=function(e){function t(t,n){var o=e.call(this,t)||this;return o.httpCliente=t,o.url=n,o.urlComponente=o.url,o}return J(t,e),t.prototype.serializeParams=function(e){var t="";return e.map((function(e,n){void 0!==e.value&&(t+=(0==n?"?":"&")+e.param+"="+e.value)})),t},t.prototype.getHttp=function(){return this.httpCliente},t.prototype.geturl=function(){return this.getUrl(this.urlComponente)},t.prototype.getBaseUrl=function(){return this.getUrl("")},t.prototype.getByUrl=function(e,t){return this.httpCliente.get(this.getUrl(e)+this.serializeParams(t),this.buildAuth())},t.prototype.getAll=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+(e?this.serializeParams(e):""),this.buildAuth())},t.prototype.get=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t.prototype.save=function(e){return this.httpCliente.post(this.getUrl(this.urlComponente),e,this.buildAuth())},t.prototype.update=function(e){return this.httpCliente.put(this.getUrl(this.urlComponente)+"/"+e.id,e,this.buildAuth())},t.prototype.delete=function(e){return this.httpCliente.delete(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t}(Y),Q=function(e){function o(t){var n=e.call(this,t,"cuentaContable")||this;return n.httpClient=t,n}return J(o,e),o.prototype.obtieneCuentasContablesRecursivo=function(){return this.httpClient.get(this.getUrl("cuentaContable")+"/obtieneCuentasContablesRecursivo",this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K);function X(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",8),t.ɵɵtext(2,"Cuenta contable"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",8),t.ɵɵtext(4,"Descripción"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",9),t.ɵɵtext(6,"Naturaleza"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th",10),t.ɵɵtext(8,"Tipo"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"th",11),t.ɵɵtext(10,"Acciones"),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function ee(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",19),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function te(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",19),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function ne(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",12),t.ɵɵelement(2,"p-treeTableToggler",13),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"td",12),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"td",14),t.ɵɵtext(7),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td",15),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td",16),t.ɵɵelementStart(11,"div",17),t.ɵɵtemplate(12,ee,1,0,"button",18),t.ɵɵtemplate(13,te,1,0,"button",18),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit,r=n.rowData,i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("rowNode",o),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",r.cuentaContable," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.descripcion," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.naturaleza," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.tipo," "),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",1==i.typeAccount&&r.cuentaRegistro),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",2==i.typeAccount&&!r.cuentaRegistro)}}var oe=function(){return{width:"100%"}},re=function(){function e(e){this._cuentaContableService=e,this.cuentasContables=[],this.maxH=720,this.query="",this.tempAccounts=[],this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.maxH=window.innerHeight-320,this.obtenerCuentasContablesRecursivo()},e.prototype.obtenerCuentasContablesRecursivo=function(){var e=this;this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe((function(t){t&&(e.cuentasContables=t,e.sortAccounts())}))},e.prototype.sortAccounts=function(){var e,t;this.cuentasContables.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var n=G(this.cuentasContables),o=n.next();!o.done;o=n.next()){var r=o.value;r.children&&this.sortItem(r)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.tempAccounts=this.cuentasContables},e.prototype.sortItem=function(e){var t,n;e.children.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var o=G(e.children),r=o.next();!r.done;r=o.next()){var i=r.value;this.sortItem(i)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.selectCuentaContable=function(e){this.evSelectedAccount.emit(e)},e.prototype.filterAccounts=function(e){if(e)this.cuentasContables=this.browseAccount(this.tempAccounts);else{var t=this.resetAccount();this.cuentasContables=t}},e.prototype.resetAccount=function(){var e,t;this.query="";var n=[];try{for(var o=G(this.tempAccounts),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e.prototype.browseAccount=function(e){var t,n,o=[];if(""!==this.query){try{for(var r=G(e),i=r.next();!i.done;i=r.next()){var a=i.value;o=a.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase())||a.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())?o.concat({data:a.data,children:this.browseAccount(a.children)}):o.concat(this.browseAccount(a.children))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o}var l=this.resetAccount();this.cuentasContables=l},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Q))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["lib-cclista"]],inputs:{isShared:"isShared",typeAccount:"typeAccount"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:8,vars:8,consts:[[1,"ui-g","ui-fluid"],[1,"ui-g-12"],[1,"ui-inputgroup"],["type","text","pInputText","","placeholder","Cuenta o descripción",3,"ngModel","ngModelChange","keyup"],[2,"padding","10px"],[3,"value","scrollable","scrollHeight","resizableColumns"],["pTemplate","header"],["pTemplate","body","style","width: 100%;"],[2,"width","150px"],[2,"width","90px"],[2,"width","60px"],[2,"width","200px"],[1,"ui-resizable-column",2,"width","150px"],[3,"rowNode"],[1,"ui-resizable-column",2,"width","90px"],[1,"ui-resizable-column",2,"width","60px"],[1,"ui-resizable-column",2,"width","200px"],[1,"button-row"],["pButton","","type","button","icon","pi pi-check","class","ui-button-raised ui-button-success",3,"click",4,"ngIf"],["pButton","","type","button","icon","pi pi-check",1,"ui-button-raised","ui-button-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"input",3),t.ɵɵlistener("ngModelChange",(function(e){return n.query=e}))("keyup",(function(e){return n.filterAccounts(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",4),t.ɵɵelementStart(5,"p-treeTable",5),t.ɵɵtemplate(6,X,11,0,"ng-template",6),t.ɵɵtemplate(7,ne,14,7,"ng-template",7),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(3),t.ɵɵproperty("ngModel",n.query),t.ɵɵadvance(2),t.ɵɵstyleMap(t.ɵɵpureFunction0(7,oe)),t.ɵɵproperty("value",n.cuentasContables?n.cuentasContables:n.tempAccounts)("scrollable",!0)("scrollHeight",n.maxH+"px")("resizableColumns",!0))},directives:[o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,i.TreeTable,a.PrimeTemplate,i.TreeTableToggler,l.NgIf,s.ButtonDirective],styles:[""]}),e}(),ie=["dialog"],ae=function(e){return{width:e,"min-width":"200px"}},le=function(e){return{height:e}},se=function(){function e(){this.cuentasContables=[],this.maxH=720,this.maxW=0,this.flagModal=!0,this.size=350,this.maxH=window.innerHeight-370,this.maxW=window.innerWidth,this.size=this.maxW-50,this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.getAccount=function(e){this.evSelectedAccount.emit(e)},e.prototype.hiddenDialog=function(e){this.evSelectedAccount.emit(null)},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["lib-ccseleccion-dialog"]],viewQuery:function(e,n){var o;(1&e&&t.ɵɵstaticViewQuery(ie,!0),2&e)&&(t.ɵɵqueryRefresh(o=t.ɵɵloadQuery())&&(n.dialog=o.first))},inputs:{tipoCuenta:"tipoCuenta",displayShowCuentas:"displayShowCuentas"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:3,vars:17,consts:[["header","Selecciona cuenta contable",3,"visible","modal","minY","baseZIndex","blockScroll","draggable","maximizable","visibleChange","onHide"],[1,"padding10",3,"ngStyle"],[3,"isShared","typeAccount","evSelectedAccount"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.displayShowCuentas=e}))("onHide",(function(e){return n.hiddenDialog(e)})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"lib-cclista",2),t.ɵɵlistener("evSelectedAccount",(function(e){return n.getAccount(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(13,ae,n.size+"px")),t.ɵɵproperty("visible",n.displayShowCuentas)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("draggable",!1)("blockScroll",!0)("maximizable",!0),t.ɵɵadvance(1),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(15,le,n.maxH+200+"px")),t.ɵɵadvance(1),t.ɵɵproperty("isShared",!0)("typeAccount",n.tipoCuenta))},directives:[c.Dialog,l.NgStyle,re],styles:[""]}),e}(),ce=function(){function e(){this.modal=new t.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),ue=function(){function e(){this._loading=!1,this.loadingStatus=new u.Subject}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingStatus.next(e)},enumerable:!0,configurable:!0}),e.prototype.startLoading=function(){this.loading=!0},e.prototype.stopLoading=function(){this.loading=!1},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),pe=function(){function e(e,t,n){this.loginModalService=e,this.toastrService=t,this.loadingScreenService=n}return e.prototype.intercept=function(e,t){var n=this;return this.loadingScreenService.startLoading(),t.handle(e).pipe(p.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),u.throwError(e)})),p.tap((function(e){var t=e.body?e.body:null;if(0!==e.type&&4===e.type&&n.loadingScreenService.stopLoading(),t){var o=t.success?t.success:null;o&&n.toastrService.success(o,"Exito",{timeOut:3e3,closeButton:!0})}})))},e.prototype.handleError=function(e){return 401===e.status||403===e.status?(401===e.status&&this.loginModalService.showModal(),403===e.status&&this.toastrService.error("No tiene permiso sobre esta accion","Error",{timeOut:5e3}),u.of(e.message)):(401!==e.status&&403!==e.status&&409!==e.status&&this.toastrService.error("Ocurrio un error al procesar su solicitud","Error",{timeOut:5e3}),this.readError(e),u.of(e))},e.prototype.readError=function(e){if(e.error&&(e.error.error&&e.error.error.message&&this.toastrService.error(e.error.error.message,"Error",{timeOut:3e3}),e.error.message&&this.toastrService.error(e.error.message,"Error",{timeOut:3e3}),e.error._errors&&Array.isArray(e.error._errors)))for(var t=0;t<e.error._errors.length;t++)this.toastrService.error(e.error._errors[t].message,"Error",{timeOut:3e3,closeButton:!0})},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(ce),t.ɵɵinject(d.ToastrService),t.ɵɵinject(ue))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}(),de=function(){function e(){}return e.prototype.ngOnInit=function(){},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-error404"]],decls:9,vars:0,consts:[[1,"col-md-12","sec_sof"],[1,"row"],[1,"col","col-center"],[1,"center"],[1,"error"],[1,"col-12"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵtext(5," Error 404 "),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"p"),t.ɵɵtext(8,"La pagina solicitada no fue encontrada"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".error[_ngcontent-%COMP%]{font-size:70px}"]}),e}(),me=function(){function e(){this.loading=new t.EventEmitter}return e.prototype.setLoading=function(e){e?this.start():this.stop()},e.prototype.start=function(){this.loading.emit(!0)},e.prototype.stop=function(){this.loading.emit(!1)},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),fe=function(){function e(e){var t=this;this.loadingService=e,this.visible=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){e&&!t.visible?($("#modal_loading").modal("show"),t.visible=!0):(setTimeout((function(){$("#modal_loading").modal("hide")}),650),t.visible=!1)}))}return e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(me))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["loading"]],inputs:{logo_loading:"logo_loading"},decls:14,vars:4,consts:[["id","modal_loading","tabindex","-1","role","dialog","aria-labelledby","exampleModalScrollableTitle","data-backdrop","static","data-keyboard","false","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],[1,"col-lg-4","col-md-4","col-sm-10"],[1,"loader"],[1,"box"],[1,"code"],["width","200px",3,"src"],[1,"txt"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelementStart(5,"div",5),t.ɵɵelementStart(6,"div",6),t.ɵɵelement(7,"span",7),t.ɵɵelement(8,"span",7),t.ɵɵelementStart(9,"div",8),t.ɵɵelement(10,"img",9),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"span",10),t.ɵɵtext(12),t.ɵɵpipe(13,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(10),t.ɵɵpropertyInterpolate("src",n.logo_loading,t.ɵɵsanitizeUrl),t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(13,2,"cargando"),"..."))},pipes:[m.TranslatePipe],styles:['.loader[_ngcontent-%COMP%]{width:130px;height:170px;position:relative}.loader[_ngcontent-%COMP%]::after, .loader[_ngcontent-%COMP%]::before{content:"";width:0;height:0;position:absolute;bottom:30px;left:15px;z-index:1;transform:scale(0);transition:.2s}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{width:120%;text-align:center;position:absolute;bottom:-30px;left:-7%;font-family:Abel,sans-serif;font-size:12px;letter-spacing:2px;color:#fff}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{position:absolute;z-index:99;bottom:-3px;-webkit-animation-name:spaceboots;-webkit-animation-duration:.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{width:100%;height:140px;display:block;color:#fff;position:absolute;left:28px;z-index:2;overflow:hidden}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]::after, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]::before{display:inline-block;font:14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:0;left:0;opacity:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1)::before{font-size:20px;content:"\\f13b";animation:1.1s linear infinite a}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1)::after{content:"\\f13c";animation:1.3s linear infinite b}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2)::before{content:"\\f121";font-size:25px;animation:.9s linear infinite c}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2)::after{content:"\\f19a ";animation:.7s linear infinite d}.loader.amit[_ngcontent-%COMP%]::after, .loader.amit[_ngcontent-%COMP%]::before{transform:scale(1)}@keyframes a{0%{transform:translate(30px,0) rotate(30deg);opacity:0}100%{transform:translate(30px,150px) rotate(-50deg);opacity:1}}@keyframes b{0%{transform:translate(50px,0) rotate(-40deg);opacity:0}100%{transform:translate(40px,150px) rotate(80deg);opacity:1}}@keyframes c{0%{transform:translate(70px,0) rotate(10deg);opacity:0}100%{transform:translate(60px,150px) rotate(70deg);opacity:1}}@keyframes d{0%{transform:translate(30px,0) rotate(-50deg);opacity:0}100%{transform:translate(45px,150px) rotate(30deg);opacity:1}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{border:0!important;background-color:#fff0!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}']}),e}(),he=function(){function e(e,t,n,o){var r=this;this.loadingScreenService=e,this._elmRef=t,this._changeDetectorRef=n,this.loadingService=o,this.debounceTime=250,this.loading=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){r._elmRef.nativeElement.style.display=e?"block":"none"}))}return e.prototype.ngAfterViewInit=function(){var e=this;this._elmRef.nativeElement.style.display="none",this.loadingSubscription=this.loadingScreenService.loadingStatus.pipe(f.debounceTime(this.debounceTime)).subscribe((function(t){e._elmRef.nativeElement.style.display=t?"block":"none",e._changeDetectorRef.detectChanges()}))},e.prototype.ngOnDestroy=function(){this.loadingSubscription.unsubscribe()},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(ue),t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(me))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-loading-screen"]],inputs:{logo_loading:"logo_loading"},decls:10,vars:0,consts:[[1,"loading-screen-wrapper"],[1,"loading-screen-icon"],[1,"blobs"],[1,"blob-center"],[1,"blob"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelement(3,"div",3),t.ɵɵelement(4,"div",4),t.ɵɵelement(5,"div",4),t.ɵɵelement(6,"div",4),t.ɵɵelement(7,"div",4),t.ɵɵelement(8,"div",4),t.ɵɵelement(9,"div",4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".loading-screen-wrapper[_ngcontent-%COMP%]{z-index:100000;position:fixed;background-color:rgba(0,0,0,.384);width:100%;height:100%;display:block}.loading-screen-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{filter:url(#goo);width:300px;height:300px;position:relative;overflow:hidden;border-radius:70px;transform-style:preserve-3d}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{transform-style:preserve-3d;position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;transform-origin:left top;transform:scale(.9) translate(-50%,-50%);animation:3.4s linear infinite blob-grow;border-radius:50%;box-shadow:0 -10px 40px -5px #475158}.blob[_ngcontent-%COMP%]{position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;border-radius:50%;animation:3.4s ease-out infinite blobs;transform:scale(.9) translate(-50%,-50%);transform-origin:center top;opacity:0}.blob[_ngcontent-%COMP%]:nth-child(1){animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%,99%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}100%{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,100%,39%,92%{transform:scale(0) translate(-50%,-50%)}40%,42%,90%,91%{transform:scale(1,.9) translate(-50%,-50%)}43%,44%,86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%,84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%,82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%,80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}}"]}),e}(),ge=function(){function e(){this.visible=new t.EventEmitter,this.print=new t.EventEmitter}return e.prototype.pdf_generate=function(e){this.base_64=e,this.visible.emit(!0)},e.prototype.generate_print=function(e){this.html=e,this.print.emit(!0)},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),ve=function(){function e(e,t){this._toastrService=e,this.translate=t}return e.prototype.addFile=function(e,t){var n=this;void 0===t&&(t=!0);var o=e.target.files[0],r={id:null,nombre:"",contentType:"",orden:0,archivo:""};r.nombre=o.name,r.tipo=o.type;var i=new FileReader;return i.readAsDataURL(o),i.onload=function(){r.archivo=i.result,n.translate.get(["msgSuccess","titleFile"]).subscribe((function(e){t&&n._toastrService.success(e.msgSuccess,e.titleFile)}))},i.onerror=function(e){n.translate.get(["msgError","titleFile"]).subscribe((function(e){t&&n._toastrService.error(e.msgError,e.titleFile)}))},r},e.prototype.base64ToBlob=function(e,t){for(var n=atob(e),o=new Array(n.length),r=0;r<n.length;r++)o[r]=n.charCodeAt(r);var i=new Uint8Array(o);return new Blob([i],{type:t})},e.prototype.blobToDowload=function(e,t,n){var o=document.createElement("a");o.download=n,o.href=window.URL.createObjectURL(e),o.dataset.downloadurl=[t,o.download,o.href].join(":"),o.click()},e.prototype.base64ToFileDowload=function(e,t,n){this.blobToDowload(this.base64ToBlob(e,t),t,n)},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(d.ToastrService),t.ɵɵinject(m.TranslateService))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();function be(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",2),t.ɵɵelement(1,"iframe",3),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("src",o.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+o.pdfBase64),t.ɵɵsanitizeResourceUrl)}}var Se=function(e){return{width:e,"min-width":"200px"}},ye=function(){return{overflow:"visible"}},xe=function(){function e(e,t,n){var o=this;this._pdfModalService=e,this.fileService=t,this.domSanitizer=n,this.display=!1,this.pdfBase64=null,this.size=840,e.visible.subscribe((function(t){e.base_64&&(o.display=t,o.pdfBase64=e.base_64)})),e.print.subscribe((function(e){o.display=e,setTimeout((function(){document.getElementById("_modal_pdf").innerHTML="<iframe id='printf' width='100%' height='100%' ></iframe>"}),20),setTimeout((function(){o.imprimir()}),40)}))}return e.prototype.imprimir=function(){var e=window.frames.printf;e.contentWindow.head.innerHTML=' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">\n <style>\n .table-hover tbody tr:hover {\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .tr-select{\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .td-header{\n background: #f3f3f3;\n color: #0d385d;\n border-color: 1px solid #0b4b87;\n }\n .td-yellow{\n background: #fff6d3;\n }\n .td-blue{\n background: #88d1ea;\n }\n .td-green{\n background: #b9d2a0;\n }\n </style>',e.contentWindow.body.innerHTML=this._pdfModalService.html},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(ge),t.ɵɵdirectiveInject(ve),t.ɵɵdirectiveInject(h.DomSanitizer))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["pdf-modal"]],decls:2,vars:15,consts:[[3,"visible","modal","minY","baseZIndex","blockScroll","maximizable","breakpoint","contentStyle","visibleChange"],["style","min-height: 90vh;",4,"ngIf"],[2,"min-height","90vh"],[2,"width","100%","height","90vh",3,"src"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.display=e})),t.ɵɵtemplate(1,be,2,1,"div",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(12,Se,n.size+"px")),t.ɵɵproperty("visible",n.display)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("blockScroll",!0)("maximizable",!0)("breakpoint",840)("contentStyle",t.ɵɵpureFunction0(14,ye)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.pdfBase64))},directives:[c.Dialog,l.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]}),e}(),Ce=function(){},we=function(){},Ee=function(){function e(e,n){this.httpClient=e,this.loadingService=n,this.url_host="",this.login=new t.EventEmitter,this.seleccionEmpresa=new t.EventEmitter,this.auth=new we}return e.prototype.setlogin=function(e,t){localStorage.setItem("lang","es");var n=JSON.parse(localStorage.getItem("config"));return n&&n.url&&(this.url_host=n.url),this.httpClient.post(this.url_host+"/login"+(t?"/"+t:""),e)},e.prototype.startAuth=function(e){this.auth=e,this.login.emit(this.auth)},e.prototype.isLogin=function(){return null!==localStorage.getItem("usuario")},e.prototype.quitarUsuario=function(){localStorage.removeItem("usuario"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.verificaLogin=function(){var e=this;this.usuario=this.getUser(),this.usuario.access_token?this.getDetalsUser().subscribe((function(t){e.auth.usuarioDetalles=t,e.auth.login=!0,e.login.emit(e.auth)}),(function(t){e.quitarUsuario()})):(this.auth.usuarioDetalles=null,this.auth.login=!1,this.login.emit(this.auth))},e.prototype.loginOut=function(){this.quitarEmpresaAdministrativa().subscribe((function(e){localStorage.removeItem("usuario")}),(function(e){localStorage.removeItem("usuario")})),localStorage.setItem("lang","es"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.getUser=function(){if(this.usuario=new Ce,this.isLogin()){var e=localStorage.getItem("usuario");return e&&(this.usuario=JSON.parse(e)),this.usuario}return this.usuario},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.selectEmpresa=function(e){this.seleccionEmpresa.emit(e)},e.prototype.quitarEmpresaAdministrativa=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",{id:0},r)},e.prototype.setEmpresa=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",e,i)},e.prototype.setModulo=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setModulo",e,i)},e.prototype.quitarModulo=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setModulo",{id:0},r)},e.prototype.getDetalsUser=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.get(this.url_host+"/usuario/obtieneUsuarioActual",r)},e.ɵfac=function(o){return new(o||e)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(me))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();function Ie(e,n){1&e&&(t.ɵɵelementStart(0,"label",19),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"Usuario.errorLogin")))}function Me(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",8),t.ɵɵelementStart(2,"form",9,10),t.ɵɵlistener("ngSubmit",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵreference(3);return t.ɵɵnextContext().entrar(e)})),t.ɵɵtemplate(4,Ie,3,3,"label",11),t.ɵɵelementStart(5,"div",12),t.ɵɵelementStart(6,"label",13),t.ɵɵtext(7),t.ɵɵpipe(8,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"input",14,15),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.username=e})),t.ɵɵpipe(11,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"div",12),t.ɵɵelementStart(13,"label",16),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"input",17),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.password=e})),t.ɵɵpipe(17,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(18,"button",18),t.ɵɵtext(19,"entrar"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngIf",r.error),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(8,7,"Usuario.username")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(11,9,"Usuario.username")),t.ɵɵproperty("ngModel",r.user.username),t.ɵɵadvance(5),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,11,"Usuario.password")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(17,13,"Usuario.password")),t.ɵɵproperty("ngModel",r.user.password)}}function Ae(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",22),t.ɵɵelementStart(1,"div",23),t.ɵɵelementStart(2,"div",24),t.ɵɵelementStart(3,"h5"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(4),t.ɵɵtextInterpolate1(" ",o.nombre," ")}}function ke(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",20),t.ɵɵelementStart(2,"h4"),t.ɵɵtext(3,"Selecciona la empresa"),t.ɵɵelementEnd(),t.ɵɵelement(4,"hr"),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Ae,5,1,"div",21),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(5),t.ɵɵproperty("ngForOf",o.empresas)}}var je=function(){function e(e,t){var n=this;this.loginModalService=e,this.authService=t,this.modal=!1,this.user={username:void 0,password:void 0},this.error=!1,this.empresas=[],this.loginModalService.modal.subscribe((function(e){$("#modalLogin").modal("show"),n.user={username:void 0,password:void 0},n.empresas=[]}))}return e.prototype.entrar=function(e){var t=this;if(e.valid){this.user.key="";var n=this.user.password.split("_");if(n.length>1){this.user.key=n[0],this.user.password="";for(var o=1;o<n.length;o++)this.user.password+=n[o]}this.authService.setlogin(this.user,this.user.key).subscribe((function(e){localStorage.setItem("usuario",JSON.stringify(e));var n=e;t.authService.getDetalsUser().subscribe((function(e){e.empresa||(t.empresas=e.empresas,1==t.empresas.length&&t.entrarEmpresa(t.empresas[0]));var o={login:!0};o.usuario=n,o.usuarioDetalles=e,t.authService.startAuth(o),t.error=!1,$("#modalLogin").modal("hide")}))}),(function(e){t.error=!0}))}},e.prototype.entrarEmpresa=function(e){this.authService.setEmpresa(e).subscribe((function(e){$("#modalLogin").modal("hide")}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(ce),t.ɵɵdirectiveInject(Ee))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-login-modal"]],decls:8,vars:2,consts:[["id","modalLogin","tabindex","-1","role","dialog","aria-labelledby","exampleModalCenterTitle","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],["src","assets/img/logo_visorus_loading.png","alt",""],["class","row",4,"ngIf"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12"],[3,"ngSubmit"],["datoForm","ngForm"],["class","error",4,"ngIf"],[1,"form-group","mb-3"],["for","exampleInputEmail1"],["type","text","id","exampleInputEmail1","aria-describedby","emailHelp","name","username","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["username","ngModel"],["for","exampleInputPassword1"],["type","password","id","exampleInputPassword1","name","password","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["type","submit","translate","",1,"btn","btn-primary_low","btn-lg","btn-block","my-5","text-light"],[1,"error"],[1,"col-xl-12","col-lg-12","col-sm-12"],["class","col-xl-6 col-lg-6 col-sm-12 mb-2","style","cursor: pointer",4,"ngFor","ngForOf"],[1,"col-xl-6","col-lg-6","col-sm-12","mb-2",2,"cursor","pointer"],[1,"card"],[1,"card-body"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelement(5,"img",5),t.ɵɵelementEnd(),t.ɵɵtemplate(6,Me,20,15,"div",6),t.ɵɵtemplate(7,ke,6,1,"div",6),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(6),t.ɵɵproperty("ngIf",0==n.empresas.length),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.empresas.length))},directives:[l.NgIf,o.ɵangular_packages_forms_forms_y,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,m.TranslateDirective,l.NgForOf],pipes:[m.TranslatePipe],styles:[".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-invalid[_ngcontent-%COMP%]:not(form), .ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"]}),e}(),Pe=function(e){function o(t){var n=e.call(this,t,"sessionCaja")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K);function _e(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"label",8),t.ɵɵtext(2,"Nombre de caja: "),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",9),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().caja.nombre=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(3),t.ɵɵproperty("ngModel",r.caja.nombre)("disabled",!0)}}function Oe(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",10),t.ɵɵelementStart(1,"div",11),t.ɵɵelementStart(2,"label",12),t.ɵɵtext(3,"Saldo: "),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"input",13),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.monto=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"div",11),t.ɵɵelementStart(6,"label",14),t.ɵɵtext(7,"Numero Z:"),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"input",15),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.z=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.monto)("disabled",r.editMode),t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.z)("disabled",!0)}}function Te(e,n){1&e&&(t.ɵɵelementStart(0,"div",10),t.ɵɵtext(1," Este agente no esta asignado a una caja "),t.ɵɵelementEnd())}function De(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",16),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext().save()})),t.ɵɵtext(1,"Guardar"),t.ɵɵelementEnd()}}function He(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",17),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext().edit()})),t.ɵɵtext(1,"Cerrar session"),t.ɵɵelementEnd()}}var Fe=function(){return{width:"750px"}},Be=function(){function e(e){this.sessionCajaService=e,this.showCreateSession=!1,this.caja={},this.sessionEdit=null,this.status=new t.EventEmitter,this.success=new t.EventEmitter,this.session={inicio:(new Date).getTime(),termino:null,monedaDenominacionList:[]},this.flagModal=!0,this.labels={title:"Crear nueva session de caja"},this.resp={},this.editMode=!1}return e.prototype.ngOnInit=function(){console.log("denominacionList",this.monedaDenominacionList)},e.prototype.setSession=function(){this.sessionEdit?(this.session=this.sessionEdit,this.session.monedaDenominacionList=this.monedaDenominacionList,this.session.movimientosCaja&&(this.session.monto=this.session.movimientosCaja[0].monto),this.labels={title:"Cerrar session"},this.editMode=!0):this.caja&&(this.labels.title="Crear nueva session de caja",this.session.caja=this.caja,this.session.z=this.caja.z)},e.prototype.closeModal=function(){this.session={},this.editMode=!1,this.status.emit({status:!1})},e.prototype.save=function(){return Z(this,void 0,void 0,(function(){var e;return W(this,(function(t){switch(t.label){case 0:return e=this,[4,this.sessionCajaService.save(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp?(this.session={},this.editMode=!1,this.status.emit({status:!1,save:this.resp.data}),this.success.emit(!0)):this.success.emit(!1),[2]}}))}))},e.prototype.edit=function(){return Z(this,void 0,void 0,(function(){var e;return W(this,(function(t){switch(t.label){case 0:return console.log("EDIT",this.session),e=this,[4,this.sessionCajaService.update(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp&&(this.session={},this.editMode=!1,this.status.emit({status:!1,update:this.resp.data})),[2]}}))}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Pe))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["session-create"]],inputs:{showCreateSession:"showCreateSession",caja:"caja",monedaDenominacionList:"monedaDenominacionList",sessionEdit:"sessionEdit"},outputs:{status:"status",success:"success"},decls:12,vars:13,consts:[[3,"visible","modal","closeOnEscape","closable","responsive","contentStyle","visibleChange","onHide","onShow"],[1,"text-primary"],["class","form-group",4,"ngIf"],["class","row",4,"ngIf"],["class","btn btn-sm btn-primary",3,"click",4,"ngIf"],["class","btn btn-sm btn-success",3,"click",4,"ngIf"],[1,"btn","btn-sm","btn-danger",3,"click"],[1,"form-group"],["for","nombreCaja"],["type","text",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"row"],[1,"col-sm-6"],["for","saldoCaja"],["type","number","minlength","1","maxlength","1000000",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","Numero Z"],["type","number",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"btn","btn-sm","btn-primary",3,"click"],[1,"btn","btn-sm","btn-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showCreateSession=e}))("onHide",(function(){return n.closeModal()}))("onShow",(function(){return n.setSession()})),t.ɵɵelementStart(1,"p-header"),t.ɵɵelementStart(2,"a",1),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(4,_e,4,2,"div",2),t.ɵɵtemplate(5,Oe,9,4,"div",3),t.ɵɵtemplate(6,Te,2,0,"div",3),t.ɵɵelementStart(7,"p-footer"),t.ɵɵtemplate(8,De,2,0,"button",4),t.ɵɵtemplate(9,He,2,0,"button",5),t.ɵɵelementStart(10,"button",6),t.ɵɵlistener("click",(function(){return n.closeModal()})),t.ɵɵtext(11,"Cancelar"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("visible",n.showCreateSession)("modal",n.flagModal)("closeOnEscape",n.flagModal)("closable",n.flagModal)("responsive",n.flagModal)("contentStyle",t.ɵɵpureFunction0(12,Fe)),t.ɵɵadvance(3),t.ɵɵtextInterpolate1("",n.labels.title,": "),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.caja),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.caja),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.caja),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",!n.editMode&&n.caja),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.editMode&&n.caja))},directives:[c.Dialog,a.Header,l.NgIf,a.Footer,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,o.NumberValueAccessor,o.MinLengthValidator,o.MaxLengthValidator],styles:[""]}),e}(),Ue=function(){},ze=function(){this.datoPersona=new Ue,this.contactos=[],this.datoDirecciones=[]},qe=function(){this.representanteLegal=new ze,this.contactos=[],this.datoDirecciones=[]},Re=function(){this.personaFisica=new ze},Le=function(){this.agenteCobrador=new Re,this.agenteVendedor=new Re,this.personaFisica=new ze,this.personaMoral=new qe},Ne=function(e){function o(t){return e.call(this,t,"/cliente")||this}return J(o,e),o.prototype.validar_archivos_bss=function(e){return this.getHttp().get(this.getUrl("/cliente/validarClienteBss/")+e,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Ve=function(){function e(e){this.translate=e}return e.prototype.getPage=function(){return{rows:25,total:void 0,offset:0,filtro:void 0,sort:void 0}},e.prototype.getParams=function(e){return[{param:"offset",value:e.offset},{param:"max",value:e.rows},{param:"filter",value:e.filtro},{param:"sort",value:e.sort}]},e.prototype.getOrden=function(e,t){t&&this.translate.setDefaultLang(t);for(var n,o=[],r=[],i=0;i<e.length;i++)o.push({label:"...",value:e[i].label}),r.push(e[i].param);return r.length>0&&this.translate.get(r).subscribe((function(e){n=e;var t=Object.values(n),r=0;o.forEach((function(e){e.label=""+t[r],r++}))}),(function(e){})),o},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(m.TranslateService))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();function $e(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"Cliente.limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"Cliente.plazoCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"Cliente.diasPago")))}function Je(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function Ze(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function We(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",13),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,Je,3,3,"span",14),t.ɵɵtemplate(7,Ze,3,3,"span",14),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.plazoCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.diasPago)}}function Ge(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",15),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,1,"general.noRegistros")))}var Ye=function(){function e(e,n){this.clienteService=e,this.paginate=n,this.selectMode="single",this.select=new t.EventEmitter,this.ordenar=[],this.loading=!0}return e.prototype.ngOnInit=function(){this.page=this.paginate.getPage(),this.page.rows=20,this.clientes=[],this.ordenar=this.paginate.getOrden([{param:"razonZocial",label:"razonZocial"}],"es")},e.prototype.cargarDatosClientes=function(e){var t=this;void 0===e&&(e=null),this.loading=!0,e&&(this.page.rows=e.rows,this.page.offset=e.first),this.clientes=[],this.params=this.paginate.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.page.filtro&&""!==this.page.filtro.trim()&&this.params.push({param:"filtroGeneral",value:this.page.filtro.trim()}),this.clienteService.getAll(this.params).subscribe((function(e){t.page.total=e.total,t.clientes=e.data,t.loading=!1}),(function(e){console.error("Error al cargar clientes:",e),t.loading=!1}))},e.prototype.aplicarFiltro=function(){this.page.offset=0,this.cargarDatosClientes()},e.prototype.seleccionaCliente=function(e){console.log("Fila seleccionada (evento):",e),console.log("Datos de la fila (e.data):",e.data),console.log("Cliente seleccionado ANTES de emitir:",this.clienteSeleccionado),this.select.emit(e.data),this.visible=!1,console.log("Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):",this.clienteSeleccionado)},e.prototype.cerrar=function(){this.select.emit(null),this.visible=!1},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Ne),t.ɵɵdirectiveInject(Ve))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["select-cliente"]],inputs:{clienteSeleccionado:"clienteSeleccionado",selectMode:"selectMode",visible:"visible"},outputs:{select:"select"},decls:16,vars:17,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"row"],[1,"col-12","mb-3"],[1,"input-group","mt-3"],[1,"ui-inputgroup"],["type","text","name","filtro",1,"form-control",3,"placeholder","ngModel","ngModelChange","keyup"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-search"],[1,"col-lg-12"],["dataKey","id","scrollHeight","350px",3,"value","lazy","paginator","rows","totalRecords","selection","selectionMode","scrollable","loading","onLazyLoad","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSelectableRow"],[4,"ngIf"],["colspan","6"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrar()}))("onShow",(function(){return n.cargarDatosClientes()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"div",2),t.ɵɵelementStart(4,"div",3),t.ɵɵelementStart(5,"div",4),t.ɵɵelementStart(6,"input",5),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.aplicarFiltro()})),t.ɵɵpipe(7,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"button",6),t.ɵɵlistener("click",(function(){return n.aplicarFiltro()})),t.ɵɵelement(9,"i",7),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"div",1),t.ɵɵelementStart(11,"div",8),t.ɵɵelementStart(12,"p-table",9),t.ɵɵlistener("onLazyLoad",(function(e){return n.cargarDatosClientes(e)}))("selectionChange",(function(e){return n.clienteSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionaCliente(e)})),t.ɵɵtemplate(13,$e,19,18,"ng-template",10),t.ɵɵtemplate(14,We,14,8,"ng-template",11),t.ɵɵtemplate(15,Ge,4,3,"ng-template",12),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,13,"Seleccionar cliente ")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(6),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(7,15,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(6),t.ɵɵpropertyInterpolate("selectionMode",n.selectMode),t.ɵɵproperty("value",n.clientes)("lazy",!0)("paginator",!0)("rows",n.page.rows)("totalRecords",n.page.total)("selection",n.clienteSeleccionado)("scrollable",!0)("loading",n.loading))},directives:[c.Dialog,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,g.Table,a.PrimeTemplate,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe],encapsulation:2}),e}(),Ke=function(){},Qe=function(){this.personaMoral=new qe,this.catalogoTipo=new Ke,this.clasificadorTipo=new Ke,this.personaFisica=new ze},Xe=function(e){function o(t){var n=e.call(this,t,"/proveedor")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K);function et(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,3,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,5,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,7,"rfc")))}function tt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.rowData;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc)}}var nt=function(){return[10,25,50,100,500]},ot=function(){function e(e,n,o){this.proveedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.proveedorSeleccionado=new Qe,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.proveedores=[]},e.prototype.cargarDatosProveedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.proveedorService.getAll(this.params).subscribe((function(t){e.proveedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosProveedores()},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarProveedor=function(e){this.select.emit(e.data),this.visible=!1},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Xe),t.ɵɵdirectiveInject(Ve),t.ɵɵdirectiveInject(m.TranslateService))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["select-proveedor"]],inputs:{visible:"visible",proveedorSeleccionado:"proveedorSeleccionado"},outputs:{select:"select"},decls:18,vars:16,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"row"],[1,"col-3"],[1,"input-group","mt-3"],["type","text","name","filtro",1,"form-control",3,"placeholder","ngModel","ngModelChange","change"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-search"],[1,"col-md-12"],["selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","valueChange","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"div",2),t.ɵɵelementStart(4,"div",3),t.ɵɵelementStart(5,"input",4),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("change",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"div",5),t.ɵɵelementStart(8,"button",6),t.ɵɵlistener("click",(function(){return n.cargarDatosProveedores()})),t.ɵɵelement(9,"i",7),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelement(10,"hr"),t.ɵɵelementStart(11,"div",1),t.ɵɵelementStart(12,"div",8),t.ɵɵelementStart(13,"p-table",9),t.ɵɵlistener("valueChange",(function(e){return n.proveedores=e}))("selectionChange",(function(e){return n.proveedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarProveedor(e)})),t.ɵɵtemplate(14,et,10,9,"ng-template",10),t.ɵɵtemplate(15,tt,7,3,"ng-template",11),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"div",8),t.ɵɵelementStart(17,"p-paginator",12),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,11,"ArticuloProveedor.proveedores")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(5),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(6,13,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(8),t.ɵɵproperty("value",n.proveedores)("selection",n.proveedorSeleccionado)("scrollable",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(15,nt)))},directives:[c.Dialog,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,g.Table,a.PrimeTemplate,v.Paginator],pipes:[m.TranslatePipe],encapsulation:2}),e}(),rt=function(e){function o(t){var n=e.call(this,t,"stock")||this;return n.httpClient=t,n}return J(o,e),o.prototype.obtenerExistenciasArticulosDescripcion=function(e,t){var n=this,o=this.getBaseUrl()+"/stock/obtenerExistenciasArticulos";return new Promise((function(r,i){n.httpClient.post(o+n.serializeParams(t),e,n.buildAuth()).subscribe((function(e){r(e)}),(function(e){i(e)}))}))},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),it=function(e){function o(t){var n=e.call(this,t,"/almacen")||this;return n.httpClient=t,n}return J(o,e),o.prototype.obtenerAlmacenEmpresa=function(){var e=this.geturl()+"/obtenerAlmacenEmpresa";return this.getHttp().get(e,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),at=function(e){function o(t){var n=e.call(this,t,"articulo")||this;return n.httpClient=t,n}return J(o,e),o.prototype.obtenerExistencias=function(e){var t="/existenciasArticulo/"+e;return this.httpClient.get(this.geturl()+t,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K);function lt(e,n){if(1&e&&t.ɵɵelement(0,"col"),2&e){var o=n.$implicit;t.ɵɵstyleProp("width",o.width)}}function st(e,n){if(1&e&&(t.ɵɵelementStart(0,"colgroup"),t.ɵɵtemplate(1,lt,1,2,"col",8),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function ct(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",10),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",o.header," ")}}function ut(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵtemplate(1,ct,2,1,"th",9),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"td"),t.ɵɵtext(8),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"td"),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.existencia)}}var dt=function(e){return{width:e,"min-width":"200px"}},mt=function(){return{width:"600px"}},ft=function(){function e(e){this.articuloInformacionService=e,this.eventSelection=new t.EventEmitter,this.flagModal=!0,this.size=640,this.params=[{param:"offset",value:0},{param:"max",value:-1},{param:"order",value:"asc"}],this.columnsData=[{field:"codigo",header:"Código Almacén",width:"90px"},{field:"descripcion",header:"Descripción Almacen",width:"140px"},{field:"codigo",header:"Código Ubicación",width:"90px"},{field:"descripcion",header:"Descripción Ubicación",width:"140px"},{field:"opciones",header:"Existencia",width:"80px"}]}return e.prototype.ngOnInit=function(){this.OnLoad()},e.prototype.hiddenDialog=function(){this.eventSelection.emit({status:!1})},e.prototype.OnResize=function(e){this.isMovil=e.target.innerWidth<=640},e.prototype.OnLoad=function(){var e=this;this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe((function(t){e.existenciasList=t.data}))},e.prototype.OnShow=function(){this.titulo="Existencias en Almacenes"},e.prototype.onSelectedUbicacion=function(e){this.eventSelection.emit({status:!1,ubicacion:e})},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(at))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["lib-seleccion-articulo-informacion"]],inputs:{showModal:"showModal",articulo:"articulo"},outputs:{eventSelection:"eventSelection"},decls:9,vars:20,consts:[[3,"header","visible","modal","minY","baseZIndex","draggable","blockScroll","maximizable","breakpoint","onShow","visibleChange","onHide","resize"],[1,"ui-g","ui-fluid"],["scrollHeight","350px",3,"columns","value","scrollable","responsive"],["pTemplate","colgroup"],["pTemplate","header"],["pTemplate","body"],[1,"container-end"],["pButton","","type","button","icon","pi pi-replay","label","Cerrar",1,"ui-button-raised","ui-button-secondary",3,"click"],[3,"width",4,"ngFor","ngForOf"],["pResizableColumn","",4,"ngFor","ngForOf"],["pResizableColumn",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("onShow",(function(){return n.OnShow()}))("visibleChange",(function(e){return n.showModal=e}))("onHide",(function(){return n.hiddenDialog()}))("resize",(function(e){return n.OnResize(e)}),!1,t.ɵɵresolveWindow),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"p-table",2),t.ɵɵtemplate(3,st,2,1,"ng-template",3),t.ɵɵtemplate(4,ut,2,1,"ng-template",4),t.ɵɵtemplate(5,pt,11,5,"ng-template",5),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"p-footer"),t.ɵɵelementStart(7,"div",6),t.ɵɵelementStart(8,"button",7),t.ɵɵlistener("click",(function(){return n.hiddenDialog()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(17,dt,n.size+"px")),t.ɵɵproperty("header",n.titulo)("visible",n.showModal)("modal",n.flagModal)("minY",70)("baseZIndex",1e4)("draggable",!1)("blockScroll",!0)("maximizable",!0)("breakpoint",640),t.ɵɵadvance(2),t.ɵɵstyleMap(t.ɵɵpureFunction0(19,mt)),t.ɵɵproperty("columns",n.columnsData)("value",n.existenciasList)("scrollable",!0)("responsive",!0))},directives:[c.Dialog,g.Table,a.PrimeTemplate,a.Footer,s.ButtonDirective,l.NgForOf,g.ResizableColumn],styles:[""]}),e}();function ht(e,n){if(1&e&&(t.ɵɵelementStart(0,"option",25),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵpropertyInterpolate("value",o.id),t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function gt(e,n){1&e&&(t.ɵɵelementStart(0,"th",34),t.ɵɵtext(1,"existenciaSecundaria"),t.ɵɵelementEnd())}function vt(e,n){1&e&&(t.ɵɵelementStart(0,"th",28),t.ɵɵtext(1,"Unidad"),t.ɵɵelementEnd())}function bt(e,n){1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1,"Movimiento.movimientoDetalle.precio"),t.ɵɵelementEnd())}function St(e,n){1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1,"Precio 2"),t.ɵɵelementEnd())}function yt(e,n){1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1,"Precio 3"),t.ɵɵelementEnd())}function xt(e,n){1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1,"Precio 4"),t.ɵɵelementEnd())}function Ct(e,n){1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1,"Precio 5"),t.ɵɵelementEnd())}function wt(e,n){1&e&&(t.ɵɵelementStart(0,"th",28),t.ɵɵtext(1,"Movimiento.costo"),t.ɵɵelementEnd())}function Et(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function It(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",26),t.ɵɵtext(2,"Código Ubicacion"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",27),t.ɵɵtext(4,"Existencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",28),t.ɵɵtext(6,"Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(7,gt,2,0,"th",29),t.ɵɵtemplate(8,vt,2,0,"th",30),t.ɵɵelementStart(9,"th",26),t.ɵɵtext(10,"Código"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"th",31),t.ɵɵtext(12,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelement(13,"th",28),t.ɵɵtemplate(14,bt,2,0,"th",32),t.ɵɵtemplate(15,St,2,0,"th",32),t.ɵɵtemplate(16,yt,2,0,"th",32),t.ɵɵtemplate(17,xt,2,0,"th",32),t.ɵɵtemplate(18,Ct,2,0,"th",32),t.ɵɵtemplate(19,wt,2,0,"th",30),t.ɵɵelementStart(20,"th",28),t.ɵɵtext(21,"Existencia por Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(22,Et,2,1,"th",33),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(7),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(6),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===o.configuracion.tipoPrecio),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",o.clasificadorList)}}function Mt(e,n){1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1,"Movimiento.NoAsignado"),t.ɵɵelementEnd())}function At(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.ubicacionCodigo)}}function kt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",47),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.existenciaSecundaria)}}function jt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.unidadSecundariaCodigo)}}function Pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precioConImpuestos))}}function _t(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio2ConImpuestos))}}function Ot(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio3ConImpuestos))}}function Tt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio4ConImpuestos))}}function Dt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio5ConImpuestos))}}function Ht(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio))}}function Ft(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",48),t.ɵɵelementStart(1,"div",49),t.ɵɵelementStart(2,"label",50),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",49),t.ɵɵelementStart(5,"label",50),t.ɵɵtext(6),t.ɵɵpipe(7,"number"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(3),t.ɵɵtextInterpolate(o.unidad_codigo),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(7,2,o.unidad_existencia,"1.2-2"))}}function Bt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",42),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.valor)}}function Ut(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"tr",35),t.ɵɵtemplate(1,Mt,2,0,"td",36),t.ɵɵtemplate(2,At,2,1,"td",37),t.ɵɵelementStart(3,"td",38),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td",39),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵtemplate(7,kt,2,1,"td",40),t.ɵɵtemplate(8,jt,2,1,"td",41),t.ɵɵelementStart(9,"td",42),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"td",43),t.ɵɵtext(12),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"td",39),t.ɵɵelementStart(14,"button",44),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=n.$implicit;return t.ɵɵnextContext().onShowInformacion(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(15,Pt,3,3,"td",37),t.ɵɵtemplate(16,_t,3,3,"td",37),t.ɵɵtemplate(17,Ot,3,3,"td",37),t.ɵɵtemplate(18,Tt,3,3,"td",37),t.ɵɵtemplate(19,Dt,3,3,"td",37),t.ɵɵtemplate(20,Ht,3,3,"td",41),t.ɵɵelementStart(21,"td",39),t.ɵɵtemplate(22,Ft,8,5,"div",45),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Bt,2,1,"td",46),t.ɵɵelementEnd()}if(2&e){var r=n.$implicit,i=t.ɵɵnextContext();t.ɵɵproperty("pSelectableRow",r),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!r.ubicacionCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.existencia),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.unidadCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.descripcion),t.ɵɵadvance(3),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===i.configuracion.tipoPrecio),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",r.existenciaUnidades),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",r.articuloClasificadorList)}}function zt(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"lib-seleccion-articulo-informacion",51),t.ɵɵlistener("eventSelection",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().onEventInformacion(e)})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("showModal",r.showModalInformacion)("articulo",r.articuloSelected)}}var qt=function(e){return{width:e,"min-width":"200px"}},Rt=function(){return[10,25,50,100,500]},Lt=function(){function e(e,n,o){this._stockService=e,this._paginateService=n,this._almacenService=o,this.manejaUnidadSecundaria=!1,this.emitFilaSeleccionada=new t.EventEmitter,this.emitShowArticulos=new t.EventEmitter,this.articulosList=[],this.ordenar=[],this.busquedaArticulos={tipoBusqueda:""},this.showModal=!1,this.showModalInformacion=!1,this.showFirstTime=!0,this.clasificadorList=[],this.size=640}return e.prototype.ngOnInit=function(){var e=this;this.page=this._paginateService.getPage(),this.ordenar=this._paginateService.getOrden([{param:"nombre",label:"estatus"}],"es"),this.showFirstTime=!0,this._almacenService.getAll(this.configuracion.params).subscribe((function(t){e.almacenList=t.data})),this.busquedaArticulos.tipoBusqueda="CD"},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosShow=function(){this.busquedaArticulos.tipoBusqueda="CD",this.showFirstTime&&(this.obtenerExistenciaArticulos(),this.showFirstTime=!1)},e.prototype.obtenerExistenciaArticulos=function(){var e=this;this.busquedaArticulos.params=this._paginateService.getParams(this.page);var t={almacen:this.configuracion.noOcupaAlamacen?null:this.movimiento.almacen,tipoPrecio:this.configuracion.tipoPrecio,busquedaArticulos:this.busquedaArticulos,tipoArticulo:this.configuracion.tipoArticulo?this.configuracion.tipoArticulo:null,numeroPrecioDefault:this.configuracion.numeroPrecioDefault};this._stockService.obtenerExistenciasArticulosDescripcion(t,this.busquedaArticulos.params).then((function(t){e.articulosList=t.articulosDescripcion,e.page.total=t.total,t.clasificadores&&(e.clasificadorList=t.clasificadores),e.showModal||(e.showModal=!0)})).catch((function(t){e.articulosList=[]}))},e.prototype.obtenerExistenciaArticulosVal=function(){if(""!=this.busquedaArticulos.tipoBusqueda&&!this.busquedaArticulos.key)return!1;this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosKey=function(e){"Enter"===e.key&&this.obtenerExistenciaArticulos()},e.prototype.filaSeleccionada=function(e){this.emitFilaSeleccionada.emit(e)},e.prototype.emitirShowArticulos=function(){this.emitShowArticulos.emit(0)},e.prototype.seriesArticulo=function(e){console.log(e)},e.prototype.onShowInformacion=function(e){this.articuloSelected=e,this.showModalInformacion=!0},e.prototype.onEventInformacion=function(e){this.showModalInformacion=e.status},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(rt),t.ɵɵdirectiveInject(Ve),t.ɵɵdirectiveInject(it))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-selecciona-articulo"]],inputs:{configuracion:"configuracion",showArticulos:"showArticulos",movimiento:"movimiento",manejaUnidadSecundaria:"manejaUnidadSecundaria"},outputs:{emitFilaSeleccionada:"emitFilaSeleccionada",emitShowArticulos:"emitShowArticulos"},decls:33,vars:28,consts:[[3,"header","visible","maximizable","baseZIndex","blockScroll","minY","visibleChange","onShow","onHide"],[1,"col-12","mb-3"],[1,"row"],[1,"col-12","col-md-3","col-xl-3"],[1,"form-control","col-md-6",3,"ngModel","ngModelChange","change"],["value","C"],["value","D"],["value","CD"],["value","CI"],[1,"ui-inputgroup"],["type","text","name","key",1,"form-control",3,"ngModel","ngModelChange","keypress"],["type","button",1,"btn","btn-outline-primary",3,"click"],[1,"fa","fa-search"],[1,"col-12","col-md-2","col-xl-2"],[1,"form-group"],[1,"col-12","col-md-4","col-xl-4"],["disabled","","name","almacen",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[2,"margin-top","10px"],["scrollHeight","400px","selectionMode","single",3,"value","scrollable","responsive","onRowSelect"],["dt",""],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"showModal","articulo","eventSelection",4,"ngIf"],[3,"value"],["translate","",2,"width","80px"],["translate","",2,"width","70px"],["translate","",2,"width","40px"],["style","width: 50px","translate","",4,"ngIf"],["style","width: 40px","translate","",4,"ngIf"],["translate","",2,"width","120px"],["style","width: 80px","translate","",4,"ngIf"],["style","width: 80px","translate","",4,"ngFor","ngForOf"],["translate","",2,"width","50px"],[3,"pSelectableRow"],["style","width: 80px;","translate","",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","70px"],[2,"width","40px"],["style","width: 50px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","80px"],[2,"width","120px"],["pButton","","type","button","icon","pi pi-eye",1,"ui-button-raised","ui-button-primary",3,"click"],["class","row justify-content-between",4,"ngFor","ngForOf"],["style","width: 80px;",4,"ngFor","ngForOf"],[2,"width","50px"],[1,"row","justify-content-between"],[1,"col-lg-4"],["for",""],[3,"showModal","articulo","eventSelection"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showArticulos=e}))("onShow",(function(){return n.obtenerExistenciaArticulosShow()}))("onHide",(function(){return n.busquedaArticulos={tipoBusqueda:""},n.emitirShowArticulos()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"div",2),t.ɵɵelementStart(4,"div",3),t.ɵɵelementStart(5,"select",4),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.tipoBusqueda=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵelementStart(6,"option",5),t.ɵɵtext(7,"Codigo"),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"option",6),t.ɵɵtext(9,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"option",7),t.ɵɵtext(11,"Coincidencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"option",8),t.ɵɵtext(13,"Igual a"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(14,"div",3),t.ɵɵelementStart(15,"div",9),t.ɵɵelementStart(16,"input",10),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.key=e}))("keypress",(function(e){return n.obtenerExistenciaArticulosKey(e)})),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"button",11),t.ɵɵlistener("click",(function(){return n.obtenerExistenciaArticulos()})),t.ɵɵelement(18,"i",12),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(19,"div",13),t.ɵɵelementStart(20,"label",14),t.ɵɵtext(21),t.ɵɵpipe(22,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(23,"div",15),t.ɵɵelementStart(24,"select",16),t.ɵɵlistener("ngModelChange",(function(e){return n.movimiento.almacen=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵtemplate(25,ht,2,2,"option",17),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(26,"div",18),t.ɵɵelementStart(27,"p-table",19,20),t.ɵɵlistener("onRowSelect",(function(e){return n.filaSeleccionada(e)})),t.ɵɵtemplate(29,It,23,9,"ng-template",21),t.ɵɵtemplate(30,Ut,24,17,"ng-template",22),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(31,"p-paginator",23),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(32,zt,1,2,"lib-seleccion-articulo-informacion",24)),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(25,qt,n.size+"px")),t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,21,"Articulos")),t.ɵɵproperty("visible",n.showArticulos)("maximizable",!0)("baseZIndex",1e4)("blockScroll",!0)("minY",70),t.ɵɵadvance(5),t.ɵɵproperty("ngModel",n.busquedaArticulos.tipoBusqueda),t.ɵɵadvance(11),t.ɵɵproperty("ngModel",n.busquedaArticulos.key),t.ɵɵadvance(5),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(22,23,"Movimiento.movimientoDetalle.almacen")),t.ɵɵadvance(3),t.ɵɵproperty("ngModel",n.movimiento.almacen),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.almacenList),t.ɵɵadvance(2),t.ɵɵproperty("value",n.articulosList)("scrollable",!0)("responsive",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(27,Rt)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.showModalInformacion))},directives:[c.Dialog,o.SelectControlValueAccessor,o.NgControlStatus,o.NgModel,o.NgSelectOption,o.ɵangular_packages_forms_forms_x,o.DefaultValueAccessor,l.NgForOf,g.Table,a.PrimeTemplate,v.Paginator,l.NgIf,m.TranslateDirective,g.SelectableRow,s.ButtonDirective,ft],pipes:[m.TranslatePipe,l.CurrencyPipe,l.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]}),e}(),Nt=function(e){function o(t){var n=e.call(this,t,"acreedor")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K);function Vt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"rfc")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"atrasoDiasEntrega")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"fechaUltimaCompra")))}function $t(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function Jt(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function Zt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",14),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,$t,3,3,"span",15),t.ɵɵtemplate(7,Jt,3,3,"span",15),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵpipe(14,"date"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.atrasoDiasEntrega),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(14,8,o.fechaUltimaCompra,"dd/MM/yyyy"))}}function Wt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵattribute("colspan",6),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,2,"general.noRegistros")))}var Gt=function(){return[10,25,50,100,500]},Yt=function(){function e(e,n,o){this.acreedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.acreedorSeleccionado=new Qe,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.acreedores=[]},e.prototype.cargarDatosAcreedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.acreedorService.getAll(this.params).subscribe((function(t){e.acreedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosAcreedores},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarAcreedor=function(e){this.select.emit(e.data),this.visible=!1},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Nt),t.ɵɵdirectiveInject(Ve),t.ɵɵdirectiveInject(m.TranslateService))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["select-acreedor"]],inputs:{visible:"visible",acreedorSeleccionado:"acreedorSeleccionado"},outputs:{select:"select"},decls:18,vars:14,consts:[["header","Selecciona el acreedor",3,"visible","visibleChange","onHide","onShow"],[1,"row"],[1,"col-3"],[1,"input-group","mt-3"],["type","text","name","filtro",1,"form-control",3,"placeholder","ngModel","ngModelChange","keyup"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-search"],[1,"col-md-12"],["dataKey","id","selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","responsive","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"pSelectableRow"],[4,"ngIf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"input",4),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.cargarDatosAcreedores()})),t.ɵɵpipe(5,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"button",6),t.ɵɵlistener("click",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelement(8,"i",7),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelement(9,"hr"),t.ɵɵelementStart(10,"div",1),t.ɵɵelementStart(11,"div",8),t.ɵɵelementStart(12,"p-table",9),t.ɵɵlistener("selectionChange",(function(e){return n.acreedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarAcreedor(e)})),t.ɵɵtemplate(13,Vt,19,18,"ng-template",10),t.ɵɵtemplate(14,Zt,15,11,"ng-template",11),t.ɵɵtemplate(15,Wt,4,4,"ng-template",12),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"div",8),t.ɵɵelementStart(17,"p-paginator",13),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(4),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(5,11,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(8),t.ɵɵproperty("value",n.acreedores)("selection",n.acreedorSeleccionado)("scrollable",!0)("responsive",!0),t.ɵɵadvance(5),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(13,Gt)))},directives:[c.Dialog,o.DefaultValueAccessor,o.NgControlStatus,o.NgModel,g.Table,a.PrimeTemplate,v.Paginator,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe,l.DatePipe],encapsulation:2}),e}(),Kt=[U.CardModule,B.TooltipModule,F.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,k.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,E.TriStateCheckboxModule,I.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,j.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,H.TabMenuModule,z.MenubarModule],Qt=[a.ConfirmationService];function Xt(e){return new L.TranslateHttpLoader(e,"./assets/i18n/",".json")}var en=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},providers:[Qt,{provide:n.HTTP_INTERCEPTORS,useClass:pe,multi:!0}],imports:[[l.CommonModule,Kt,o.FormsModule,d.ToastrModule.forRoot(),m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:Xt,deps:[n.HttpClient]}})]]}),e}();("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(en,{declarations:[de,fe,he,je,xe,Be,Ye,ot,Lt,Yt,re,se,ft],imports:[l.CommonModule,U.CardModule,B.TooltipModule,F.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,k.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,E.TriStateCheckboxModule,I.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,j.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,H.TabMenuModule,z.MenubarModule,o.FormsModule,d.ToastrModule,m.TranslateModule],exports:[fe,he,je,xe,Be,Ye,ot,Lt,Yt,re,se]});var tn=function(){function e(e){this.authService=e,this.cambioAcciones=new t.EventEmitter,this.changeDetalleUsuario=new t.EventEmitter}return e.prototype.set=function(e){this.detallesUsuarios=e,this.changeDetalleUsuario.emit(this.detallesUsuarios)},e.prototype.canActivete=function(e){for(var t=!1,n=this.authService.getUser(),o=function(o){if(t)return{value:t};var r=n.roles.filter((function(t){return t===e[o]}));t=r.length>0},r=0;r<e.length;r++){var i=o(r);if("object"==typeof i)return i.value}return t},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(Ee))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),nn=function(){function e(e,t){this.http=e,this.authService=t}return e.prototype.initConfig=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))})),this.http.get("assets/version.json").subscribe((function(e){localStorage.removeItem("version"),localStorage.setItem("version",e.hash)}))},e.prototype.cargaConfig=function(){var e=this;this.http.get("assets/config.json").subscribe((function(t){localStorage.setItem("config",JSON.stringify(t));var o=t.url;e.http.post(o+"/login",{username:"admin",password:"admin"}).subscribe((function(t){localStorage.setItem("usuario",JSON.stringify(t));var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t.token_type+" "+t.access_token})};e.http.get(o+"/usuario/obtieneUsuarioActual",r).subscribe((function(t){var n=t.empresas[0];e.authService.setEmpresa(n).subscribe()}))}))}))},e.ɵfac=function(o){return new(o||e)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(Ee))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),on=function(){function e(e){this.toastr=e}return e.prototype.deployMessage=function(e,t,n){switch(void 0===e&&(e=null),e){case"success":this.toastr.success(n,t,{timeOut:3e3});break;case"info":this.toastr.info(n,t,{timeOut:3e3});break;case"warning":this.toastr.warning(n,t,{timeOut:3e3});break;case"error":this.toastr.error(n,t,{timeOut:3e3});break;case null:this.toastr.success(n,t,{timeOut:3e3})}},e.prototype.success=function(e){var t=[];return t.push({severity:"success",summary:"Exito",detail:""+e}),t},e.prototype.error=function(e){var t=[];if(e){if(e.error&&(e=e.error).error)for(var n=0;n<e.error.length;n++)t.push({severity:"error",summary:"Error",detail:""+e.error[n].message})}else e.mensaje&&t.push({severity:"error",summary:"Error",detail:""+e.mensaje});return t},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(d.ToastrService))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),rn=function(e){function o(t){return e.call(this,t,"/personaMoral")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),an=function(){function e(e){this.controlAccesoService=e,this.rol="",this.method=""}return e.prototype.canActivate=function(){return this.controlAccesoService.canActivete([this.rol])},e.prototype.permisos=function(e){this.rol=e},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(tn))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),ln=function(e){function o(t){var n=e.call(this,t,"catalogoAdicional")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),sn=function(){function e(e,t,n){this.authService=e,this.controlAccesoService=t,this.router=n}return e.prototype.load=function(e){var t=this;return this.authService.getUser()?this.authService.getDetalsUser().subscribe((function(e){for(var n=e.roles,o=0;o<n.length;o++)"ROLE_CLIENTE"===n[o].authority&&t.router.navigate(["movimientos/ventaRapida/create"]);return e.empresa||t.regresaAlprincipal(void 0),t.controlAccesoService.detallesUsuarios=e,t.controlAccesoService.cambioAcciones.emit(!0),!0}),(function(e){t.regresaAlprincipal(void 0)})):this.regresaAlprincipal(void 0),!1},e.prototype.regresaAlprincipal=function(e){var t=JSON.parse(localStorage.getItem("config")),n="";t&&t.host&&(n=t.host),e&&(n+=e),window.location.href=n},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(Ee),t.ɵɵinject(tn),t.ɵɵinject(N.Router))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),cn=function(){function e(e){this.http=e,this.currentHash="{{POST_BUILD_ENTERS_HASH_HERE}}",this.versionado=!1,this.frequency=108e5}return e.prototype.initVersionCheck=function(){var e=this;setInterval((function(){e.checkVersion()}),this.frequency)},e.prototype.checkVersion=function(){var e=this;this.http.get("assets/version.json?t="+(new Date).getTime()).subscribe((function(t){var n=t.hash;e.currentHash=localStorage.getItem("version"),e.hasHashChanged(e.currentHash,n)||e.versionado||(e.versionado=!0,confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")?(location.reload(!0),e.versionado=!1):e.versionado=!1)}),(function(e){console.error(e,"No se pudo obtener versión de software")}))},e.prototype.hasHashChanged=function(e,t){return!(!e||"{{POST_BUILD_ENTERS_HASH_HERE}}"===e)&&e===t},e.ɵfac=function(o){return new(o||e)(t.ɵɵinject(n.HttpClient))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),un=function(e){function o(t){var n=e.call(this,t,"agente")||this;return n.httpClient=t,n}return J(o,e),o.prototype.saveUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario";return this.getHttp().post(t,e,this.buildAuth())},o.prototype.getUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario/"+e;return this.getHttp().get(t,this.buildAuth())},o.prototype.obtenerAgenteEmpresa=function(){var e=this.geturl()+"/obtenerAgenteEmpresa";return this.getHttp().get(e,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),pn=function(){},dn=function(){},mn=function(){this.datoDireccion=new dn},fn=function(e){function o(t){return e.call(this,t,"/banco")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),hn=function(){},gn=function(e){function o(t){return e.call(this,t,"/catalogoTipo")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),vn=function(e){function o(t){return e.call(this,t,"/clasificadorTipo")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),bn=function(){},Sn=function(e){function o(t){return e.call(this,t,"claveMovimiento")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),yn=function(){this.banco=new mn,this.estatus=!0},xn=function(){},Cn=function(){this.cliente=new Le,this.flete=new xn,this.estatus=!0},wn=function(e){function o(t){var n=e.call(this,t,"/clienteCuentaBanco")||this;return n.httpClient=t,n}return J(o,e),o.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),En=function(e){function o(t){var n=e.call(this,t,"/clienteFlete")||this;return n.httpClient=t,n}return J(o,e),o.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),In=function(){this.estatus=!0},Mn=function(){this.tipoContacto=new In},An=function(e){function o(t){return e.call(this,t,"/contacto")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),kn=function(e){function o(t){return e.call(this,t,"/datoDireccion")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),jn=function(){},Pn=function(e){function o(t){return e.call(this,t,"/departamento")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),_n=function(){},On=function(){this.datoDireccion=new dn,this.personaMoral=new qe,this.claveFormaPagoEfectivo=new _n},Tn=function(){this.empresa=new On},Dn=function(e){function o(t){var n=e.call(this,t,"/empresa")||this;return n.httpClient=t,n}return J(o,e),o.prototype.get=function(){return this.httpClient.get(this.getBaseUrl()+"/configuracionEmpresaAdministrativo/configuracionUsuario",this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Hn=function(e){function o(t){var n=e.call(this,t,"/flete")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Fn=function(e){function o(t){return e.call(this,t,"/FormaDePago")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Bn=function(){},Un=function(e){function o(t){var n=e.call(this,t,"/moneda")||this;return n.httpClient=t,n}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),zn=function(){},qn=function(){},Rn=function(e){function o(t){var n=e.call(this,t,"/PersonaFisica")||this;return n.httpClient=t,n}return J(o,e),o.prototype.getGeneros=function(){return this.httpClient.get(this.getBaseUrl()+"/genero",this.buildAuth())},o.prototype.getEstadoCivil=function(){return this.httpClient.get(this.getBaseUrl()+"/estadoCivil",this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Ln=function(){this.banco=new mn,this.estatus=!0},Nn=function(){this.proveedor=new Qe,this.flete=new xn,this.estatus=!0},Vn=function(e){function o(t){var n=e.call(this,t,"/proveedorCuentaBanco")||this;return n.httpClient=t,n}return J(o,e),o.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),$n=function(e){function o(t){var n=e.call(this,t,"/proveedorFlete")||this;return n.httpClient=t,n}return J(o,e),o.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Jn=function(e){function o(t){return e.call(this,t,"claveAumentoDisminucion")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Zn=function(e){function o(t){var n=e.call(this,t,"serieDocumento")||this;return n.httpClient=t,n}return J(o,e),o.prototype.getTipos=function(){return this.httpClient.get(this.getUrl("serieDocumento")+"/tipoSerie",this.buildAuth())},o.prototype.getReporte=function(e){return this.httpClient.get(this.getUrl("serieDocumento")+"/descargaFormatoReporte"+this.serializeParams(e),this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Wn=function(){},Gn=function(e){function o(t){return e.call(this,t,"/tipoContacto")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Yn=function(){},Kn=function(e){function o(t){return e.call(this,t,"ubicacion")||this}return J(o,e),o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),Qn=function(){function e(){}return e.ARTICULO=2,e.USO_CFDI=11,e}(),Xn=function(e){function o(t){var n=e.call(this,t,"acreedorCuentaContable")||this;return n.httpClient=t,n}return J(o,e),o.prototype.cuentasContables=function(){return this.httpClient.get(this.getUrl()+"/cuentaContable/obtieneCuentasContablesRecursivo/",this.buildAuth())},o.ɵfac=function(e){return new(e||o)(t.ɵɵinject(n.HttpClient))},o.ɵprov=t.ɵɵdefineInjectable({token:o,factory:o.ɵfac,providedIn:"root"}),o}(K),eo=function(){},to=function(){};e.AcreedorCuentaContableService=Xn,e.AcreedorService=Nt,e.Agente=Re,e.AgenteService=un,e.Almacen=pn,e.AlmacenService=it,e.Auth=we,e.AuthService=Ee,e.Authenticated=sn,e.Banco=mn,e.BancoService=fn,e.CanActivateGuard=an,e.CatalogoAdicionalService=ln,e.CatalogoTipo=hn,e.CatalogoTipoService=gn,e.CclistaComponent=re,e.CcseleccionDialogComponent=se,e.ClasificadorTipo=Ke,e.ClasificadorTipoService=vn,e.ClaveAumentoDisminucionService=Jn,e.ClaveMovimiento=bn,e.ClaveMovimientoService=Sn,e.Cliente=Le,e.ClienteCuentaBanco=yn,e.ClienteCuentaBancoService=wn,e.ClienteFlete=Cn,e.ClienteFleteService=En,e.ClienteService=Ne,e.ConfiguracionEmpresaAdministrativa=Tn,e.ControlAccesoService=tn,e.CoreLibModule=en,e.CrudService=K,e.CuentaContableModel=eo,e.DatoContacto=Mn,e.DatoContactoService=An,e.DatoDireccion=dn,e.DatoDireccionService=kn,e.Departamento=jn,e.DepartamentoService=Pn,e.Empresa=On,e.EmpresaService=Dn,e.Error404Component=de,e.EstadoCivil=zn,e.FileService=ve,e.Flete=xn,e.FleteService=Hn,e.FormaPago=_n,e.FormaPagoService=Fn,e.Genero=qn,e.GlobalService=Y,e.HttpLoaderFactory=Xt,e.InitService=nn,e.LoadingComponent=fe,e.LoadingScreenComponent=he,e.LoadingScreenService=ue,e.LoadingService=me,e.LoginModalComponent=je,e.LoginModalService=ce,e.MessageService=on,e.Moneda=Bn,e.MonedaService=Un,e.NormaInformacionFinancieraModel=to,e.PaginateService=Ve,e.PdfModalComponent=xe,e.PdfModalService=ge,e.Persona=Ue,e.PersonaFisica=ze,e.PersonaFisicaService=Rn,e.PersonaMoral=qe,e.PersonaMoralService=rn,e.Proveedor=Qe,e.ProveedorCuentaBanco=Ln,e.ProveedorCuentaBancoService=Vn,e.ProveedorFlete=Nn,e.ProveedorFleteService=$n,e.ProveedorService=Xe,e.SeleccionaArticuloComponent=Lt,e.SelectAcreedorComponent=Yt,e.SelectClienteComponent=Ye,e.SelectProveedorComponent=ot,e.SerieDocumento=Wn,e.SerieDocumentoService=Zn,e.SessionCajaService=Pe,e.SessionCreateComponent=Be,e.StockService=rt,e.TipoCatalogo=Qn,e.TipoContacto=In,e.TipoContactoService=Gn,e.Ubicacion=Yn,e.UbicacionService=Kn,e.Usuario=Ce,e.VersionCheckService=cn,e.httpInterceptor=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("@angular/forms"),require("primeng/inputtext"),require("primeng/treetable"),require("primeng/api"),require("@angular/common"),require("primeng/button"),require("primeng/dialog"),require("rxjs"),require("rxjs/internal/operators"),require("ngx-toastr"),require("@ngx-translate/core"),require("rxjs/operators"),require("@angular/platform-browser"),require("primeng/table"),require("primeng/paginator"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/messages"),require("primeng/message"),require("primeng/confirmdialog"),require("primeng/progressbar"),require("primeng/tristatecheckbox"),require("primeng/keyfilter"),require("primeng/inputswitch"),require("primeng/tabview"),require("primeng/calendar"),require("primeng/panel"),require("primeng/autocomplete"),require("primeng/fieldset"),require("primeng/checkbox"),require("primeng/tree"),require("primeng/radiobutton"),require("primeng/tabmenu"),require("primeng/overlaypanel"),require("primeng/tooltip"),require("primeng/card"),require("primeng/menubar"),require("primeng/splitbutton"),require("primeng/toolbar"),require("@ngx-translate/http-loader"),require("@angular/router")):"function"==typeof define&&define.amd?define("visorus-erp-core",["exports","@angular/core","@angular/common/http","@angular/forms","primeng/inputtext","primeng/treetable","primeng/api","@angular/common","primeng/button","primeng/dialog","rxjs","rxjs/internal/operators","ngx-toastr","@ngx-translate/core","rxjs/operators","@angular/platform-browser","primeng/table","primeng/paginator","primeng/dropdown","primeng/inputmask","primeng/messages","primeng/message","primeng/confirmdialog","primeng/progressbar","primeng/tristatecheckbox","primeng/keyfilter","primeng/inputswitch","primeng/tabview","primeng/calendar","primeng/panel","primeng/autocomplete","primeng/fieldset","primeng/checkbox","primeng/tree","primeng/radiobutton","primeng/tabmenu","primeng/overlaypanel","primeng/tooltip","primeng/card","primeng/menubar","primeng/splitbutton","primeng/toolbar","@ngx-translate/http-loader","@angular/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["visorus-erp-core"]={},e.ng.core,e.ng.common.http,e.ng.forms,e.i6,e.i4,e.i4$1,e.ng.common,e.i7,e.i4$2,e.rxjs,e.rxjs["internal/operators"],e.i1$1,e.i3,e.rxjs.operators,e.ng.platformBrowser,e.i8$1,e.i10,e.i23,e.i24,e.i25,e.i26,e.i28,e.i29,e.i30,e.i31,e.i32,e.i34,e.i20,e.i35,e.i17,e.i38,e.i16,e.i39,e.i15,e.i40,e.i14,e.i13,e.i12,e.i41,e.i37,e.i36,e.httpLoader,e.ng.router)}(this,(function(e,t,n,o,r,i,a,l,s,c,u,p,d,m,f,h,g,v,b,S,y,x,C,w,I,E,M,A,j,k,P,_,O,T,D,B,H,F,U,z,q,R,L,N){"use strict";var V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Z(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))}function G(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,o=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(6===l[0]&&i.label<r[1]){i.label=r[1],r=l;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(l);break}r[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],o=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}Object.create;function W(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Y=function(){function e(e){this.http=e}return e.prototype.setConfiguracion=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))}))},e.prototype.obtieneConfiguracion=function(){return JSON.parse(localStorage.getItem("config"))},e.prototype.getUrl=function(e){return this.obtieneConfiguracion().url+(e?"/"+e:"")},e.prototype.auth=function(e){return this.http.post(this.getUrl()+"/login",e)},e.prototype.getUsuarioActual=function(){return this.http.get(this.getUrl()+"/usuario/obtieneUsuarioActual",this.buildAuth())},e.prototype.buildAuth=function(){var e=this.getUsuario();return{headers:new n.HttpHeaders({Authorization:e.token_type+" "+e.access_token,"Content-Type":"application/json",Accept:"application/json"})}},e.prototype.validateEndPoint=function(){return this.http.get(this.getUrl()+"/validate",this.buildAuth())},e.prototype.closeEndPoint=function(){localStorage.removeItem("usuario"),this.setUsuarioInstance(null)},e.prototype.getUsuario=function(){return JSON.parse(localStorage.getItem("usuario"))},e.prototype.setUsuarioInstance=function(e){this.usuarioInstance=e},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.setModulo=function(e){return this.http.post(this.getUrl()+"/usuario/setModulo",e,this.buildAuth())},e}(),K=function(e){function t(t,n){var o=e.call(this,t)||this;return o.httpCliente=t,o.url=n,o.urlComponente=o.url,o}return J(t,e),t.prototype.serializeParams=function(e){var t="";return e.map((function(e,n){void 0!==e.value&&(t+=(0==n?"?":"&")+e.param+"="+e.value)})),t},t.prototype.getHttp=function(){return this.httpCliente},t.prototype.geturl=function(){return this.getUrl(this.urlComponente)},t.prototype.getBaseUrl=function(){return this.getUrl("")},t.prototype.getByUrl=function(e,t){return this.httpCliente.get(this.getUrl(e)+this.serializeParams(t),this.buildAuth())},t.prototype.getAll=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+(e?this.serializeParams(e):""),this.buildAuth())},t.prototype.get=function(e){return this.httpCliente.get(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t.prototype.save=function(e){return this.httpCliente.post(this.getUrl(this.urlComponente),e,this.buildAuth())},t.prototype.update=function(e){return this.httpCliente.put(this.getUrl(this.urlComponente)+"/"+e.id,e,this.buildAuth())},t.prototype.delete=function(e){return this.httpCliente.delete(this.getUrl(this.urlComponente)+"/"+e,this.buildAuth())},t}(Y),Q=function(e){function t(t){var n=e.call(this,t,"cuentaContable")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtieneCuentasContablesRecursivo=function(){return this.httpClient.get(this.getUrl("cuentaContable")+"/obtieneCuentasContablesRecursivo",this.buildAuth())},t}(K);function X(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",5),t.ɵɵtext(2,"Cuenta contable"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",5),t.ɵɵtext(4,"Descripción"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",6),t.ɵɵtext(6,"Naturaleza"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th",7),t.ɵɵtext(8,"Tipo"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"th",8),t.ɵɵtext(10,"Acciones"),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function ee(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",16),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function te(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",16),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵnextContext().rowData;return t.ɵɵnextContext().selectCuentaContable(e)})),t.ɵɵelementEnd()}}function ne(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",9),t.ɵɵelement(2,"p-treeTableToggler",10),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"td",9),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"td",11),t.ɵɵtext(7),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td",12),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td",13),t.ɵɵelementStart(11,"div",14),t.ɵɵtemplate(12,ee,1,0,"button",15),t.ɵɵtemplate(13,te,1,0,"button",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit,r=n.rowData,i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("rowNode",o),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",r.cuentaContable," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.descripcion," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.naturaleza," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.tipo," "),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",1==i.typeAccount&&r.cuentaRegistro),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",2==i.typeAccount&&!r.cuentaRegistro)}}Q.ɵfac=function(e){return new(e||Q)(t.ɵɵinject(n.HttpClient))},Q.ɵprov=t.ɵɵdefineInjectable({token:Q,factory:Q.ɵfac,providedIn:"root"});var oe=function(){return{width:"100%"}},re=function(){function e(e){this._cuentaContableService=e,this.cuentasContables=[],this.maxH=720,this.query="",this.tempAccounts=[],this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.maxH=window.innerHeight-320,this.obtenerCuentasContablesRecursivo()},e.prototype.obtenerCuentasContablesRecursivo=function(){var e=this;this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe((function(t){t&&(e.cuentasContables=t,e.sortAccounts())}))},e.prototype.sortAccounts=function(){var e,t;this.cuentasContables.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var n=W(this.cuentasContables),o=n.next();!o.done;o=n.next()){var r=o.value;r.children&&this.sortItem(r)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.tempAccounts=this.cuentasContables},e.prototype.sortItem=function(e){var t,n;e.children.sort((function(e,t){var n=e.data.cuentaContable.split("."),o=t.data.cuentaContable.split(".");if(n.length>0&&o.length>0){if(n.length===o.length){for(var r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 0}if(n.length<o.length){for(r=0;r<n.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return-1}if(o.length<n.length){for(r=0;r<o.length;r++){if(parseInt(n[r])>parseInt(o[r]))return 1;if(parseInt(n[r])<parseInt(o[r]))return-1}return 1}}return 0}));try{for(var o=W(e.children),r=o.next();!r.done;r=o.next()){var i=r.value;this.sortItem(i)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.selectCuentaContable=function(e){this.evSelectedAccount.emit(e)},e.prototype.filterAccounts=function(e){if(e)this.cuentasContables=this.browseAccount(this.tempAccounts);else{var t=this.resetAccount();this.cuentasContables=t}},e.prototype.resetAccount=function(){var e,t;this.query="";var n=[];try{for(var o=W(this.tempAccounts),r=o.next();!r.done;r=o.next()){var i=r.value;n.push(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e.prototype.browseAccount=function(e){var t,n,o=[];if(""!==this.query){try{for(var r=W(e),i=r.next();!i.done;i=r.next()){var a=i.value;o=a.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase())||a.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())?o.concat({data:a.data,children:this.browseAccount(a.children)}):o.concat(this.browseAccount(a.children))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o}var l=this.resetAccount();this.cuentasContables=l},e}();re.ɵfac=function(e){return new(e||re)(t.ɵɵdirectiveInject(Q))},re.ɵcmp=t.ɵɵdefineComponent({type:re,selectors:[["lib-cclista"]],inputs:{isShared:"isShared",typeAccount:"typeAccount"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:5,vars:8,consts:[["type","text","pInputText","","placeholder","Cuenta o descripción",2,"width","100%",3,"ngModel","ngModelChange","keyup"],[2,"padding","10px"],[3,"value","scrollable","scrollHeight","resizableColumns"],["pTemplate","header"],["pTemplate","body","style","width: 100%;"],[2,"width","150px"],[2,"width","90px"],[2,"width","60px"],[2,"width","200px"],[1,"ui-resizable-column",2,"width","150px"],[3,"rowNode"],[1,"ui-resizable-column",2,"width","90px"],[1,"ui-resizable-column",2,"width","60px"],[1,"ui-resizable-column",2,"width","200px"],[1,"button-row"],["pButton","","type","button","icon","pi pi-check","class","ui-button-raised ui-button-success",3,"click",4,"ngIf"],["pButton","","type","button","icon","pi pi-check",1,"ui-button-raised","ui-button-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"input",0),t.ɵɵlistener("ngModelChange",(function(e){return n.query=e}))("keyup",(function(e){return n.filterAccounts(e)})),t.ɵɵelementEnd(),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"p-treeTable",2),t.ɵɵtemplate(3,X,11,0,"ng-template",3),t.ɵɵtemplate(4,ne,14,7,"ng-template",4),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngModel",n.query),t.ɵɵadvance(2),t.ɵɵstyleMap(t.ɵɵpureFunction0(7,oe)),t.ɵɵproperty("value",n.cuentasContables?n.cuentasContables:n.tempAccounts)("scrollable",!0)("scrollHeight",n.maxH+"px")("resizableColumns",!0))},directives:[o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,i.TreeTable,a.PrimeTemplate,i.TreeTableToggler,l.NgIf,s.ButtonDirective],styles:[""]});var ie=["dialog"],ae=function(e){return{width:e,"min-width":"200px"}},le=function(e){return{height:e}},se=function(){function e(){this.cuentasContables=[],this.maxH=720,this.maxW=0,this.flagModal=!0,this.size=350,this.maxH=window.innerHeight-370,this.maxW=window.innerWidth,this.size=this.maxW-50,this.evSelectedAccount=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.getAccount=function(e){this.evSelectedAccount.emit(e)},e.prototype.hiddenDialog=function(e){this.evSelectedAccount.emit(null)},e}();se.ɵfac=function(e){return new(e||se)},se.ɵcmp=t.ɵɵdefineComponent({type:se,selectors:[["lib-ccseleccion-dialog"]],viewQuery:function(e,n){var o;(1&e&&t.ɵɵstaticViewQuery(ie,!0),2&e)&&(t.ɵɵqueryRefresh(o=t.ɵɵloadQuery())&&(n.dialog=o.first))},inputs:{tipoCuenta:"tipoCuenta",displayShowCuentas:"displayShowCuentas"},outputs:{evSelectedAccount:"evSelectedAccount"},decls:3,vars:17,consts:[["header","Selecciona cuenta contable",3,"visible","modal","minY","baseZIndex","blockScroll","draggable","maximizable","visibleChange","onHide"],[1,"padding10",3,"ngStyle"],[3,"isShared","typeAccount","evSelectedAccount"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.displayShowCuentas=e}))("onHide",(function(e){return n.hiddenDialog(e)})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"lib-cclista",2),t.ɵɵlistener("evSelectedAccount",(function(e){return n.getAccount(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(13,ae,n.size+"px")),t.ɵɵproperty("visible",n.displayShowCuentas)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("draggable",!1)("blockScroll",!0)("maximizable",!0),t.ɵɵadvance(1),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(15,le,n.maxH+200+"px")),t.ɵɵadvance(1),t.ɵɵproperty("isShared",!0)("typeAccount",n.tipoCuenta))},directives:[c.Dialog,l.NgStyle,re],styles:[""]});var ce=function(){function e(){this.modal=new t.EventEmitter}return e.prototype.showModal=function(){this.modal.emit(!0)},e}();ce.ɵfac=function(e){return new(e||ce)},ce.ɵprov=t.ɵɵdefineInjectable({token:ce,factory:ce.ɵfac,providedIn:"root"});var ue=function(){function e(){this._loading=!1,this.loadingStatus=new u.Subject}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingStatus.next(e)},enumerable:!1,configurable:!0}),e.prototype.startLoading=function(){this.loading=!0},e.prototype.stopLoading=function(){this.loading=!1},e}();ue.ɵfac=function(e){return new(e||ue)},ue.ɵprov=t.ɵɵdefineInjectable({token:ue,factory:ue.ɵfac,providedIn:"root"});var pe=function(){function e(e,t,n){this.loginModalService=e,this.toastrService=t,this.loadingScreenService=n}return e.prototype.intercept=function(e,t){var n=this;return this.loadingScreenService.startLoading(),t.handle(e).pipe(p.catchError((function(e,t){return n.loadingScreenService.stopLoading(),n.handleError(e),u.throwError(e)})),p.tap((function(e){var t=e.body?e.body:null;if(0!==e.type&&4===e.type&&n.loadingScreenService.stopLoading(),t){var o=t.success?t.success:null;o&&n.toastrService.success(o,"Exito",{timeOut:3e3,closeButton:!0})}})))},e.prototype.handleError=function(e){return 401===e.status||403===e.status?(401===e.status&&this.loginModalService.showModal(),403===e.status&&this.toastrService.error("No tiene permiso sobre esta accion","Error",{timeOut:5e3}),u.of(e.message)):(401!==e.status&&403!==e.status&&409!==e.status&&this.toastrService.error("Ocurrio un error al procesar su solicitud","Error",{timeOut:5e3}),this.readError(e),u.of(e))},e.prototype.readError=function(e){if(e.error&&(e.error.error&&e.error.error.message&&this.toastrService.error(e.error.error.message,"Error",{timeOut:3e3}),e.error.message&&this.toastrService.error(e.error.message,"Error",{timeOut:3e3}),e.error._errors&&Array.isArray(e.error._errors)))for(var t=0;t<e.error._errors.length;t++)this.toastrService.error(e.error._errors[t].message,"Error",{timeOut:3e3,closeButton:!0})},e}();pe.ɵfac=function(e){return new(e||pe)(t.ɵɵinject(ce),t.ɵɵinject(d.ToastrService),t.ɵɵinject(ue))},pe.ɵprov=t.ɵɵdefineInjectable({token:pe,factory:pe.ɵfac});var de=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();de.ɵfac=function(e){return new(e||de)},de.ɵcmp=t.ɵɵdefineComponent({type:de,selectors:[["app-error404"]],decls:9,vars:0,consts:[[1,"col-md-12","sec_sof"],[1,"row"],[1,"col","col-center"],[1,"center"],[1,"error"],[1,"col-12"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵtext(5," Error 404 "),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"p"),t.ɵɵtext(8,"La pagina solicitada no fue encontrada"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".error[_ngcontent-%COMP%]{font-size:70px}"]});var me=function(){function e(){this.loading=new t.EventEmitter}return e.prototype.setLoading=function(e){e?this.start():this.stop()},e.prototype.start=function(){this.loading.emit(!0)},e.prototype.stop=function(){this.loading.emit(!1)},e}();me.ɵfac=function(e){return new(e||me)},me.ɵprov=t.ɵɵdefineInjectable({token:me,factory:me.ɵfac,providedIn:"root"});var fe=function(e){var t=this;this.loadingService=e,this.visible=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){e&&!t.visible?($("#modal_loading").modal("show"),t.visible=!0):(setTimeout((function(){$("#modal_loading").modal("hide")}),650),t.visible=!1)}))};fe.ɵfac=function(e){return new(e||fe)(t.ɵɵdirectiveInject(me))},fe.ɵcmp=t.ɵɵdefineComponent({type:fe,selectors:[["loading"]],inputs:{logo_loading:"logo_loading"},decls:14,vars:4,consts:[["id","modal_loading","tabindex","-1","role","dialog","aria-labelledby","exampleModalScrollableTitle","data-backdrop","static","data-keyboard","false","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],[1,"col-lg-4","col-md-4","col-sm-10"],[1,"loader"],[1,"box"],[1,"code"],["width","200px",3,"src"],[1,"txt"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelementStart(5,"div",5),t.ɵɵelementStart(6,"div",6),t.ɵɵelement(7,"span",7),t.ɵɵelement(8,"span",7),t.ɵɵelementStart(9,"div",8),t.ɵɵelement(10,"img",9),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"span",10),t.ɵɵtext(12),t.ɵɵpipe(13,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(10),t.ɵɵpropertyInterpolate("src",n.logo_loading,t.ɵɵsanitizeUrl),t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(13,2,"cargando"),"..."))},pipes:[m.TranslatePipe],styles:['.loader[_ngcontent-%COMP%]{height:170px;position:relative;width:130px}.loader[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%]:before{bottom:30px;content:"";height:0;left:15px;position:absolute;transform:scale(0);transition:all .2s ease;width:0;z-index:1}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{bottom:-30px;color:#fff;font-family:Abel,sans-serif;font-size:12px;left:-7%;letter-spacing:2px;position:absolute;text-align:center;width:120%}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{-webkit-animation-duration:.8s;-webkit-animation-iteration-count:infinite;-webkit-animation-name:spaceboots;-webkit-animation-timing-function:linear;-webkit-transform-origin:50% 50%;bottom:-3px;position:absolute;z-index:99}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{color:#fff;display:block;height:140px;left:28px;overflow:hidden;position:absolute;width:100%;z-index:2}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:after, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;left:0;opacity:0;position:absolute;text-rendering:auto;top:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:before{animation:a 1.1s linear infinite;content:"\\f13b";font-size:20px}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:first-child:after{animation:b 1.3s linear infinite;content:"\\f13c"}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):before{animation:c .9s linear infinite;content:"\\f121";font-size:25px}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):after{animation:d .7s linear infinite;content:"\\f19a "}.loader.amit[_ngcontent-%COMP%]:after, .loader.amit[_ngcontent-%COMP%]:before{transform:scale(1)}@keyframes a{0%{opacity:0;transform:translate(30px) rotate(30deg)}to{opacity:1;transform:translate(30px,150px) rotate(-50deg)}}@keyframes b{0%{opacity:0;transform:translate(50px) rotate(-40deg)}to{opacity:1;transform:translate(40px,150px) rotate(80deg)}}@keyframes c{0%{opacity:0;transform:translate(70px) rotate(10deg)}to{opacity:1;transform:translate(60px,150px) rotate(70deg)}}@keyframes d{0%{opacity:0;transform:translate(30px) rotate(-50deg)}to{opacity:1;transform:translate(45px,150px) rotate(30deg)}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{background-color:hsla(0,0%,100%,0)!important;border:0!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}']});var he=function(){function e(e,t,n,o){var r=this;this.loadingScreenService=e,this._elmRef=t,this._changeDetectorRef=n,this.loadingService=o,this.debounceTime=250,this.loading=!1,this.logo_loading="assets/img/logo_visorus_loading.png",this.loadingService.loading.subscribe((function(e){r._elmRef.nativeElement.style.display=e?"block":"none"}))}return e.prototype.ngAfterViewInit=function(){var e=this;this._elmRef.nativeElement.style.display="none",this.loadingSubscription=this.loadingScreenService.loadingStatus.pipe(f.debounceTime(this.debounceTime)).subscribe((function(t){e._elmRef.nativeElement.style.display=t?"block":"none",e._changeDetectorRef.detectChanges()}))},e.prototype.ngOnDestroy=function(){this.loadingSubscription.unsubscribe()},e}();he.ɵfac=function(e){return new(e||he)(t.ɵɵdirectiveInject(ue),t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(me))},he.ɵcmp=t.ɵɵdefineComponent({type:he,selectors:[["app-loading-screen"]],inputs:{logo_loading:"logo_loading"},decls:10,vars:0,consts:[[1,"loading-screen-wrapper"],[1,"loading-screen-icon"],[1,"blobs"],[1,"blob-center"],[1,"blob"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelement(3,"div",3),t.ɵɵelement(4,"div",4),t.ɵɵelement(5,"div",4),t.ɵɵelement(6,"div",4),t.ɵɵelement(7,"div",4),t.ɵɵelement(8,"div",4),t.ɵɵelement(9,"div",4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())},styles:[".loading-screen-wrapper[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.384);display:block;height:100%;position:fixed;width:100%;z-index:100000}.loading-screen-icon[_ngcontent-%COMP%]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{border-radius:70px;filter:url(#goo);height:300px;overflow:hidden;position:relative;transform-style:preserve-3d;width:300px}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{animation:blob-grow 3.4s linear infinite;box-shadow:0 -10px 40px -5px #475158;transform-origin:left top;transform-style:preserve-3d}.blob[_ngcontent-%COMP%], .blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{background:#475158;border-radius:50%;height:30px;left:50%;position:absolute;top:50%;transform:scale(.9) translate(-50%,-50%);width:30px}.blob[_ngcontent-%COMP%]{animation:blobs 3.4s ease-out infinite;opacity:0;transform-origin:center top}.blob[_ngcontent-%COMP%]:first-child{animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}99%{opacity:1}to{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,39%{transform:scale(0) translate(-50%,-50%)}40%,42%{transform:scaleY(.9) translate(-50%,-50%)}43%,44%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}90%,91%{transform:scaleY(.9) translate(-50%,-50%)}92%,to{transform:scale(0) translate(-50%,-50%)}}"]});var ge=function(){function e(){this.visible=new t.EventEmitter,this.print=new t.EventEmitter}return e.prototype.pdf_generate=function(e){this.base_64=e,this.visible.emit(!0)},e.prototype.generate_print=function(e){this.html=e,this.print.emit(!0)},e}();ge.ɵfac=function(e){return new(e||ge)},ge.ɵprov=t.ɵɵdefineInjectable({token:ge,factory:ge.ɵfac,providedIn:"root"});var ve=function(){function e(e,t){this._toastrService=e,this.translate=t}return e.prototype.addFile=function(e,t){var n=this;void 0===t&&(t=!0);var o=e.target.files[0],r={id:null,nombre:"",contentType:"",orden:0,archivo:""};r.nombre=o.name,r.tipo=o.type;var i=new FileReader;return i.readAsDataURL(o),i.onload=function(){r.archivo=i.result,n.translate.get(["msgSuccess","titleFile"]).subscribe((function(e){t&&n._toastrService.success(e.msgSuccess,e.titleFile)}))},i.onerror=function(e){n.translate.get(["msgError","titleFile"]).subscribe((function(e){t&&n._toastrService.error(e.msgError,e.titleFile)}))},r},e.prototype.base64ToBlob=function(e,t){for(var n=atob(e),o=new Array(n.length),r=0;r<n.length;r++)o[r]=n.charCodeAt(r);var i=new Uint8Array(o);return new Blob([i],{type:t})},e.prototype.blobToDowload=function(e,t,n){var o=document.createElement("a");o.download=n,o.href=window.URL.createObjectURL(e),o.dataset.downloadurl=[t,o.download,o.href].join(":"),o.click()},e.prototype.base64ToFileDowload=function(e,t,n){this.blobToDowload(this.base64ToBlob(e,t),t,n)},e}();function be(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",2),t.ɵɵelement(1,"iframe",3),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("src",o.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+o.pdfBase64),t.ɵɵsanitizeResourceUrl)}}ve.ɵfac=function(e){return new(e||ve)(t.ɵɵinject(d.ToastrService),t.ɵɵinject(m.TranslateService))},ve.ɵprov=t.ɵɵdefineInjectable({token:ve,factory:ve.ɵfac,providedIn:"root"});var Se=function(e){return{width:e,"min-width":"200px"}},ye=function(){return{overflow:"visible"}},xe=function(){function e(e,t,n){var o=this;this._pdfModalService=e,this.fileService=t,this.domSanitizer=n,this.display=!1,this.pdfBase64=null,this.size=840,e.visible.subscribe((function(t){e.base_64&&(o.display=t,o.pdfBase64=e.base_64)})),e.print.subscribe((function(e){o.display=e,setTimeout((function(){document.getElementById("_modal_pdf").innerHTML="<iframe id='printf' width='100%' height='100%' ></iframe>"}),20),setTimeout((function(){o.imprimir()}),40)}))}return e.prototype.imprimir=function(){var e=window.frames.printf;e.contentWindow.head.innerHTML=' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">\n <style>\n .table-hover tbody tr:hover {\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .tr-select{\n color: #ffffff;\n background-color: rgb(92, 180, 234);\n }\n .td-header{\n background: #f3f3f3;\n color: #0d385d;\n border-color: 1px solid #0b4b87;\n }\n .td-yellow{\n background: #fff6d3;\n }\n .td-blue{\n background: #88d1ea;\n }\n .td-green{\n background: #b9d2a0;\n }\n </style>',e.contentWindow.body.innerHTML=this._pdfModalService.html},e}();xe.ɵfac=function(e){return new(e||xe)(t.ɵɵdirectiveInject(ge),t.ɵɵdirectiveInject(ve),t.ɵɵdirectiveInject(h.DomSanitizer))},xe.ɵcmp=t.ɵɵdefineComponent({type:xe,selectors:[["pdf-modal"]],decls:2,vars:15,consts:[[3,"visible","modal","minY","baseZIndex","blockScroll","maximizable","breakpoint","contentStyle","visibleChange"],["style","min-height: 90vh;",4,"ngIf"],[2,"min-height","90vh"],[2,"width","100%","height","90vh",3,"src"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.display=e})),t.ɵɵtemplate(1,be,2,1,"div",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(12,Se,n.size+"px")),t.ɵɵproperty("visible",n.display)("modal",!0)("minY",70)("baseZIndex",1e4)("blockScroll",!0)("blockScroll",!0)("maximizable",!0)("breakpoint",840)("contentStyle",t.ɵɵpureFunction0(14,ye)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.pdfBase64))},directives:[c.Dialog,l.NgIf],styles:[".down[_ngcontent-%COMP%]{display:block}"]});var Ce=function(){},we=function(){},Ie=function(){function e(e,n){this.httpClient=e,this.loadingService=n,this.url_host="",this.login=new t.EventEmitter,this.seleccionEmpresa=new t.EventEmitter,this.auth=new we}return e.prototype.setlogin=function(e,t){localStorage.setItem("lang","es");var n=JSON.parse(localStorage.getItem("config"));return n&&n.url&&(this.url_host=n.url),this.httpClient.post(this.url_host+"/login"+(t?"/"+t:""),e)},e.prototype.startAuth=function(e){this.auth=e,this.login.emit(this.auth)},e.prototype.isLogin=function(){return null!==localStorage.getItem("usuario")},e.prototype.quitarUsuario=function(){localStorage.removeItem("usuario"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.verificaLogin=function(){var e=this;this.usuario=this.getUser(),this.usuario.access_token?this.getDetalsUser().subscribe((function(t){e.auth.usuarioDetalles=t,e.auth.login=!0,e.login.emit(e.auth)}),(function(t){e.quitarUsuario()})):(this.auth.usuarioDetalles=null,this.auth.login=!1,this.login.emit(this.auth))},e.prototype.loginOut=function(){this.quitarEmpresaAdministrativa().subscribe((function(e){localStorage.removeItem("usuario")}),(function(e){localStorage.removeItem("usuario")})),localStorage.setItem("lang","es"),this.auth.login=!1,this.login.emit(this.auth)},e.prototype.getUser=function(){if(this.usuario=new Ce,this.isLogin()){var e=localStorage.getItem("usuario");return e&&(this.usuario=JSON.parse(e)),this.usuario}return this.usuario},e.prototype.getLang=function(){var e=localStorage.getItem("lang");return e||"es"},e.prototype.selectEmpresa=function(e){this.seleccionEmpresa.emit(e)},e.prototype.quitarEmpresaAdministrativa=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",{id:0},r)},e.prototype.setEmpresa=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setEmpresa",e,i)},e.prototype.setModulo=function(e){var t,o="",r="";(t=JSON.parse(localStorage.getItem("usuario")))&&(o=t.token_type,r=t.access_token);var i={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:o+" "+r})},a=JSON.parse(localStorage.getItem("config"));return a&&a.url&&(this.url_host=a.url),this.httpClient.post(this.url_host+"/usuario/setModulo",e,i)},e.prototype.quitarModulo=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.post(this.url_host+"/usuario/setModulo",{id:0},r)},e.prototype.getDetalsUser=function(){var e,t="",o="";(e=JSON.parse(localStorage.getItem("usuario")))&&(t=e.token_type,o=e.access_token);var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t+" "+o})},i=JSON.parse(localStorage.getItem("config"));return i&&i.url&&(this.url_host=i.url),this.httpClient.get(this.url_host+"/usuario/obtieneUsuarioActual",r)},e}();function Ee(e,n){1&e&&(t.ɵɵelementStart(0,"label",19),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"Usuario.errorLogin")))}function Me(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",8),t.ɵɵelementStart(2,"form",9,10),t.ɵɵlistener("ngSubmit",(function(){t.ɵɵrestoreView(o);var e=t.ɵɵreference(3);return t.ɵɵnextContext().entrar(e)})),t.ɵɵtemplate(4,Ee,3,3,"label",11),t.ɵɵelementStart(5,"div",12),t.ɵɵelementStart(6,"label",13),t.ɵɵtext(7),t.ɵɵpipe(8,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"input",14,15),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.username=e})),t.ɵɵpipe(11,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"div",12),t.ɵɵelementStart(13,"label",16),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"input",17),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().user.password=e})),t.ɵɵpipe(17,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(18,"button",18),t.ɵɵtext(19,"entrar"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngIf",r.error),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(8,7,"Usuario.username")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(11,9,"Usuario.username")),t.ɵɵproperty("ngModel",r.user.username),t.ɵɵadvance(5),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,11,"Usuario.password")),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("placeholder",t.ɵɵpipeBind1(17,13,"Usuario.password")),t.ɵɵproperty("ngModel",r.user.password)}}function Ae(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",22),t.ɵɵelementStart(1,"div",23),t.ɵɵelementStart(2,"div",24),t.ɵɵelementStart(3,"h5"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(4),t.ɵɵtextInterpolate1(" ",o.nombre," ")}}function je(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"div",20),t.ɵɵelementStart(2,"h4"),t.ɵɵtext(3,"Selecciona la empresa"),t.ɵɵelementEnd(),t.ɵɵelement(4,"hr"),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Ae,5,1,"div",21),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(5),t.ɵɵproperty("ngForOf",o.empresas)}}Ie.ɵfac=function(e){return new(e||Ie)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(me))},Ie.ɵprov=t.ɵɵdefineInjectable({token:Ie,factory:Ie.ɵfac,providedIn:"root"});var ke=function(){function e(e,t){var n=this;this.loginModalService=e,this.authService=t,this.modal=!1,this.user={username:void 0,password:void 0},this.error=!1,this.empresas=[],this.loginModalService.modal.subscribe((function(e){$("#modalLogin").modal("show"),n.user={username:void 0,password:void 0},n.empresas=[]}))}return e.prototype.entrar=function(e){var t=this;if(e.valid){this.user.key="";var n=this.user.password.split("_");if(n.length>1){this.user.key=n[0],this.user.password="";for(var o=1;o<n.length;o++)this.user.password+=n[o]}this.authService.setlogin(this.user,this.user.key).subscribe((function(e){localStorage.setItem("usuario",JSON.stringify(e));var n=e;t.authService.getDetalsUser().subscribe((function(e){e.empresa||(t.empresas=e.empresas,1==t.empresas.length&&t.entrarEmpresa(t.empresas[0]));var o={login:!0};o.usuario=n,o.usuarioDetalles=e,t.authService.startAuth(o),t.error=!1,$("#modalLogin").modal("hide")}))}),(function(e){t.error=!0}))}},e.prototype.entrarEmpresa=function(e){this.authService.setEmpresa(e).subscribe((function(e){$("#modalLogin").modal("hide")}))},e}();ke.ɵfac=function(e){return new(e||ke)(t.ɵɵdirectiveInject(ce),t.ɵɵdirectiveInject(Ie))},ke.ɵcmp=t.ɵɵdefineComponent({type:ke,selectors:[["app-login-modal"]],decls:8,vars:2,consts:[["id","modalLogin","tabindex","-1","role","dialog","aria-labelledby","exampleModalCenterTitle","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-centered"],[1,"modal-content"],[1,"modal-body"],[1,"row","justify-content-center"],["src","assets/img/logo_visorus_loading.png","alt",""],["class","row",4,"ngIf"],[1,"row"],[1,"col-lg-12","col-md-12","col-sm-12"],[3,"ngSubmit"],["datoForm","ngForm"],["class","error",4,"ngIf"],[1,"form-group","mb-3"],["for","exampleInputEmail1"],["type","text","id","exampleInputEmail1","aria-describedby","emailHelp","name","username","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["username","ngModel"],["for","exampleInputPassword1"],["type","password","id","exampleInputPassword1","name","password","required","",1,"form-control",3,"placeholder","ngModel","ngModelChange"],["type","submit","translate","",1,"btn","btn-primary_low","btn-lg","btn-block","my-5","text-light"],[1,"error"],[1,"col-xl-12","col-lg-12","col-sm-12"],["class","col-xl-6 col-lg-6 col-sm-12 mb-2","style","cursor: pointer",4,"ngFor","ngForOf"],[1,"col-xl-6","col-lg-6","col-sm-12","mb-2",2,"cursor","pointer"],[1,"card"],[1,"card-body"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelement(5,"img",5),t.ɵɵelementEnd(),t.ɵɵtemplate(6,Me,20,15,"div",6),t.ɵɵtemplate(7,je,6,1,"div",6),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(6),t.ɵɵproperty("ngIf",0==n.empresas.length),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.empresas.length))},directives:[l.NgIf,o.ɵangular_packages_forms_forms_y,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,o.NgControlStatus,o.NgModel,m.TranslateDirective,l.NgForOf],pipes:[m.TranslatePipe],styles:[".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-invalid[_ngcontent-%COMP%]:not(form), .ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"]});var Pe=function(e){function t(t){var n=e.call(this,t,"sessionCaja")||this;return n.httpClient=t,n}return J(t,e),t}(K);function _e(e,n){if(1&e&&(t.ɵɵelementStart(0,"a",4),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1("",o.labels.title,": ")}}function Oe(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",5),t.ɵɵelementStart(1,"div",6),t.ɵɵelementStart(2,"label",7),t.ɵɵtext(3,"Nombre de caja: "),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"input",8),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().caja.nombre=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"div",9),t.ɵɵelementStart(6,"label",10),t.ɵɵtext(7,"Saldo: "),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"input",11),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.monto=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"div",9),t.ɵɵelementStart(10,"label",12),t.ɵɵtext(11,"Numero Z:"),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"input",13),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().session.z=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.caja.nombre)("disabled",!0),t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.monto)("disabled",r.editMode),t.ɵɵadvance(4),t.ɵɵproperty("ngModel",r.session.z)("disabled",!0)}}function Te(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",17),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext(2).save()})),t.ɵɵelementEnd()}}function De(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",18),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext(2).edit()})),t.ɵɵelementEnd()}}function Be(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵtemplate(0,Te,1,0,"button",14),t.ɵɵtemplate(1,De,1,0,"button",15),t.ɵɵelementStart(2,"button",16),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(o),t.ɵɵnextContext().closeModal()})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("ngIf",!r.editMode&&r.caja),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.editMode&&r.caja)}}Pe.ɵfac=function(e){return new(e||Pe)(t.ɵɵinject(n.HttpClient))},Pe.ɵprov=t.ɵɵdefineInjectable({token:Pe,factory:Pe.ɵfac,providedIn:"root"});var He=function(){return{width:"750px"}},Fe=function(){function e(e){this.sessionCajaService=e,this.showCreateSession=!1,this.caja={},this.sessionEdit=null,this.status=new t.EventEmitter,this.success=new t.EventEmitter,this.session={inicio:(new Date).getTime(),termino:null,monedaDenominacionList:[]},this.flagModal=!0,this.labels={title:"Crear nueva session de caja"},this.resp={},this.editMode=!1}return e.prototype.ngOnInit=function(){console.log("denominacionList",this.monedaDenominacionList)},e.prototype.setSession=function(){this.sessionEdit?(this.session=this.sessionEdit,this.session.monedaDenominacionList=this.monedaDenominacionList,this.session.movimientosCaja&&(this.session.monto=this.session.movimientosCaja[0].monto),this.labels={title:"Cerrar session"},this.editMode=!0):this.caja&&(this.labels.title="Crear nueva session de caja",this.session.caja=this.caja,this.session.z=this.caja.z)},e.prototype.closeModal=function(){this.session={},this.editMode=!1,this.status.emit({status:!1})},e.prototype.save=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return e=this,[4,this.sessionCajaService.save(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp?(this.session={},this.editMode=!1,this.status.emit({status:!1,save:this.resp.data}),this.success.emit(!0)):this.success.emit(!1),[2]}}))}))},e.prototype.edit=function(){return Z(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return console.log("EDIT",this.session),e=this,[4,this.sessionCajaService.update(this.session).toPromise()];case 1:return e.resp=t.sent()||null,this.resp&&(this.session={},this.editMode=!1,this.status.emit({status:!1,update:this.resp.data})),[2]}}))}))},e}();Fe.ɵfac=function(e){return new(e||Fe)(t.ɵɵdirectiveInject(Pe))},Fe.ɵcmp=t.ɵɵdefineComponent({type:Fe,selectors:[["session-create"]],inputs:{showCreateSession:"showCreateSession",caja:"caja",monedaDenominacionList:"monedaDenominacionList",sessionEdit:"sessionEdit"},outputs:{status:"status",success:"success"},decls:6,vars:9,consts:[[3,"visible","modal","closeOnEscape","closable","blockScroll","visibleChange","onHide","onShow"],["pTemplate","header"],["class","grid grid-fluid",4,"ngIf"],["pTemplate","footer"],[1,"text-primary"],[1,"grid","grid-fluid"],[1,"p-field","col-12"],["for","nombreCaja"],["pInputText","","type","text","id","nombreCaja",3,"ngModel","disabled","ngModelChange"],[1,"p-field","col-12","md:col-6"],["for","saldoCaja"],["pInputText","","type","number","id","saldoCaja",3,"ngModel","disabled","ngModelChange"],["for","numeroZ"],["pInputText","","type","number","id","numeroZ",3,"ngModel","disabled","ngModelChange"],["pButton","","type","button","label","Guardar","class","p-button-sm",3,"click",4,"ngIf"],["pButton","","type","button","label","Cerrar session","class","p-button-sm p-button-success",3,"click",4,"ngIf"],["pButton","","type","button","label","Cancelar",1,"p-button-sm","p-button-danger",3,"click"],["pButton","","type","button","label","Guardar",1,"p-button-sm",3,"click"],["pButton","","type","button","label","Cerrar session",1,"p-button-sm","p-button-success",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showCreateSession=e}))("onHide",(function(){return n.closeModal()}))("onShow",(function(){return n.setSession()})),t.ɵɵtemplate(1,_e,2,1,"ng-template",1),t.ɵɵtemplate(2,Oe,13,6,"div",2),t.ɵɵelementStart(3,"div"),t.ɵɵtext(4," Este agente no esta asignado a una caja "),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Be,3,2,"ng-template",3),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction0(8,He)),t.ɵɵproperty("visible",n.showCreateSession)("modal",n.flagModal)("closeOnEscape",n.flagModal)("closable",n.flagModal)("blockScroll",!0),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",n.caja))},directives:[c.Dialog,a.PrimeTemplate,l.NgIf,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,o.NumberValueAccessor,s.ButtonDirective],styles:[""]});var Ue=function(e){function t(t){return e.call(this,t,"/cliente")||this}return J(t,e),t.prototype.validar_archivos_bss=function(e){return this.getHttp().get(this.getUrl("/cliente/validarClienteBss/")+e,this.buildAuth())},t}(K);Ue.ɵfac=function(e){return new(e||Ue)(t.ɵɵinject(n.HttpClient))},Ue.ɵprov=t.ɵɵdefineInjectable({token:Ue,factory:Ue.ɵfac,providedIn:"root"});var ze=function(){function e(e){this.translate=e}return e.prototype.getPage=function(){return{rows:25,total:void 0,offset:0,filtro:void 0,sort:void 0}},e.prototype.getParams=function(e){return[{param:"offset",value:e.offset},{param:"max",value:e.rows},{param:"filter",value:e.filtro},{param:"sort",value:e.sort}]},e.prototype.getOrden=function(e,t){t&&this.translate.setDefaultLang(t);for(var n,o=[],r=[],i=0;i<e.length;i++)o.push({label:"...",value:e[i].label}),r.push(e[i].param);return r.length>0&&this.translate.get(r).subscribe((function(e){n=e;var t=Object.values(n),r=0;o.forEach((function(e){e.label=""+t[r],r++}))}),(function(e){})),o},e}();function qe(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"Cliente.limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"Cliente.plazoCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"Cliente.diasPago")))}function Re(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function Le(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function Ne(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",8),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,Re,3,3,"span",9),t.ɵɵtemplate(7,Le,3,3,"span",9),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.plazoCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.diasPago)}}function Ve(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td",10),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,1,"general.noRegistros")))}ze.ɵfac=function(e){return new(e||ze)(t.ɵɵinject(m.TranslateService))},ze.ɵprov=t.ɵɵdefineInjectable({token:ze,factory:ze.ɵfac,providedIn:"root"});var $e=function(){function e(e,n){this.clienteService=e,this.paginate=n,this.selectMode="single",this.select=new t.EventEmitter,this.ordenar=[],this.loading=!0}return e.prototype.ngOnInit=function(){this.page=this.paginate.getPage(),this.page.rows=20,this.clientes=[],this.ordenar=this.paginate.getOrden([{param:"razonZocial",label:"razonZocial"}],"es")},e.prototype.cargarDatosClientes=function(e){var t=this;void 0===e&&(e=null),this.loading=!0,e&&(this.page.rows=e.rows,this.page.offset=e.first),this.clientes=[],this.params=this.paginate.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.page.filtro&&""!==this.page.filtro.trim()&&this.params.push({param:"filtroGeneral",value:this.page.filtro.trim()}),this.clienteService.getAll(this.params).subscribe((function(e){t.page.total=e.total,t.clientes=e.data,t.loading=!1}),(function(e){console.error("Error al cargar clientes:",e),t.loading=!1}))},e.prototype.aplicarFiltro=function(){this.page.offset=0,this.cargarDatosClientes()},e.prototype.seleccionaCliente=function(e){console.log("Fila seleccionada (evento):",e),console.log("Datos de la fila (e.data):",e.data),console.log("Cliente seleccionado ANTES de emitir:",this.clienteSeleccionado),this.select.emit(e.data),this.visible=!1,console.log("Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):",this.clienteSeleccionado)},e.prototype.cerrar=function(){this.select.emit(null),this.visible=!1},e}();$e.ɵfac=function(e){return new(e||$e)(t.ɵɵdirectiveInject(Ue),t.ɵɵdirectiveInject(ze))},$e.ɵcmp=t.ɵɵdefineComponent({type:$e,selectors:[["select-cliente"]],inputs:{clienteSeleccionado:"clienteSeleccionado",selectMode:"selectMode",visible:"visible"},outputs:{select:"select"},decls:10,vars:17,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","scrollHeight","350px",3,"value","lazy","paginator","rows","totalRecords","selection","selectionMode","scrollable","loading","onLazyLoad","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSelectableRow"],[4,"ngIf"],["colspan","6"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrar()}))("onShow",(function(){return n.cargarDatosClientes()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.aplicarFiltro()})),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",3),t.ɵɵlistener("click",(function(){return n.aplicarFiltro()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"p-table",4),t.ɵɵlistener("onLazyLoad",(function(e){return n.cargarDatosClientes(e)}))("selectionChange",(function(e){return n.clienteSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionaCliente(e)})),t.ɵɵtemplate(7,qe,19,18,"ng-template",5),t.ɵɵtemplate(8,Ne,14,8,"ng-template",6),t.ɵɵtemplate(9,Ve,4,3,"ng-template",7),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,13,"Seleccionar cliente ")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(4,15,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate("selectionMode",n.selectMode),t.ɵɵproperty("value",n.clientes)("lazy",!0)("paginator",!0)("rows",n.page.rows)("totalRecords",n.page.total)("selection",n.clienteSeleccionado)("scrollable",!0)("loading",n.loading))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,g.Table,a.PrimeTemplate,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe],encapsulation:2});var Je=function(){},Ze=function(){this.datoPersona=new Je,this.contactos=[],this.datoDirecciones=[]},Ge=function(){this.representanteLegal=new Ze,this.contactos=[],this.datoDirecciones=[]},We=function(){},Ye=function(){this.personaMoral=new Ge,this.catalogoTipo=new We,this.clasificadorTipo=new We,this.personaFisica=new Ze},Ke=function(e){function t(t){var n=e.call(this,t,"/proveedor")||this;return n.httpClient=t,n}return J(t,e),t}(K);function Qe(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,3,"clave")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,5,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,7,"rfc")))}function Xe(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.rowData;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc)}}Ke.ɵfac=function(e){return new(e||Ke)(t.ɵɵinject(n.HttpClient))},Ke.ɵprov=t.ɵɵdefineInjectable({token:Ke,factory:Ke.ɵfac,providedIn:"root"});var et=function(){return[10,25,50,100,500]},tt=function(){function e(e,n,o){this.proveedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.proveedorSeleccionado=new Ye,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.proveedores=[]},e.prototype.cargarDatosProveedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.proveedorService.getAll(this.params).subscribe((function(t){e.proveedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosProveedores()},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarProveedor=function(e){this.select.emit(e.data),this.visible=!1},e}();tt.ɵfac=function(e){return new(e||tt)(t.ɵɵdirectiveInject(Ke),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(m.TranslateService))},tt.ɵcmp=t.ɵɵdefineComponent({type:tt,selectors:[["select-proveedor"]],inputs:{visible:"visible",proveedorSeleccionado:"proveedorSeleccionado"},outputs:{select:"select"},decls:10,vars:16,consts:[[3,"header","visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","change"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","valueChange","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("change",(function(){return n.cargarDatosProveedores()})),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",3),t.ɵɵlistener("click",(function(){return n.cargarDatosProveedores()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"p-table",4),t.ɵɵlistener("valueChange",(function(e){return n.proveedores=e}))("selectionChange",(function(e){return n.proveedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarProveedor(e)})),t.ɵɵtemplate(7,Qe,10,9,"ng-template",5),t.ɵɵtemplate(8,Xe,7,3,"ng-template",6),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"p-paginator",7),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,11,"ArticuloProveedor.proveedores")),t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(3),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(4,13,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵproperty("value",n.proveedores)("selection",n.proveedorSeleccionado)("scrollable",!0),t.ɵɵadvance(3),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(15,et)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator],pipes:[m.TranslatePipe],encapsulation:2});var nt=function(e){function t(t){var n=e.call(this,t,"stock")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerExistenciasArticulosDescripcion=function(e,t){var n=this,o=this.getBaseUrl()+"/stock/obtenerExistenciasArticulos";return new Promise((function(r,i){n.httpClient.post(o+n.serializeParams(t),e,n.buildAuth()).subscribe((function(e){r(e)}),(function(e){i(e)}))}))},t}(K);nt.ɵfac=function(e){return new(e||nt)(t.ɵɵinject(n.HttpClient))},nt.ɵprov=t.ɵɵdefineInjectable({token:nt,factory:nt.ɵfac,providedIn:"root"});var ot=function(e){function t(t){var n=e.call(this,t,"/almacen")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerAlmacenEmpresa=function(){var e=this.geturl()+"/obtenerAlmacenEmpresa";return this.getHttp().get(e,this.buildAuth())},t}(K);ot.ɵfac=function(e){return new(e||ot)(t.ɵɵinject(n.HttpClient))},ot.ɵprov=t.ɵɵdefineInjectable({token:ot,factory:ot.ɵfac,providedIn:"root"});var rt=function(e){function t(t){var n=e.call(this,t,"articulo")||this;return n.httpClient=t,n}return J(t,e),t.prototype.obtenerExistencias=function(e){var t="/existenciasArticulo/"+e;return this.httpClient.get(this.geturl()+t,this.buildAuth())},t}(K);function it(e,n){if(1&e&&t.ɵɵelement(0,"col"),2&e){var o=n.$implicit;t.ɵɵstyleProp("width",o.width)}}function at(e,n){if(1&e&&(t.ɵɵelementStart(0,"colgroup"),t.ɵɵtemplate(1,it,1,2,"col",7),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function lt(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",9),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",o.header," ")}}function st(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵtemplate(1,lt,2,1,"th",8),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",o)}}function ct(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"td"),t.ɵɵtext(8),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"td"),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.almacenDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.ubicacionDescripcion),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.existencia)}}rt.ɵfac=function(e){return new(e||rt)(t.ɵɵinject(n.HttpClient))},rt.ɵprov=t.ɵɵdefineInjectable({token:rt,factory:rt.ɵfac,providedIn:"root"});var ut=function(e){return{width:e,"min-width":"200px"}},pt=function(){return{width:"600px"}},dt=function(){function e(e){this.articuloInformacionService=e,this.eventSelection=new t.EventEmitter,this.flagModal=!0,this.size=640,this.params=[{param:"offset",value:0},{param:"max",value:-1},{param:"order",value:"asc"}],this.columnsData=[{field:"codigo",header:"Código Almacén",width:"90px"},{field:"descripcion",header:"Descripción Almacen",width:"140px"},{field:"codigo",header:"Código Ubicación",width:"90px"},{field:"descripcion",header:"Descripción Ubicación",width:"140px"},{field:"opciones",header:"Existencia",width:"80px"}]}return e.prototype.ngOnInit=function(){this.OnLoad()},e.prototype.hiddenDialog=function(){this.eventSelection.emit({status:!1})},e.prototype.OnResize=function(e){this.isMovil=e.target.innerWidth<=640},e.prototype.OnLoad=function(){var e=this;this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe((function(t){e.existenciasList=t.data}))},e.prototype.OnShow=function(){this.titulo="Existencias en Almacenes"},e.prototype.onSelectedUbicacion=function(e){this.eventSelection.emit({status:!1,ubicacion:e})},e}();function mt(e,n){if(1&e&&(t.ɵɵelementStart(0,"option",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵpropertyInterpolate("value",o.id),t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function ft(e,n){1&e&&(t.ɵɵelementStart(0,"th",31),t.ɵɵtext(1,"existenciaSecundaria"),t.ɵɵelementEnd())}function ht(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Unidad"),t.ɵɵelementEnd())}function gt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio"),t.ɵɵelementEnd())}function vt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 2"),t.ɵɵelementEnd())}function bt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 3"),t.ɵɵelementEnd())}function St(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 4"),t.ɵɵelementEnd())}function yt(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1,"Precio 5"),t.ɵɵelementEnd())}function xt(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1,"Movimiento.costo"),t.ɵɵelementEnd())}function Ct(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.descripcion)}}function wt(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th",23),t.ɵɵtext(2,"Código Ubicacion"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"th",24),t.ɵɵtext(4,"Existencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"th",25),t.ɵɵtext(6,"Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(7,ft,2,0,"th",26),t.ɵɵtemplate(8,ht,2,0,"th",27),t.ɵɵelementStart(9,"th",23),t.ɵɵtext(10,"Código"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"th",28),t.ɵɵtext(12,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelement(13,"th",25),t.ɵɵtemplate(14,gt,2,0,"th",29),t.ɵɵtemplate(15,vt,2,0,"th",29),t.ɵɵtemplate(16,bt,2,0,"th",29),t.ɵɵtemplate(17,St,2,0,"th",29),t.ɵɵtemplate(18,yt,2,0,"th",29),t.ɵɵtemplate(19,xt,2,0,"th",27),t.ɵɵelementStart(20,"th",25),t.ɵɵtext(21,"Existencia por Unidad"),t.ɵɵelementEnd(),t.ɵɵtemplate(22,Ct,2,1,"th",30),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(7),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.manejaUnidadSecundaria),t.ɵɵadvance(6),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==o.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===o.configuracion.tipoPrecio),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",o.clasificadorList)}}function It(e,n){1&e&&(t.ɵɵelementStart(0,"td",23),t.ɵɵtext(1,"Movimiento.NoAsignado"),t.ɵɵelementEnd())}function Et(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.ubicacionCodigo)}}function Mt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",44),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.existenciaSecundaria)}}function At(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",36),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.unidadSecundariaCodigo)}}function jt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind1(2,1,o.precioConImpuestos)," ")}}function kt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio2ConImpuestos))}}function Pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio3ConImpuestos))}}function _t(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio4ConImpuestos))}}function Ot(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio5ConImpuestos))}}function Tt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",36),t.ɵɵtext(1),t.ɵɵpipe(2,"currency"),t.ɵɵelementEnd()),2&e){var o=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,o.precio))}}function Dt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",45),t.ɵɵelementStart(1,"div",46),t.ɵɵelementStart(2,"label",47),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",46),t.ɵɵelementStart(5,"label",47),t.ɵɵtext(6),t.ɵɵpipe(7,"number"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(3),t.ɵɵtextInterpolate(o.unidad_codigo),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(7,2,o.unidad_existencia,"1.2-2"))}}function Bt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",39),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(o.valor)}}function Ht(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"tr",32),t.ɵɵtemplate(1,It,2,0,"td",33),t.ɵɵtemplate(2,Et,2,1,"td",34),t.ɵɵelementStart(3,"td",35),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td",36),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵtemplate(7,Mt,2,1,"td",37),t.ɵɵtemplate(8,At,2,1,"td",38),t.ɵɵelementStart(9,"td",39),t.ɵɵtext(10),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"td",40),t.ɵɵtext(12),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"td",36),t.ɵɵelementStart(14,"button",41),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(o);var e=n.$implicit;return t.ɵɵnextContext().onShowInformacion(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(15,jt,3,3,"td",34),t.ɵɵtemplate(16,kt,3,3,"td",34),t.ɵɵtemplate(17,Pt,3,3,"td",34),t.ɵɵtemplate(18,_t,3,3,"td",34),t.ɵɵtemplate(19,Ot,3,3,"td",34),t.ɵɵtemplate(20,Tt,3,3,"td",38),t.ɵɵelementStart(21,"td",36),t.ɵɵtemplate(22,Dt,8,5,"div",42),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Bt,2,1,"td",43),t.ɵɵelementEnd()}if(2&e){var r=n.$implicit,i=t.ɵɵnextContext();t.ɵɵproperty("pSelectableRow",r),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!r.ubicacionCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.ubicacionCodigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.existencia),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.unidadCodigo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.manejaUnidadSecundaria),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.codigo),t.ɵɵadvance(2),t.ɵɵtextInterpolate(r.articulo.descripcion),t.ɵɵadvance(3),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"!==i.configuracion.tipoPrecio),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","costo"===i.configuracion.tipoPrecio),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",r.existenciaUnidades),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",r.articuloClasificadorList)}}function Ft(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"lib-seleccion-articulo-informacion",48),t.ɵɵlistener("eventSelection",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().onEventInformacion(e)})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("showModal",r.showModalInformacion)("articulo",r.articuloSelected)}}dt.ɵfac=function(e){return new(e||dt)(t.ɵɵdirectiveInject(rt))},dt.ɵcmp=t.ɵɵdefineComponent({type:dt,selectors:[["lib-seleccion-articulo-informacion"]],inputs:{showModal:"showModal",articulo:"articulo"},outputs:{eventSelection:"eventSelection"},decls:8,vars:20,consts:[[3,"header","visible","modal","minY","baseZIndex","draggable","blockScroll","maximizable","breakpoint","onShow","visibleChange","onHide","resize"],["scrollHeight","350px",3,"columns","value","scrollable","responsive"],["pTemplate","colgroup"],["pTemplate","header"],["pTemplate","body"],[1,"container-end"],["pButton","","type","button","icon","pi pi-replay","label","Cerrar",1,"ui-button-raised","ui-button-secondary",3,"click"],[3,"width",4,"ngFor","ngForOf"],["pResizableColumn","",4,"ngFor","ngForOf"],["pResizableColumn",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("onShow",(function(){return n.OnShow()}))("visibleChange",(function(e){return n.showModal=e}))("onHide",(function(){return n.hiddenDialog()}))("resize",(function(e){return n.OnResize(e)}),!1,t.ɵɵresolveWindow),t.ɵɵelementStart(1,"p-table",1),t.ɵɵtemplate(2,at,2,1,"ng-template",2),t.ɵɵtemplate(3,st,2,1,"ng-template",3),t.ɵɵtemplate(4,ct,11,5,"ng-template",4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"p-footer"),t.ɵɵelementStart(6,"div",5),t.ɵɵelementStart(7,"button",6),t.ɵɵlistener("click",(function(){return n.hiddenDialog()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(17,ut,n.size+"px")),t.ɵɵproperty("header",n.titulo)("visible",n.showModal)("modal",n.flagModal)("minY",70)("baseZIndex",1e4)("draggable",!1)("blockScroll",!0)("maximizable",!0)("breakpoint",640),t.ɵɵadvance(1),t.ɵɵstyleMap(t.ɵɵpureFunction0(19,pt)),t.ɵɵproperty("columns",n.columnsData)("value",n.existenciasList)("scrollable",!0)("responsive",!0))},directives:[c.Dialog,g.Table,a.PrimeTemplate,a.Footer,s.ButtonDirective,l.NgForOf,g.ResizableColumn],styles:[""]});var Ut=function(e){return{width:e,"min-width":"200px"}},zt=function(){return[10,25,50,100,500]},qt=function(){function e(e,n,o){this._stockService=e,this._paginateService=n,this._almacenService=o,this.manejaUnidadSecundaria=!1,this.emitFilaSeleccionada=new t.EventEmitter,this.emitShowArticulos=new t.EventEmitter,this.articulosList=[],this.ordenar=[],this.busquedaArticulos={tipoBusqueda:""},this.showModal=!1,this.showModalInformacion=!1,this.showFirstTime=!0,this.clasificadorList=[],this.size=640}return e.prototype.ngOnInit=function(){var e=this;this.page=this._paginateService.getPage(),this.ordenar=this._paginateService.getOrden([{param:"nombre",label:"estatus"}],"es"),this.showFirstTime=!0,this._almacenService.getAll(this.configuracion.params).subscribe((function(t){e.almacenList=t.data})),this.busquedaArticulos.tipoBusqueda="CD"},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosShow=function(){this.busquedaArticulos.tipoBusqueda="CD",this.showFirstTime&&(this.obtenerExistenciaArticulos(),this.showFirstTime=!1)},e.prototype.obtenerExistenciaArticulos=function(){var e=this;this.busquedaArticulos.params=this._paginateService.getParams(this.page);var t={almacen:this.configuracion.noOcupaAlamacen?null:this.movimiento.almacen,tipoPrecio:this.configuracion.tipoPrecio,busquedaArticulos:this.busquedaArticulos,tipoArticulo:this.configuracion.tipoArticulo?this.configuracion.tipoArticulo:null,numeroPrecioDefault:this.configuracion.numeroPrecioDefault};this._stockService.obtenerExistenciasArticulosDescripcion(t,this.busquedaArticulos.params).then((function(t){e.articulosList=t.articulosDescripcion,e.page.total=t.total,t.clasificadores&&(e.clasificadorList=t.clasificadores),e.showModal||(e.showModal=!0)})).catch((function(t){e.articulosList=[]}))},e.prototype.obtenerExistenciaArticulosVal=function(){if(""!=this.busquedaArticulos.tipoBusqueda&&!this.busquedaArticulos.key)return!1;this.obtenerExistenciaArticulos()},e.prototype.obtenerExistenciaArticulosKey=function(e){"Enter"===e.key&&this.obtenerExistenciaArticulos()},e.prototype.filaSeleccionada=function(e){this.emitFilaSeleccionada.emit(e)},e.prototype.emitirShowArticulos=function(){this.emitShowArticulos.emit(0)},e.prototype.seriesArticulo=function(e){console.log(e)},e.prototype.onShowInformacion=function(e){this.articuloSelected=e,this.showModalInformacion=!0},e.prototype.onEventInformacion=function(e){this.showModalInformacion=e.status},e}();qt.ɵfac=function(e){return new(e||qt)(t.ɵɵdirectiveInject(nt),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(ot))},qt.ɵcmp=t.ɵɵdefineComponent({type:qt,selectors:[["app-selecciona-articulo"]],inputs:{configuracion:"configuracion",showArticulos:"showArticulos",movimiento:"movimiento",manejaUnidadSecundaria:"manejaUnidadSecundaria"},outputs:{emitFilaSeleccionada:"emitFilaSeleccionada",emitShowArticulos:"emitShowArticulos"},decls:30,vars:25,consts:[[3,"header","visible","maximizable","baseZIndex","blockScroll","minY","visibleChange","onShow","onHide"],[1,"grid","grid-fluid"],[1,"col-12","md:col-6","lg:col-6"],[2,"display","flex"],[2,"width","115px"],["pInputText","",3,"ngModel","ngModelChange","change"],["value","C"],["value","D"],["value","CD"],["value","CI"],["type","text","pInputText","","id","key",2,"width","200px",3,"ngModel","ngModelChange","keypress"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],[2,"width","100px"],["for","almacen"],["pInputText","","disabled","","id","almacen",2,"width","200px",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["scrollHeight","400px","selectionMode","single",3,"value","scrollable","responsive","onRowSelect"],["dt",""],["pTemplate","header"],["pTemplate","body"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"showModal","articulo","eventSelection",4,"ngIf"],[3,"value"],["translate","",2,"width","80px"],["translate","",2,"width","70px"],["translate","",2,"width","40px"],["style","width: 50px","translate","",4,"ngIf"],["style","width: 40px","translate","",4,"ngIf"],["translate","",2,"width","120px"],["style","width: 80px","translate","",4,"ngIf"],["style","width: 80px","translate","",4,"ngFor","ngForOf"],["translate","",2,"width","50px"],[3,"pSelectableRow"],["style","width: 80px;","translate","",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","70px"],[2,"width","40px"],["style","width: 50px;",4,"ngIf"],["style","width: 40px;",4,"ngIf"],[2,"width","80px"],[2,"width","120px"],["pButton","","type","button","icon","pi pi-eye",1,"ui-button-raised","ui-button-primary",3,"click"],["class","row justify-content-between",4,"ngFor","ngForOf"],["style","width: 80px;",4,"ngFor","ngForOf"],[2,"width","50px"],[1,"row","justify-content-between"],[1,"col-lg-4"],["for",""],[3,"showModal","articulo","eventSelection"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.showArticulos=e}))("onShow",(function(){return n.obtenerExistenciaArticulosShow()}))("onHide",(function(){return n.busquedaArticulos={tipoBusqueda:""},n.emitirShowArticulos()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"div",1),t.ɵɵelementStart(3,"div",2),t.ɵɵelementStart(4,"div",3),t.ɵɵelementStart(5,"div",4),t.ɵɵelementStart(6,"select",5),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.tipoBusqueda=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵelementStart(7,"option",6),t.ɵɵtext(8,"Codigo"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"option",7),t.ɵɵtext(10,"Descripcion"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"option",8),t.ɵɵtext(12,"Coincidencia"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"option",9),t.ɵɵtext(14,"Igual a"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(15,"input",10),t.ɵɵlistener("ngModelChange",(function(e){return n.busquedaArticulos.key=e}))("keypress",(function(e){return n.obtenerExistenciaArticulosKey(e)})),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"button",11),t.ɵɵlistener("click",(function(){return n.obtenerExistenciaArticulos()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"div",2),t.ɵɵelementStart(18,"div",3),t.ɵɵelementStart(19,"div",12),t.ɵɵelementStart(20,"label",13),t.ɵɵtext(21,"Almacen:"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(22,"select",14),t.ɵɵlistener("ngModelChange",(function(e){return n.movimiento.almacen=e}))("change",(function(){return n.obtenerExistenciaArticulosVal()})),t.ɵɵtemplate(23,mt,2,2,"option",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(24,"p-table",16,17),t.ɵɵlistener("onRowSelect",(function(e){return n.filaSeleccionada(e)})),t.ɵɵtemplate(26,wt,23,9,"ng-template",18),t.ɵɵtemplate(27,Ht,24,17,"ng-template",19),t.ɵɵelementEnd(),t.ɵɵelementStart(28,"p-paginator",20),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(29,Ft,1,2,"lib-seleccion-articulo-informacion",21)),2&e&&(t.ɵɵstyleMap(t.ɵɵpureFunction1(22,Ut,n.size+"px")),t.ɵɵpropertyInterpolate("header",t.ɵɵpipeBind1(1,20,"Articulos")),t.ɵɵproperty("visible",n.showArticulos)("maximizable",!0)("baseZIndex",1e4)("blockScroll",!0)("minY",70),t.ɵɵadvance(6),t.ɵɵproperty("ngModel",n.busquedaArticulos.tipoBusqueda),t.ɵɵadvance(9),t.ɵɵproperty("ngModel",n.busquedaArticulos.key),t.ɵɵadvance(7),t.ɵɵproperty("ngModel",n.movimiento.almacen),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.almacenList),t.ɵɵadvance(1),t.ɵɵproperty("value",n.articulosList)("scrollable",!0)("responsive",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(24,zt)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.showModalInformacion))},directives:[c.Dialog,o.SelectControlValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,o.NgSelectOption,o.ɵangular_packages_forms_forms_x,o.DefaultValueAccessor,s.ButtonDirective,l.NgForOf,g.Table,a.PrimeTemplate,v.Paginator,l.NgIf,m.TranslateDirective,g.SelectableRow,dt],pipes:[m.TranslatePipe,l.CurrencyPipe,l.DecimalPipe],styles:["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"]});var Rt=function(e){function t(t){var n=e.call(this,t,"acreedor")||this;return n.httpClient=t,n}return J(t,e),t}(K);function Lt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"th"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"th"),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"th"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"th"),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"th"),t.ɵɵtext(14),t.ɵɵpipe(15,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"th"),t.ɵɵtext(17),t.ɵɵpipe(18,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,6,"razonSocial")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,8,"rfc")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,10,"tipo")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(12,12,"atrasoDiasEntrega")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(15,14,"limiteCredito")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(18,16,"fechaUltimaCompra")))}function Nt(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"moral")))}function Vt(e,n){1&e&&(t.ɵɵelementStart(0,"span"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"fisico")))}function $t(e,n){if(1&e&&(t.ɵɵelementStart(0,"tr",9),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"td"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"td"),t.ɵɵtemplate(6,Nt,3,3,"span",10),t.ɵɵtemplate(7,Vt,3,3,"span",10),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"td"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"td"),t.ɵɵtext(11),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"td"),t.ɵɵtext(13),t.ɵɵpipe(14,"date"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var o=n.$implicit;t.ɵɵproperty("pSelectableRow",o),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRazonSocial),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.descripcionRfc),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",o.personaMoral),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",o.personaFisica),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.atrasoDiasEntrega),t.ɵɵadvance(2),t.ɵɵtextInterpolate(o.limiteCredito),t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(14,8,o.fechaUltimaCompra,"dd/MM/yyyy"))}}function Jt(e,n){1&e&&(t.ɵɵelementStart(0,"tr"),t.ɵɵelementStart(1,"td"),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵattribute("colspan",6),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(3,2,"general.noRegistros")))}Rt.ɵfac=function(e){return new(e||Rt)(t.ɵɵinject(n.HttpClient))},Rt.ɵprov=t.ɵɵdefineInjectable({token:Rt,factory:Rt.ɵfac,providedIn:"root"});var Zt=function(){return[10,25,50,100,500]},Gt=function(){function e(e,n,o){this.acreedorService=e,this.paginanateService=n,this.translate=o,this.params=[],this.ordenar=[],this.visible=!1,this.acreedorSeleccionado=new Ye,this.select=new t.EventEmitter,this.translate.get("es")}return e.prototype.ngOnInit=function(){this.page=this.paginanateService.getPage();this.ordenar=this.paginanateService.getOrden([],"es"),this.acreedores=[]},e.prototype.cargarDatosAcreedores=function(){var e=this;this.params=this.paginanateService.getParams(this.page),this.params.push({param:"estatus",value:!0}),this.acreedorService.getAll(this.params).subscribe((function(t){e.acreedores=t.data}))},e.prototype.pagina=function(e){this.page.rows=e.rows,this.page.offset=e.first,this.cargarDatosAcreedores},e.prototype.cerrarModal=function(){this.select.emit(null),this.visible=!1},e.prototype.seleccionarAcreedor=function(e){this.select.emit(e.data),this.visible=!1},e}();Gt.ɵfac=function(e){return new(e||Gt)(t.ɵɵdirectiveInject(Rt),t.ɵɵdirectiveInject(ze),t.ɵɵdirectiveInject(m.TranslateService))},Gt.ɵcmp=t.ɵɵdefineComponent({type:Gt,selectors:[["select-acreedor"]],inputs:{visible:"visible",acreedorSeleccionado:"acreedorSeleccionado"},outputs:{select:"select"},decls:10,vars:14,consts:[["header","Selecciona el acreedor",3,"visible","visibleChange","onHide","onShow"],[1,"p-inputgroup","mt-2"],["type","text","pInputText","","name","filtro",3,"placeholder","ngModel","ngModelChange","keyup"],["pButton","","type","button","icon","pi pi-search","styleClass","p-button-secondary",3,"click"],["dataKey","id","selectionMode","single","scrollHeight","350px",3,"value","selection","scrollable","responsive","selectionChange","onRowSelect"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"rows","totalRecords","pageLinkSize","rowsPerPageOptions","onPageChange"],[3,"pSelectableRow"],[4,"ngIf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p-dialog",0),t.ɵɵlistener("visibleChange",(function(e){return n.visible=e}))("onHide",(function(){return n.cerrarModal()}))("onShow",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"input",2),t.ɵɵlistener("ngModelChange",(function(e){return n.page.filtro=e}))("keyup",(function(){return n.cargarDatosAcreedores()})),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"button",3),t.ɵɵlistener("click",(function(){return n.cargarDatosAcreedores()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"p-table",4),t.ɵɵlistener("selectionChange",(function(e){return n.acreedorSeleccionado=e}))("onRowSelect",(function(e){return n.seleccionarAcreedor(e)})),t.ɵɵtemplate(6,Lt,19,18,"ng-template",5),t.ɵɵtemplate(7,$t,15,11,"ng-template",6),t.ɵɵtemplate(8,Jt,4,4,"ng-template",7),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"p-paginator",8),t.ɵɵlistener("onPageChange",(function(e){return n.pagina(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("visible",n.visible),t.ɵɵadvance(2),t.ɵɵpropertyInterpolate1("placeholder","",t.ɵɵpipeBind1(3,11,"buscar"),"..."),t.ɵɵproperty("ngModel",n.page.filtro),t.ɵɵadvance(3),t.ɵɵproperty("value",n.acreedores)("selection",n.acreedorSeleccionado)("scrollable",!0)("responsive",!0),t.ɵɵadvance(4),t.ɵɵproperty("rows",n.page.rows)("totalRecords",n.page.total)("pageLinkSize",5)("rowsPerPageOptions",t.ɵɵpureFunction0(13,Zt)))},directives:[c.Dialog,o.DefaultValueAccessor,r.InputText,o.NgControlStatus,o.NgModel,s.ButtonDirective,g.Table,a.PrimeTemplate,v.Paginator,g.SelectableRow,l.NgIf],pipes:[m.TranslatePipe,l.DatePipe],encapsulation:2});var Wt=[U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule],Yt=[a.ConfirmationService];function Kt(e){return new L.TranslateHttpLoader(e,"./assets/i18n/",".json")}var Qt=function(){};Qt.ɵmod=t.ɵɵdefineNgModule({type:Qt}),Qt.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||Qt)},providers:[Yt,{provide:n.HTTP_INTERCEPTORS,useClass:pe,multi:!0}],imports:[[l.CommonModule,Wt,o.FormsModule,d.ToastrModule.forRoot(),m.TranslateModule.forRoot({loader:{provide:m.TranslateLoader,useFactory:Kt,deps:[n.HttpClient]}})]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Qt,{declarations:[de,fe,he,ke,xe,Fe,$e,tt,qt,Gt,re,se,dt],imports:[l.CommonModule,U.CardModule,F.TooltipModule,H.OverlayPanelModule,D.RadioButtonModule,O.CheckboxModule,P.AutoCompleteModule,g.TableModule,i.TreeTableModule,j.CalendarModule,g.TableModule,s.ButtonModule,r.InputTextModule,b.DropdownModule,S.InputMaskModule,y.MessagesModule,x.MessageModule,v.PaginatorModule,C.ConfirmDialogModule,w.ProgressBarModule,I.TriStateCheckboxModule,E.KeyFilterModule,M.InputSwitchModule,c.DialogModule,A.TabViewModule,k.PanelModule,R.ToolbarModule,q.SplitButtonModule,_.FieldsetModule,T.TreeModule,B.TabMenuModule,z.MenubarModule,o.FormsModule,d.ToastrModule,m.TranslateModule],exports:[fe,he,ke,xe,Fe,$e,tt,qt,Gt,re,se]});var Xt=function(){function e(e){this.authService=e,this.cambioAcciones=new t.EventEmitter,this.changeDetalleUsuario=new t.EventEmitter}return e.prototype.set=function(e){this.detallesUsuarios=e,this.changeDetalleUsuario.emit(this.detallesUsuarios)},e.prototype.canActivete=function(e){for(var t=!1,n=this.authService.getUser(),o=function(o){if(t)return{value:t};var r=n.roles.filter((function(t){return t===e[o]}));t=r.length>0},r=0;r<e.length;r++){var i=o(r);if("object"==typeof i)return i.value}return t},e}();Xt.ɵfac=function(e){return new(e||Xt)(t.ɵɵinject(Ie))},Xt.ɵprov=t.ɵɵdefineInjectable({token:Xt,factory:Xt.ɵfac,providedIn:"root"});var en=function(){function e(e,t){this.http=e,this.authService=t}return e.prototype.initConfig=function(){this.http.get("assets/config.json").subscribe((function(e){localStorage.setItem("config",JSON.stringify(e))})),this.http.get("assets/version.json").subscribe((function(e){localStorage.removeItem("version"),localStorage.setItem("version",e.hash)}))},e.prototype.cargaConfig=function(){var e=this;this.http.get("assets/config.json").subscribe((function(t){localStorage.setItem("config",JSON.stringify(t));var o=t.url;e.http.post(o+"/login",{username:"admin",password:"admin"}).subscribe((function(t){localStorage.setItem("usuario",JSON.stringify(t));var r={headers:new n.HttpHeaders({"Accept-type":"application/json",Authorization:t.token_type+" "+t.access_token})};e.http.get(o+"/usuario/obtieneUsuarioActual",r).subscribe((function(t){var n=t.empresas[0];e.authService.setEmpresa(n).subscribe()}))}))}))},e}();en.ɵfac=function(e){return new(e||en)(t.ɵɵinject(n.HttpClient),t.ɵɵinject(Ie))},en.ɵprov=t.ɵɵdefineInjectable({token:en,factory:en.ɵfac,providedIn:"root"});var tn=function(){function e(e){this.toastr=e}return e.prototype.deployMessage=function(e,t,n){switch(void 0===e&&(e=null),e){case"success":this.toastr.success(n,t,{timeOut:3e3});break;case"info":this.toastr.info(n,t,{timeOut:3e3});break;case"warning":this.toastr.warning(n,t,{timeOut:3e3});break;case"error":this.toastr.error(n,t,{timeOut:3e3});break;case null:this.toastr.success(n,t,{timeOut:3e3})}},e.prototype.success=function(e){var t=[];return t.push({severity:"success",summary:"Exito",detail:""+e}),t},e.prototype.error=function(e){var t=[];if(e){if(e.error&&(e=e.error).error)for(var n=0;n<e.error.length;n++)t.push({severity:"error",summary:"Error",detail:""+e.error[n].message})}else e.mensaje&&t.push({severity:"error",summary:"Error",detail:""+e.mensaje});return t},e}();tn.ɵfac=function(e){return new(e||tn)(t.ɵɵinject(d.ToastrService))},tn.ɵprov=t.ɵɵdefineInjectable({token:tn,factory:tn.ɵfac,providedIn:"root"});var nn=function(e){function t(t){return e.call(this,t,"/personaMoral")||this}return J(t,e),t}(K);nn.ɵfac=function(e){return new(e||nn)(t.ɵɵinject(n.HttpClient))},nn.ɵprov=t.ɵɵdefineInjectable({token:nn,factory:nn.ɵfac,providedIn:"root"});var on=function(){function e(e){this.controlAccesoService=e,this.rol="",this.method=""}return e.prototype.canActivate=function(){return this.controlAccesoService.canActivete([this.rol])},e.prototype.permisos=function(e){this.rol=e},e}();on.ɵfac=function(e){return new(e||on)(t.ɵɵinject(Xt))},on.ɵprov=t.ɵɵdefineInjectable({token:on,factory:on.ɵfac,providedIn:"root"});var rn=function(e){function t(t){var n=e.call(this,t,"catalogoAdicional")||this;return n.httpClient=t,n}return J(t,e),t}(K);rn.ɵfac=function(e){return new(e||rn)(t.ɵɵinject(n.HttpClient))},rn.ɵprov=t.ɵɵdefineInjectable({token:rn,factory:rn.ɵfac,providedIn:"root"});var an=function(){function e(e,t,n){this.authService=e,this.controlAccesoService=t,this.router=n}return e.prototype.load=function(e){var t=this;return this.authService.getUser()?this.authService.getDetalsUser().subscribe((function(e){for(var n=e.roles,o=0;o<n.length;o++)"ROLE_CLIENTE"===n[o].authority&&t.router.navigate(["movimientos/ventaRapida/create"]);return e.empresa||t.regresaAlprincipal(void 0),t.controlAccesoService.detallesUsuarios=e,t.controlAccesoService.cambioAcciones.emit(!0),!0}),(function(e){t.regresaAlprincipal(void 0)})):this.regresaAlprincipal(void 0),!1},e.prototype.regresaAlprincipal=function(e){var t=JSON.parse(localStorage.getItem("config")),n="";t&&t.host&&(n=t.host),e&&(n+=e),window.location.href=n},e}();an.ɵfac=function(e){return new(e||an)(t.ɵɵinject(Ie),t.ɵɵinject(Xt),t.ɵɵinject(N.Router))},an.ɵprov=t.ɵɵdefineInjectable({token:an,factory:an.ɵfac,providedIn:"root"});var ln=function(){function e(e){this.http=e,this.currentHash="{{POST_BUILD_ENTERS_HASH_HERE}}",this.versionado=!1,this.frequency=108e5}return e.prototype.initVersionCheck=function(){var e=this;setInterval((function(){e.checkVersion()}),this.frequency)},e.prototype.checkVersion=function(){var e=this;this.http.get("assets/version.json?t="+(new Date).getTime()).subscribe((function(t){var n=t.hash;e.currentHash=localStorage.getItem("version"),e.hasHashChanged(e.currentHash,n)||e.versionado||(e.versionado=!0,confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")?(location.reload(!0),e.versionado=!1):e.versionado=!1)}),(function(e){console.error(e,"No se pudo obtener versión de software")}))},e.prototype.hasHashChanged=function(e,t){return!(!e||"{{POST_BUILD_ENTERS_HASH_HERE}}"===e)&&e===t},e}();ln.ɵfac=function(e){return new(e||ln)(t.ɵɵinject(n.HttpClient))},ln.ɵprov=t.ɵɵdefineInjectable({token:ln,factory:ln.ɵfac,providedIn:"root"});var sn=function(){this.personaFisica=new Ze},cn=function(e){function t(t){var n=e.call(this,t,"agente")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario";return this.getHttp().post(t,e,this.buildAuth())},t.prototype.getUsuarioAgente=function(e){var t=this.getUrl("agente")+"/usuario/"+e;return this.getHttp().get(t,this.buildAuth())},t.prototype.obtenerAgenteEmpresa=function(){var e=this.geturl()+"/obtenerAgenteEmpresa";return this.getHttp().get(e,this.buildAuth())},t}(K);cn.ɵfac=function(e){return new(e||cn)(t.ɵɵinject(n.HttpClient))},cn.ɵprov=t.ɵɵdefineInjectable({token:cn,factory:cn.ɵfac,providedIn:"root"});var un=function(){},pn=function(){},dn=function(){this.datoDireccion=new pn},mn=function(e){function t(t){return e.call(this,t,"/banco")||this}return J(t,e),t}(K);mn.ɵfac=function(e){return new(e||mn)(t.ɵɵinject(n.HttpClient))},mn.ɵprov=t.ɵɵdefineInjectable({token:mn,factory:mn.ɵfac,providedIn:"root"});var fn=function(){},hn=function(e){function t(t){return e.call(this,t,"/catalogoTipo")||this}return J(t,e),t}(K);hn.ɵfac=function(e){return new(e||hn)(t.ɵɵinject(n.HttpClient))},hn.ɵprov=t.ɵɵdefineInjectable({token:hn,factory:hn.ɵfac,providedIn:"root"});var gn=function(e){function t(t){return e.call(this,t,"/clasificadorTipo")||this}return J(t,e),t}(K);gn.ɵfac=function(e){return new(e||gn)(t.ɵɵinject(n.HttpClient))},gn.ɵprov=t.ɵɵdefineInjectable({token:gn,factory:gn.ɵfac,providedIn:"root"});var vn=function(){},bn=function(e){function t(t){return e.call(this,t,"claveMovimiento")||this}return J(t,e),t}(K);bn.ɵfac=function(e){return new(e||bn)(t.ɵɵinject(n.HttpClient))},bn.ɵprov=t.ɵɵdefineInjectable({token:bn,factory:bn.ɵfac,providedIn:"root"});var Sn=function(){this.agenteCobrador=new sn,this.agenteVendedor=new sn,this.personaFisica=new Ze,this.personaMoral=new Ge},yn=function(){this.banco=new dn,this.estatus=!0},xn=function(){},Cn=function(){this.cliente=new Sn,this.flete=new xn,this.estatus=!0},wn=function(e){function t(t){var n=e.call(this,t,"/clienteCuentaBanco")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(K);wn.ɵfac=function(e){return new(e||wn)(t.ɵɵinject(n.HttpClient))},wn.ɵprov=t.ɵɵdefineInjectable({token:wn,factory:wn.ɵfac,providedIn:"root"});var In=function(e){function t(t){var n=e.call(this,t,"/clienteFlete")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(K);In.ɵfac=function(e){return new(e||In)(t.ɵɵinject(n.HttpClient))},In.ɵprov=t.ɵɵdefineInjectable({token:In,factory:In.ɵfac,providedIn:"root"});var En=function(){this.estatus=!0},Mn=function(){this.tipoContacto=new En},An=function(e){function t(t){return e.call(this,t,"/contacto")||this}return J(t,e),t}(K);An.ɵfac=function(e){return new(e||An)(t.ɵɵinject(n.HttpClient))},An.ɵprov=t.ɵɵdefineInjectable({token:An,factory:An.ɵfac,providedIn:"root"});var jn=function(e){function t(t){return e.call(this,t,"/datoDireccion")||this}return J(t,e),t}(K);jn.ɵfac=function(e){return new(e||jn)(t.ɵɵinject(n.HttpClient))},jn.ɵprov=t.ɵɵdefineInjectable({token:jn,factory:jn.ɵfac,providedIn:"root"});var kn=function(){},Pn=function(e){function t(t){return e.call(this,t,"/departamento")||this}return J(t,e),t}(K);Pn.ɵfac=function(e){return new(e||Pn)(t.ɵɵinject(n.HttpClient))},Pn.ɵprov=t.ɵɵdefineInjectable({token:Pn,factory:Pn.ɵfac,providedIn:"root"});var _n=function(){},On=function(){this.datoDireccion=new pn,this.personaMoral=new Ge,this.claveFormaPagoEfectivo=new _n},Tn=function(){this.empresa=new On},Dn=function(e){function t(t){var n=e.call(this,t,"/empresa")||this;return n.httpClient=t,n}return J(t,e),t.prototype.get=function(){return this.httpClient.get(this.getBaseUrl()+"/configuracionEmpresaAdministrativo/configuracionUsuario",this.buildAuth())},t}(K);Dn.ɵfac=function(e){return new(e||Dn)(t.ɵɵinject(n.HttpClient))},Dn.ɵprov=t.ɵɵdefineInjectable({token:Dn,factory:Dn.ɵfac,providedIn:"root"});var Bn=function(e){function t(t){var n=e.call(this,t,"/flete")||this;return n.httpClient=t,n}return J(t,e),t}(K);Bn.ɵfac=function(e){return new(e||Bn)(t.ɵɵinject(n.HttpClient))},Bn.ɵprov=t.ɵɵdefineInjectable({token:Bn,factory:Bn.ɵfac,providedIn:"root"});var Hn=function(e){function t(t){return e.call(this,t,"/FormaDePago")||this}return J(t,e),t}(K);Hn.ɵfac=function(e){return new(e||Hn)(t.ɵɵinject(n.HttpClient))},Hn.ɵprov=t.ɵɵdefineInjectable({token:Hn,factory:Hn.ɵfac,providedIn:"root"});var Fn=function(){},Un=function(e){function t(t){var n=e.call(this,t,"/moneda")||this;return n.httpClient=t,n}return J(t,e),t}(K);Un.ɵfac=function(e){return new(e||Un)(t.ɵɵinject(n.HttpClient))},Un.ɵprov=t.ɵɵdefineInjectable({token:Un,factory:Un.ɵfac,providedIn:"root"});var zn=function(){},qn=function(){},Rn=function(e){function t(t){var n=e.call(this,t,"/PersonaFisica")||this;return n.httpClient=t,n}return J(t,e),t.prototype.getGeneros=function(){return this.httpClient.get(this.getBaseUrl()+"/genero",this.buildAuth())},t.prototype.getEstadoCivil=function(){return this.httpClient.get(this.getBaseUrl()+"/estadoCivil",this.buildAuth())},t}(K);Rn.ɵfac=function(e){return new(e||Rn)(t.ɵɵinject(n.HttpClient))},Rn.ɵprov=t.ɵɵdefineInjectable({token:Rn,factory:Rn.ɵfac,providedIn:"root"});var Ln=function(){this.banco=new dn,this.estatus=!0},Nn=function(){this.proveedor=new Ye,this.flete=new xn,this.estatus=!0},Vn=function(e){function t(t){var n=e.call(this,t,"/proveedorCuentaBanco")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={cuentas:e};return this.httpClient.post(this.geturl(),t,this.buildAuth())},t}(K);Vn.ɵfac=function(e){return new(e||Vn)(t.ɵɵinject(n.HttpClient))},Vn.ɵprov=t.ɵɵdefineInjectable({token:Vn,factory:Vn.ɵfac,providedIn:"root"});var $n=function(e){function t(t){var n=e.call(this,t,"/proveedorFlete")||this;return n.httpClient=t,n}return J(t,e),t.prototype.saveAll=function(e){var t={fletes:e};return this.save(t)},t}(K);$n.ɵfac=function(e){return new(e||$n)(t.ɵɵinject(n.HttpClient))},$n.ɵprov=t.ɵɵdefineInjectable({token:$n,factory:$n.ɵfac,providedIn:"root"});var Jn=function(e){function t(t){return e.call(this,t,"claveAumentoDisminucion")||this}return J(t,e),t}(K);Jn.ɵfac=function(e){return new(e||Jn)(t.ɵɵinject(n.HttpClient))},Jn.ɵprov=t.ɵɵdefineInjectable({token:Jn,factory:Jn.ɵfac,providedIn:"root"});var Zn=function(e){function t(t){var n=e.call(this,t,"serieDocumento")||this;return n.httpClient=t,n}return J(t,e),t.prototype.getTipos=function(){return this.httpClient.get(this.getUrl("serieDocumento")+"/tipoSerie",this.buildAuth())},t.prototype.getReporte=function(e){return this.httpClient.get(this.getUrl("serieDocumento")+"/descargaFormatoReporte"+this.serializeParams(e),this.buildAuth())},t}(K);Zn.ɵfac=function(e){return new(e||Zn)(t.ɵɵinject(n.HttpClient))},Zn.ɵprov=t.ɵɵdefineInjectable({token:Zn,factory:Zn.ɵfac,providedIn:"root"});var Gn=function(){},Wn=function(e){function t(t){return e.call(this,t,"/tipoContacto")||this}return J(t,e),t}(K);Wn.ɵfac=function(e){return new(e||Wn)(t.ɵɵinject(n.HttpClient))},Wn.ɵprov=t.ɵɵdefineInjectable({token:Wn,factory:Wn.ɵfac,providedIn:"root"});var Yn=function(){},Kn=function(e){function t(t){return e.call(this,t,"ubicacion")||this}return J(t,e),t}(K);Kn.ɵfac=function(e){return new(e||Kn)(t.ɵɵinject(n.HttpClient))},Kn.ɵprov=t.ɵɵdefineInjectable({token:Kn,factory:Kn.ɵfac,providedIn:"root"});var Qn=function(){};Qn.ARTICULO=2,Qn.USO_CFDI=11;var Xn=function(e){function t(t){var n=e.call(this,t,"acreedorCuentaContable")||this;return n.httpClient=t,n}return J(t,e),t.prototype.cuentasContables=function(){return this.httpClient.get(this.getUrl()+"/cuentaContable/obtieneCuentasContablesRecursivo/",this.buildAuth())},t}(K);Xn.ɵfac=function(e){return new(e||Xn)(t.ɵɵinject(n.HttpClient))},Xn.ɵprov=t.ɵɵdefineInjectable({token:Xn,factory:Xn.ɵfac,providedIn:"root"});var eo=function(){},to=function(){};e.AcreedorCuentaContableService=Xn,e.AcreedorService=Rt,e.Agente=sn,e.AgenteService=cn,e.Almacen=un,e.AlmacenService=ot,e.Auth=we,e.AuthService=Ie,e.Authenticated=an,e.Banco=dn,e.BancoService=mn,e.CanActivateGuard=on,e.CatalogoAdicionalService=rn,e.CatalogoTipo=fn,e.CatalogoTipoService=hn,e.CclistaComponent=re,e.CcseleccionDialogComponent=se,e.ClasificadorTipo=We,e.ClasificadorTipoService=gn,e.ClaveAumentoDisminucionService=Jn,e.ClaveMovimiento=vn,e.ClaveMovimientoService=bn,e.Cliente=Sn,e.ClienteCuentaBanco=yn,e.ClienteCuentaBancoService=wn,e.ClienteFlete=Cn,e.ClienteFleteService=In,e.ClienteService=Ue,e.ConfiguracionEmpresaAdministrativa=Tn,e.ControlAccesoService=Xt,e.CoreLibModule=Qt,e.CrudService=K,e.CuentaContableModel=eo,e.DatoContacto=Mn,e.DatoContactoService=An,e.DatoDireccion=pn,e.DatoDireccionService=jn,e.Departamento=kn,e.DepartamentoService=Pn,e.Empresa=On,e.EmpresaService=Dn,e.Error404Component=de,e.EstadoCivil=zn,e.FileService=ve,e.Flete=xn,e.FleteService=Bn,e.FormaPago=_n,e.FormaPagoService=Hn,e.Genero=qn,e.GlobalService=Y,e.HttpLoaderFactory=Kt,e.InitService=en,e.LoadingComponent=fe,e.LoadingScreenComponent=he,e.LoadingScreenService=ue,e.LoadingService=me,e.LoginModalComponent=ke,e.LoginModalService=ce,e.MessageService=tn,e.Moneda=Fn,e.MonedaService=Un,e.NormaInformacionFinancieraModel=to,e.PaginateService=ze,e.PdfModalComponent=xe,e.PdfModalService=ge,e.Persona=Je,e.PersonaFisica=Ze,e.PersonaFisicaService=Rn,e.PersonaMoral=Ge,e.PersonaMoralService=nn,e.Proveedor=Ye,e.ProveedorCuentaBanco=Ln,e.ProveedorCuentaBancoService=Vn,e.ProveedorFlete=Nn,e.ProveedorFleteService=$n,e.ProveedorService=Ke,e.SeleccionaArticuloComponent=qt,e.SelectAcreedorComponent=Gt,e.SelectClienteComponent=$e,e.SelectProveedorComponent=tt,e.SerieDocumento=Gn,e.SerieDocumentoService=Zn,e.SessionCajaService=Pe,e.SessionCreateComponent=Fe,e.StockService=nt,e.TipoCatalogo=Qn,e.TipoContacto=En,e.TipoContactoService=Wn,e.Ubicacion=Yn,e.UbicacionService=Kn,e.Usuario=Ce,e.VersionCheckService=ln,e.httpInterceptor=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
16
2
  //# sourceMappingURL=visorus-erp-core.umd.min.js.map