1import{b as _e}from"./chunk-CB3SBJS7.js";import{c as Re}from"./chunk-P5YMQ6NI.js";import{I as be,b as Ce,e as ve,f as ye,g as Ie}from"./chunk-EAFGGBBB.js";import{a as pe,b as de,c as me,d as fe,e as ge}from"./chunk-4HNAA3QD.js";import{l as Se}from"./chunk-ZR2VQGMP.js";import{c as he,d as le,e as E,f as ue,g as w,j as m}from"./chunk-WQW72BYF.js";import{f as Ee,g as f,h as D,m as we,n as A,p as De,u as Ae}from"./chunk-2HUIEKAV.js";import"./chunk-PUAS7KUQ.js";import{$a as S,A as Q,Fa as d,Ib as oe,Jb as re,Kb as se,N as Y,O as g,R as H,U as C,V as v,W as G,Wa as h,X as l,Xa as ee,Y as T,Za as te,_a as O,ba as J,bb as _,ca as y,cb as V,fa as X,fc as ae,gc as ce,hb as ne,ic as b,j as q,ka as K,l as U,q as W,ra as u,ua as I,uc as R,va as p,z as $,zb as ie}from"./chunk-6ER5EEDF.js";var Le=["chatContainer"],F=class i{constructor(e,t,n,o,r,s,a){this._injector=e;this._viewContainerRef=t;this._configLoaderService=n;this._changeDetectorRef=o;this._baseChatService=r;this._inputsService=s;this._conversationService=a;this._config=this._configLoaderService.config,this._theme=this._config.theme}_chatContainer;_unsubscribe$=new q;_chatService;_toogleChat=void 0;_config;_theme;set chatContainer(e){if(this._chatContainer||!e)return;this._chatContainer=e;let t=this._config.styleVariant||"default";this.loadChatStyle(t)}requestUrlChange=new I;chatStateChanged=new I;webAction=new I;set toggle(e){this._chatService?(this._chatService.resolveToggleChat(e),this._toogleChat=void 0):this._toogleChat=e}set user(e){if(e){let t=this._conversationService.clientOrDefault;try{let n=JSON.parse(e),{username:o,email:r,apellido:s,id:a}=n;o&&(t.name=o),r&&(t.email=r),s&&(t.apellido=s),a&&(t.id=a),this._baseChatService.client$.next(t),this._inputsService.sendEmailIdentification$.next(t.email||"")}catch(n){console.log(n)}}}set questions(e){this._inputsService.questionsFn(e)}ngOnInit(){this._baseChatService.requestUrlChange$.pipe(g(this._unsubscribe$)).subscribe(e=>{this.requestUrlChange.emit(e)})}ngOnDestroy(){this._unsubscribe$.next()}loadChatStyle(e){let t;switch(e){case"Silice":import("./silice-theme.module-6JZQW2LJ.js").then(n=>{let o=n.SiliceThemeModule.components.main;t=this._openLazyLoadedComponent(n,o),this._changeDetectorRef.detectChanges(),this._chatContainer.clear(),this._chatService=t.instance.chatService,this._toogleChat!==void 0&&this._chatService.resolveToggleChat(this._toogleChat),t.instance instanceof _e&&(t.instance.chatStateChanged.pipe(g(this._unsubscribe$)).subscribe(r=>{setTimeout(()=>{this.chatStateChanged.emit(r)},0)}),this._inputsService.webAction$.pipe(g(this._unsubscribe$),Q(r=>!!r)).subscribe(r=>{this.webAction.emit(r)})),this._changeDetectorRef.detectChanges()});break;case"default":default:import("./default.module-EANA4G45.js").then(n=>{let o=n.DefaultThemeModule.components.main;t=this._openLazyLoadedComponent(n,o),this._changeDetectorRef.detectChanges(),this._chatContainer.clear(),this._chatService=t.instance.chatService,this._toogleChat!==void 0&&this._chatService.resolveToggleChat(this._toogleChat),this._changeDetectorRef.detectChanges()});break}}_openLazyLoadedComponent(e,t){let n=e[Object.keys(e)[0]],o=ne(n,this._injector);return this._viewContainerRef.createComponent(t,{ngModuleRef:o})}static \u0275fac=function(t){return new(t||i)(h(u),h(_),h(m),h(b),h(Ie),h(ye),h(Ce))};static \u0275cmp=J({type:i,selectors:[["ng-component"]],viewQuery:function(t,n){if(t&1&&oe(Le,5,_),t&2){let o;re(o=se())&&(n.chatContainer=o.first)}},inputs:{toggle:"toggle",user:"user",questions:"questions"},outputs:{requestUrlChange:"requestUrlChange",chatStateChanged:"chatStateChanged",webAction:"webAction"},decls:2,vars:0,consts:[["chatContainer",""]],template:function(t,n){t&1&&ie(0,null,0)},encapsulation:2})};var xe=(()=>{class i extends A{constructor(t,n,o){super(t,n,o)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(n){return new(n||i)(l(R),l(f),l(D))}}static{this.\u0275prov=C({token:i,factory:i.\u0275fac})}}return i})();function ke(){return new we}function Be(i,e,t){return new Ae(i,e,t)}var Me=[{provide:D,useFactory:ke},{provide:A,useClass:xe},{provide:S,useFactory:Be,deps:[E,A,p]}],Fe=[{provide:f,useFactory:()=>new De},{provide:d,useValue:"BrowserAnimations"},...Me],Ze=[{provide:f,useClass:Ee},{provide:d,useValue:"NoopAnimations"},...Me],Ne=(()=>
1{class i{static withConfig(t){return{ngModule:i,providers:t.disableAnimations?Ze:Fe}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=y({type:i})}static{this.\u0275inj=v({providers:Fe,imports:[w]})}}return i})();var M={schedule(i,e){let t=setTimeout(i,e);return()=>clearTimeout(t)},scheduleBeforeRender(i){if(typeof window>"u")return M.schedule(i,0);if(typeof window.requestAnimationFrame>"u")return M.schedule(i,16);let e=window.requestAnimationFrame(i);return()=>window.cancelAnimationFrame(e)}};function ze(i){return i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function qe(i){return!!i&&i.nodeType===Node.ELEMENT_NODE}function Ue(i){return typeof i=="function"}var L;function We(i,e){if(!L){let t=Element.prototype;L=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return i.nodeType===Node.ELEMENT_NODE?L.call(i,e):!1}function $e(i,e){return i===e||i!==i&&e!==e}function Qe(i){let e={};return i.forEach(({propName:t,templateName:n,transform:o})=>{e[ze(n)]=[t,o]}),e}function Ye(i,e){return e.get(O).resolveComponentFactory(i).inputs}function He(i,e){let t=i.childNodes,n=e.map(()=>[]),o=-1;e.some((r,s)=>r==="*"?(o=s,!0):!1);for(let r=0,s=t.length;r<s;++r){let a=t[r],c=Ge(a,e,o);c!==-1&&n[c].push(a)}return n}function Ge(i,e,t){let n=t;return qe(i)&&e.some((o,r)=>o!=="*"&&We(i,o)?(n=r,!0):!1),n}var Je=10,x=class{constructor(e,t){this.componentFactory=t.get(O).resolveComponentFactory(e)}create(e){return new k(this.componentFactory,e)}},k=class{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new U(1),this.events=this.eventEmitters.pipe(Y(n=>$(...n))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:n})=>n)),this.ngZone=this.injector.get(p),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=M.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},Je))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t,n){this.runInZone(()=>{if(n&&(t=n.call(this.componentRef?.instance,t)),this.componentRef===null){this.initialInputValues.set(e,t);return}$e(t,this.getInputValue(e))&&!(t===void 0&&this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges())})}initializeComponent(e){let t=u.create({providers:[],parent:this.injector}),n=He(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.viewChangeDetectorRef=this.componentRef.injector.get(b),this.implementsOnChanges=Ue(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(ce).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e,transform:t})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e),t)}),this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:o})=>e.instance[n].pipe(W(s=>({name:o,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||this.inputChanges===null)return;let t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=M.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;this.inputChanges===null&&(this.inputChanges={});let n=this.inputChanges[e];if(n){n.currentValue=t;return}let o=this.unchangedInputs.has(e),r=o?void 0:this.getInputValue(e);this.inputChanges[e]=new K(r,t,o)}detectChanges(){this.componentRef!==null&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},B=class extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}};function je(i,e){let t=Ye(i,e.injector),n=e.strategyFactory||new x(i,e.injector),o=Qe(t);class r extends B{static{this.observedAttributes=Object.keys(o)}
1get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=n.create(this.injector||e.injector);t.forEach(({propName:c,transform:j})=>{if(!this.hasOwnProperty(c))return;let z=this[c];delete this[c],a.setInputValue(c,z,j)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,c,j,z){let[Ve,Pe]=o[a];this.ngElementStrategy.setInputValue(Ve,j,Pe)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let c=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(c)})}}return t.forEach(({propName:s,transform:a})=>{Object.defineProperty(r.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(c){this.ngElementStrategy.setInputValue(s,c,a)},configurable:!0,enumerable:!0})}),r}function Te(i){return()=>i.initialize()}var Xe="@",Ke=(()=>{class i{constructor(t,n,o,r,s){this.doc=t,this.delegate=n,this.zone=o,this.animationType=r,this.moduleImpl=s,this._rendererFactoryPromise=null,this.scheduler=T(te,{optional:!0}),this.loadingSchedulerFn=T(et,{optional:!0})}ngOnDestroy(){this._engine?.flush()}loadImpl(){let t=()=>this.moduleImpl??import("./browser-7WRIOPGI.js").then(o=>o),n;return this.loadingSchedulerFn?n=this.loadingSchedulerFn(t):n=t(),n.catch(o=>{throw new H(5300,!1)}).then(({\u0275createEngine:o,\u0275AnimationRendererFactory:r})=>{this._engine=o(this.animationType,this.doc);let s=new r(this.delegate,this._engine,this.zone);return this.delegate=s,s})}createRenderer(t,n){let o=this.delegate.createRenderer(t,n);if(o.\u0275type===0)return o;typeof o.throwOnSyntheticProps=="boolean"&&(o.throwOnSyntheticProps=!1);let r=new Z(o);return n?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(s=>{let a=s.createRenderer(t,n);r.use(a),this.scheduler?.notify(10)}).catch(s=>{r.use(o)}),r}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}static{this.\u0275fac=function(n){ee()}}static{this.\u0275prov=C({token:i,factory:i.\u0275fac})}}return i})(),Z=class{constructor(e){this.delegate=e,this.replay=[],this.\u0275type=1}use(e){if(this.delegate=e,this.replay!==null){for(let t of this.replay)t(e);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}get destroyNode(){return this.delegate.destroyNode}appendChild(e,t){this.delegate.appendChild(e,t)}insertBefore(e,t,n,o){this.delegate.insertBefore(e,t,n,o)}removeChild(e,t,n){this.delegate.removeChild(e,t,n)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,o){this.delegate.setAttribute(e,t,n,o)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,o){this.delegate.setStyle(e,t,n,o)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){this.shouldReplay(t)&&this.replay.push(o=>o.setProperty(e,t,n)),this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.shouldReplay(t)&&this.replay.push(o=>o.listen(e,t,n)),this.delegate.listen(e,t,n)}shouldReplay(e){return this.replay!==null&&e.startsWith(Xe)}},et=new G("");function Oe(i="animations"){return V("NgAsyncAnimations"),X([{provide:S,useFactory:(e,t,n)=>new Ke(e,t,n,i),deps:[R,E,p]},{provide:d,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var N=class i{constructor(e){this.injector=e}ngDoBootstrap(){let e=je(F,{injector:this.injector});customElements.define("chat-widget",e)}static \u0275fac=function(t){return new(t||i)(l(u))};static \u0275mod=y({type:i});static \u0275inj=v({providers:[he(le()),pe(de({separator:":",caseSensitive:!0}),me(),fe()),Oe(),ve,ge,m,{provide:ae,deps:[m],multi:!0,useFactory:Te}],imports:[w,Se,Re,be.forRoot(),Ne]})};ue().bootstrapModule(N,{ngZoneEventCoalescing:!0}
1).catch(i=>console.error(i));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.