khoj 2.0.0b16.dev0__py3-none-any.whl → 2.0.0b16.dev8__py3-none-any.whl
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.
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/02b2f66c-c89cf69943479389.js +53 -0
- khoj/interface/compiled/_next/static/chunks/1423.7b1e8bf760d28078.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1585.3de407cd92842aed.js +55 -0
- khoj/interface/compiled/_next/static/chunks/1822.0cc2f58edae71bbb.js +56 -0
- khoj/interface/compiled/_next/static/chunks/1915-cf7bfb14d1d7c694.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{2117-080746c8e170c81a.js → 2117-9da935e257b6d677.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/2327-115eb57f8f41544b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/2526.8ac62b527c9ab703.js +43 -0
- khoj/interface/compiled/_next/static/chunks/2626.2125083a1ff3b80a.js +29 -0
- khoj/interface/compiled/_next/static/chunks/2684-981c00094da80a42.js +20 -0
- khoj/interface/compiled/_next/static/chunks/273.c2bdf48df1dfc5ef.js +93 -0
- khoj/interface/compiled/_next/static/chunks/3.87fb50c162c65241.js +59 -0
- khoj/interface/compiled/_next/static/chunks/3192.d7a2786f846fe872.js +148 -0
- khoj/interface/compiled/_next/static/chunks/{3260-82d2521fab032ff1.js → 3260-babf79aa1083e03a.js} +18 -63
- khoj/interface/compiled/_next/static/chunks/3574.7a94c27e6a496a56.js +63 -0
- khoj/interface/compiled/_next/static/chunks/{3595-ac8e81e04ecb89cb.js → 3595-a015df928dccf883.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/3599.53651e350d023038.js +131 -0
- khoj/interface/compiled/_next/static/chunks/3852.822389f445c9b427.js +1 -0
- khoj/interface/compiled/_next/static/chunks/3933.a3b09abdf19b7458.js +1 -0
- khoj/interface/compiled/_next/static/chunks/4323.3b06bc313e4946af.js +215 -0
- khoj/interface/compiled/_next/static/chunks/4447-111dcc7ac33e42ae.js +1 -0
- khoj/interface/compiled/_next/static/chunks/453.f8a05823b9d15c24.js +1 -0
- khoj/interface/compiled/_next/static/chunks/490.91b737ff35d6fbc1.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5097.1129f707069b361f.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5111.c8d55e95447d7609.js +5 -0
- khoj/interface/compiled/_next/static/chunks/5689.a323537972b343b4.js +1 -0
- khoj/interface/compiled/_next/static/chunks/572.3357cc94e3adfcba.js +262 -0
- khoj/interface/compiled/_next/static/chunks/62.53fa01be73dcb16e.js +62 -0
- khoj/interface/compiled/_next/static/chunks/7079-9cdc83e5ad213e0b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7200-9f1d584275259536.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7626-551c62355b7b1b4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7811.c32bdc47a9144a63.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7986.4901bc54aadf59c3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8288.4883743fa40672e2.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8382.335eadce6afb5d4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8501.771e24303bd21479.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8623.525c35f02a86ca25.js +174 -0
- khoj/interface/compiled/_next/static/chunks/8927.ba4a68dd6424b88c.js +166 -0
- khoj/interface/compiled/_next/static/chunks/{8072-e1440cb482a0940e.js → 9002-bd3304de324360eb.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/9316-b53a7fb1be7889f3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/9498.df45618893b18531.js +4 -0
- khoj/interface/compiled/_next/static/chunks/959.aa25ba53e976d0c1.js +36 -0
- khoj/interface/compiled/_next/static/chunks/9808-c95c38946322e899.js +1 -0
- khoj/interface/compiled/_next/static/chunks/a764ac56.e65af2f7b1ecdaaa.js +136 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-e291b49977f43880.js → page-aa86693ebe6a688f.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{layout-8639ff99d6c2fec6.js → layout-554744a3bb43b2f1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-1047097af99d31c7.js → page-224de8b2f24cd5a8.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{layout-2ff3e18a6feae92a.js → layout-63ef3be8435d1c99.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-ac7ed0a1aff1b145.js → page-60083b8e6276e6ad.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{layout-c2de87a25fededbb.js → layout-a7ad6fe9355ea57a.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-1567cac7b79a7c59.js → page-3699a0ef95d4a5ce.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-3639e50ec3e9acfd.js → page-6ff3715005bdbb48.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{layout-f88cedfe9ad4df7c.js → layout-30fa7eff8e7e01d5.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-6081362437c82470.js → page-464010b2b4389d0d.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-819c6536c15e3d31.js → page-5b98a0ed1e0835bf.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{main-fc8e0fefa2ef3d8c.js → main-0daa33fca37d54d4.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/webpack-6912ca6b054cee28.js +1 -0
- khoj/interface/compiled/_next/static/css/{821d0d60b0b6871d.css → c34713c98384ee87.css} +1 -1
- khoj/interface/compiled/_next/static/css/{7889a30fe9c83846.css → d8ec94d00b6bf837.css} +1 -1
- khoj/interface/compiled/_next/static/media/140e5638e63f96c7-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/1755441e3a2fa970-s.p.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/4b23ab4cc10b07bc-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/b8c807255d58fc43-s.woff2 +0 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +3 -3
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +4 -4
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +4 -4
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +3 -3
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +5 -5
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +3 -3
- khoj/processor/conversation/openai/gpt.py +3 -5
- khoj/processor/conversation/openai/utils.py +12 -9
- khoj/routers/research.py +1 -1
- khoj/utils/helpers.py +2 -2
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/METADATA +4 -4
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/RECORD +89 -87
- khoj/interface/compiled/_next/static/chunks/1225.ecac11e7421504c4.js +0 -36
- khoj/interface/compiled/_next/static/chunks/1320.ae930ad00affe685.js +0 -5
- khoj/interface/compiled/_next/static/chunks/1327-e254819a9172cfa7.js +0 -20
- khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1940.d082758bd04e08ae.js +0 -4
- khoj/interface/compiled/_next/static/chunks/2327-438aaec1657c5ada.js +0 -1
- khoj/interface/compiled/_next/static/chunks/2475.57a0d0fd93d07af0.js +0 -93
- khoj/interface/compiled/_next/static/chunks/2481.5ce6524ba0a73f90.js +0 -55
- khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js +0 -1
- khoj/interface/compiled/_next/static/chunks/297.4c4c823ff6e3255b.js +0 -174
- khoj/interface/compiled/_next/static/chunks/3973.dc54a39586ab48be.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4241.c1cd170f7f37ac59.js +0 -24
- khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4505.f09454a346269c3f.js +0 -117
- khoj/interface/compiled/_next/static/chunks/549.2bd27f59a91a9668.js +0 -148
- khoj/interface/compiled/_next/static/chunks/584.d7ce3505f169b706.js +0 -1
- khoj/interface/compiled/_next/static/chunks/6240.34f7c1fa692edd61.js +0 -24
- khoj/interface/compiled/_next/static/chunks/6d3fe5a5-f9f3c16e0bc0cdf9.js +0 -10
- khoj/interface/compiled/_next/static/chunks/7200-93ab0072359b8028.js +0 -1
- khoj/interface/compiled/_next/static/chunks/7553.f5ad54b1f6e92c49.js +0 -131
- khoj/interface/compiled/_next/static/chunks/7626-1b630f1654172341.js +0 -1
- khoj/interface/compiled/_next/static/chunks/764.dadd316e8e16d191.js +0 -63
- khoj/interface/compiled/_next/static/chunks/78.08169ab541abab4f.js +0 -43
- khoj/interface/compiled/_next/static/chunks/784.e03acf460df213d1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8086.8d39887215807fcd.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8168.f074ab8c7c16d82d.js +0 -59
- khoj/interface/compiled/_next/static/chunks/8223.1705878fa7a09292.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8483.94f6c9e2bee86f50.js +0 -215
- khoj/interface/compiled/_next/static/chunks/8810.fc0e479de78c7c61.js +0 -29
- khoj/interface/compiled/_next/static/chunks/8909.14ac3f43d0070cf1.js +0 -88
- khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9167.098534184f03fe92.js +0 -56
- khoj/interface/compiled/_next/static/chunks/9537.e934ce37bf314509.js +0 -166
- khoj/interface/compiled/_next/static/chunks/9574.3fe8e26e95bf1c34.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9643.b34248df52ffc77c.js +0 -262
- khoj/interface/compiled/_next/static/chunks/9747.2fd9065b1435abb1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9808-bd5d7361ad026094.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9922.98f2b2a9959b4ebe.js +0 -1
- khoj/interface/compiled/_next/static/chunks/webpack-820bd66958a5e279.js +0 -1
- khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/85fe2766c5e6072a-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → uYxzoECdaO5T7Rd_Wa44U}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → uYxzoECdaO5T7Rd_Wa44U}/_ssgManifest.js +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/WHEEL +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/entry_points.txt +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b16.dev8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1822],{11822:function(t,e,i){i.d(e,{diagram:function(){return P}});var n=i(55166),s=i(31954),r=i(84370),a=i(32927),o=i(8279),l=i(58898),c=function(){var t=(0,s.eW)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[6,8,10,11,12,14,16,17,20,21],i=[1,9],n=[1,10],r=[1,11],a=[1,12],o=[1,13],l=[1,16],c=[1,17],h={trace:(0,s.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,s.eW)(function(t,e,i,n,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:n.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:n.addTask(r[o],0,""),this.$=r[o];break;case 16:n.addEvent(r[o].substr(2)),this.$=r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:r,16:a,17:o,18:14,19:15,20:l,21:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:i,12:n,14:r,16:a,17:o,18:14,19:15,20:l,21:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,s.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,s.eW)(function(t){var e=this,i=[0],n=[],r=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.eW)(function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,s.eW)(_,"lex");for(var b,k,x,v,W,S,w,$,E,M={};;){if(x=i[i.length-1],this.defaultActions[x]?v=this.defaultActions[x]:(null==b&&(b=_()),v=o[x]&&o[x][b]),void 0===v||!v.length||!v[0]){var I="";for(S in E=[],o[x])this.terminals_[S]&&S>2&&E.push("'"+this.terminals_[S]+"'");I=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(v[0]){case 1:i.push(b),r.push(p.yytext),a.push(p.yylloc),i.push(v[1]),b=null,k?(b=k,k=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc,u>0&&u--);break;case 2:if(w=this.productions_[v[1]][1],M.$=r[r.length-w],M._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(W=this.performAction.apply(M,[l,h,c,g.yy,v[1],r,a].concat(d))))return W;w&&(i=i.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),i.push(this.productions_[v[1]][0]),r.push(M.$),a.push(M._$),$=o[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},u={EOF:1,parseError:(0,s.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,s.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.eW)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.eW)(function(){return this._more=!0,this},"more"),reject:(0,s.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.eW)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in s)this[r]=s[r];return!1},"test_match"),next:(0,s.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,n,s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,s.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.eW)(function(t,e,i,n){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};function d(){this.yy={}}return h.lexer=u,(0,s.eW)(d,"Parser"),d.prototype=h,h.Parser=d,new d}();c.parser=c;var h={};(0,s.r2)(h,{addEvent:()=>v,addSection:()=>_,addTask:()=>x,addTaskOrg:()=>W,clear:()=>m,default:()=>w,getCommonDb:()=>f,getSections:()=>b,getTasks:()=>k});var u="",d=0,p=[],g=[],y=[],f=(0,s.eW)(()=>n.LJ,"getCommonDb"),m=(0,s.eW)(function(){p.length=0,g.length=0,u="",y.length=0,(0,n.ZH)()},"clear"),_=(0,s.eW)(function(t){u=t,p.push(t)},"addSection"),b=(0,s.eW)(function(){return p},"getSections"),k=(0,s.eW)(function(){let t=S(),e=0;for(;!t&&e<100;)t=S(),e++;return g.push(...y),g},"getTasks"),x=(0,s.eW)(function(t,e,i){let n={id:d++,section:u,type:u,task:t,score:e||0,events:i?[i]:[]};y.push(n)},"addTask"),v=(0,s.eW)(function(t){y.find(t=>t.id===d-1).events.push(t)},"addEvent"),W=(0,s.eW)(function(t){let e={section:u,type:u,description:t,task:t,classes:[]};g.push(e)},"addTaskOrg"),S=(0,s.eW)(function(){let t=(0,s.eW)(function(t){return y[t].processed},"compileTask"),e=!0;for(let[i,n]of y.entries())t(i),e=e&&n.processed;return e},"compileTasks"),w={clear:m,getCommonDb:f,addSection:_,getSections:b,getTasks:k,addTask:x,addTaskOrg:W,addEvent:v},$=(0,s.eW)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function E(t,e){t.each(function(){var t,i=(0,r.Ys)(this),n=i.text().split(/(\s+|<br>)/).reverse(),s=[],a=i.attr("y"),o=parseFloat(i.attr("dy")),l=i.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let r=0;r<n.length;r++)t=n[n.length-1-r],s.push(t),l.text(s.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(s.pop(),l.text(s.join(" ").trim()),s="<br>"===t?[""]:[t],l=i.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,s.eW)(E,"wrap");var M=(0,s.eW)(function(t,e,i,n){let s=i%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);let a=r.append("g"),o=r.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=l.height+.55*c+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),T(a,e,s,n),e},"drawNode"),I=(0,s.eW)(function(t,e,i){let n=t.append("g"),s=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),r=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return n.remove(),s.height+.55*r+e.padding},"getVirtualNodeHeight"),T=(0,s.eW)(function(t,e,i){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${-e.height+10} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+i).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),N={initGraphics:$,drawNode:M,getVirtualNodeHeight:I},C=(0,s.eW)(function(t,e,i,a){let o;let l=(0,n.nV)(),c=l.timeline?.leftMargin??50;s.cM.debug("timeline",a.db);let h=l.securityLevel;"sandbox"===h&&(o=(0,r.Ys)("#i"+e));let u=("sandbox"===h?(0,r.Ys)(o.nodes()[0].contentDocument.body):(0,r.Ys)("body")).select("#"+e);u.append("g");let d=a.db.getTasks(),p=a.db.getCommonDb().getDiagramTitle();s.cM.debug("task",d),N.initGraphics(u);let g=a.db.getSections();s.cM.debug("sections",g);let y=0,f=0,m=0,_=0,b=50+c,k=50;_=50;let x=0,v=!0;g.forEach(function(t){let e={number:x,descr:t,section:x,width:150,padding:20,maxHeight:y},i=N.getVirtualNodeHeight(u,e,l);s.cM.debug("sectionHeight before draw",i),y=Math.max(y,i+20)});let W=0,S=0;for(let[t,e]of(s.cM.debug("tasks.length",d.length),d.entries())){let i={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:f},n=N.getVirtualNodeHeight(u,i,l);s.cM.debug("taskHeight before draw",n),f=Math.max(f,n+20),W=Math.max(W,e.events.length);let r=0;for(let t of e.events){let i={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=N.getVirtualNodeHeight(u,i,l)}e.events.length>0&&(r+=(e.events.length-1)*10),S=Math.max(S,r)}s.cM.debug("maxSectionHeight before draw",y),s.cM.debug("maxTaskHeight before draw",f),g&&g.length>0?g.forEach(t=>{let e=d.filter(e=>e.section===t),i={number:x,descr:t,section:x,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y};s.cM.debug("sectionNode",i);let n=u.append("g"),r=N.drawNode(n,i,x,l);s.cM.debug("sectionNode output",r),n.attr("transform",`translate(${b}, ${_})`),k+=y+50,e.length>0&&H(u,e,x,b,k,f,l,W,S,y,!1),b+=200*Math.max(e.length,1),k=_,x++}):(v=!1,H(u,d,x,b,k,f,l,W,S,y,!0));let w=u.node().getBBox();s.cM.debug("bounds",w),p&&u.append("text").text(p).attr("x",w.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=v?y+f+150:f+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",m).attr("x2",w.width+3*c).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,n.j7)(void 0,u,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)},"draw"),H=(0,s.eW)(function(t,e,i,n,r,a,o,l,c,h,u){for(let l of e){let e={descr:l.task,section:i,number:i,width:150,padding:20,maxHeight:a};s.cM.debug("taskNode",e);let h=t.append("g").attr("class","taskWrapper"),d=N.drawNode(h,e,i,o).height;if(s.cM.debug("taskHeight after draw",d),h.attr("transform",`translate(${n}, ${r})`),a=Math.max(a,d),l.events){let e=t.append("g").attr("class","lineWrapper");r+=100,L(t,l.events,i,n,r,o),r-=100,e.append("line").attr("x1",n+95).attr("y1",r+a).attr("x2",n+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n+=200,u&&!o.timeline?.disableMulticolor&&i++}},"drawTasks"),L=(0,s.eW)(function(t,e,i,n,r,a){let o=0,l=r;for(let l of(r+=100,e)){let e={descr:l,section:i,number:i,width:150,padding:20,maxHeight:50};s.cM.debug("eventNode",e);let c=t.append("g").attr("class","eventWrapper"),h=N.drawNode(c,e,i,a).height;o+=h,c.attr("transform",`translate(${n}, ${r})`),r=r+10+h}return r=l,o},"drawEvents"),A={setConf:(0,s.eW)(()=>{},"setConf"),draw:C},O=(0,s.eW)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,a.Z)(t["lineColor"+e])?t["lineColor"+e]=(0,o.Z)(t["lineColor"+e],20):t["lineColor"+e]=(0,l.Z)(t["lineColor"+e],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){let n=""+(17-3*i);e+=`
|
2
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {
|
3
|
+
fill: ${t["cScale"+i]};
|
4
|
+
}
|
5
|
+
.section-${i-1} text {
|
6
|
+
fill: ${t["cScaleLabel"+i]};
|
7
|
+
}
|
8
|
+
.node-icon-${i-1} {
|
9
|
+
font-size: 40px;
|
10
|
+
color: ${t["cScaleLabel"+i]};
|
11
|
+
}
|
12
|
+
.section-edge-${i-1}{
|
13
|
+
stroke: ${t["cScale"+i]};
|
14
|
+
}
|
15
|
+
.edge-depth-${i-1}{
|
16
|
+
stroke-width: ${n};
|
17
|
+
}
|
18
|
+
.section-${i-1} line {
|
19
|
+
stroke: ${t["cScaleInv"+i]} ;
|
20
|
+
stroke-width: 3;
|
21
|
+
}
|
22
|
+
|
23
|
+
.lineWrapper line{
|
24
|
+
stroke: ${t["cScaleLabel"+i]} ;
|
25
|
+
}
|
26
|
+
|
27
|
+
.disabled, .disabled circle, .disabled text {
|
28
|
+
fill: lightgray;
|
29
|
+
}
|
30
|
+
.disabled text {
|
31
|
+
fill: #efefef;
|
32
|
+
}
|
33
|
+
`}return e},"genSections"),P={db:h,renderer:A,parser:c,styles:(0,s.eW)(t=>`
|
34
|
+
.edge {
|
35
|
+
stroke-width: 3;
|
36
|
+
}
|
37
|
+
${O(t)}
|
38
|
+
.section-root rect, .section-root path, .section-root circle {
|
39
|
+
fill: ${t.git0};
|
40
|
+
}
|
41
|
+
.section-root text {
|
42
|
+
fill: ${t.gitBranchLabel0};
|
43
|
+
}
|
44
|
+
.icon-container {
|
45
|
+
height:100%;
|
46
|
+
display: flex;
|
47
|
+
justify-content: center;
|
48
|
+
align-items: center;
|
49
|
+
}
|
50
|
+
.edge {
|
51
|
+
fill: none;
|
52
|
+
}
|
53
|
+
.eventWrapper {
|
54
|
+
filter: brightness(120%);
|
55
|
+
}
|
56
|
+
`,"getStyles")}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1915],{41915:function(e,t,r){r.d(t,{Dx:function(){return $},aU:function(){return et},dk:function(){return ee},fC:function(){return Z},l_:function(){return Q},x8:function(){return er},zt:function(){return J}});var n=r(2265),o=r(54887),i=r(6741),a=r(98575),s=r(58068),l=r(73966),u=r(22308),c=r(83832),d=r(71599),p=r(66840),f=r(26606),v=r(80886),w=r(61188),m=r(95098),E=r(57437),x="ToastProvider",[y,T,h]=(0,s.B)("Toast"),[g,b]=(0,l.b)("Toast",[h]),[C,P]=g(x),j=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[l,u]=n.useState(null),[c,d]=n.useState(0),p=n.useRef(!1),f=n.useRef(!1);return r.trim()||console.error("Invalid prop `label` supplied to `".concat(x,"`. Expected non-empty `string`.")),(0,E.jsx)(y.Provider,{scope:t,children:(0,E.jsx)(C,{scope:t,label:r,duration:o,swipeDirection:i,swipeThreshold:a,toastCount:c,viewport:l,onViewportChange:u,onToastAdd:n.useCallback(()=>d(e=>e+1),[]),onToastRemove:n.useCallback(()=>d(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f,children:s})})};j.displayName=x;var R="ToastViewport",L=["F8"],N="toast.viewportPause",D="toast.viewportResume",M=n.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=L,label:i="Notifications ({hotkey})",...s}=e,l=P(R,r),c=T(r),d=n.useRef(null),f=n.useRef(null),v=n.useRef(null),w=n.useRef(null),m=(0,a.e)(t,w,l.onViewportChange),x=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=l.toastCount>0;n.useEffect(()=>{let e=e=>{var t;0!==o.length&&o.every(t=>e[t]||e.code===t)&&(null===(t=w.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),n.useEffect(()=>{let e=d.current,t=w.current;if(h&&e&&t){let r=()=>{if(!l.isClosePausedRef.current){let e=new CustomEvent(N);t.dispatchEvent(e),l.isClosePausedRef.current=!0}},n=()=>{if(l.isClosePausedRef.current){let e=new CustomEvent(D);t.dispatchEvent(e),l.isClosePausedRef.current=!1}},o=t=>{e.contains(t.relatedTarget)||n()},i=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",i),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[h,l.isClosePausedRef]);let g=n.useCallback(e=>{let{tabbingDirection:t}=e,r=c().map(e=>{let r=e.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===t?n:n.reverse()});return("forwards"===t?r.reverse():r).flat()},[c]);return n.useEffect(()=>{let e=w.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){var n,o,i;let r=document.activeElement,a=t.shiftKey;if(t.target===e&&a){null===(n=f.current)||void 0===n||n.focus();return}let s=g({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex(e=>e===r);G(s.slice(l+1))?t.preventDefault():a?null===(o=f.current)||void 0===o||o.focus():null===(i=v.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[c,g]),(0,E.jsxs)(u.I0,{ref:d,role:"region","aria-label":i.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,E.jsx)(F,{ref:f,onFocusFromOutsideViewport:()=>{G(g({tabbingDirection:"forwards"}))}}),(0,E.jsx)(y.Slot,{scope:r,children:(0,E.jsx)(p.WV.ol,{tabIndex:-1,...s,ref:m})}),h&&(0,E.jsx)(F,{ref:v,onFocusFromOutsideViewport:()=>{G(g({tabbingDirection:"backwards"}))}})]})});M.displayName=R;var k="ToastFocusProxy",F=n.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,i=P(k,r);return(0,E.jsx)(m.TX,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{var t;let r=e.relatedTarget;(null===(t=i.viewport)||void 0===t?void 0:t.contains(r))||n()}})});F.displayName=k;var S="Toast",I=n.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...s}=e,[l,u]=(0,v.T)({prop:n,defaultProp:null==o||o,onChange:a,caller:S});return(0,E.jsx)(d.z,{present:r||l,children:(0,E.jsx)(W,{open:l,...s,ref:t,onClose:()=>u(!1),onPause:(0,f.W)(e.onPause),onResume:(0,f.W)(e.onResume),onSwipeStart:(0,i.Mj)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,i.Mj)(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y","".concat(r,"px"))}),onSwipeCancel:(0,i.Mj)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,i.Mj)(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y","".concat(r,"px")),u(!1)})})})});I.displayName=S;var[A,K]=g(S,{onClose(){}}),W=n.forwardRef((e,t)=>{let{__scopeToast:r,type:s="foreground",duration:l,open:c,onClose:d,onEscapeKeyDown:v,onPause:w,onResume:m,onSwipeStart:x,onSwipeMove:T,onSwipeCancel:h,onSwipeEnd:g,...b}=e,C=P(S,r),[j,R]=n.useState(null),L=(0,a.e)(t,e=>R(e)),M=n.useRef(null),k=n.useRef(null),F=l||C.duration,I=n.useRef(0),K=n.useRef(F),W=n.useRef(0),{onToastAdd:_,onToastRemove:O}=C,X=(0,f.W)(()=>{var e;(null==j?void 0:j.contains(document.activeElement))&&(null===(e=C.viewport)||void 0===e||e.focus()),d()}),U=n.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(W.current),I.current=new Date().getTime(),W.current=window.setTimeout(X,e))},[X]);n.useEffect(()=>{let e=C.viewport;if(e){let t=()=>{U(K.current),null==m||m()},r=()=>{let e=new Date().getTime()-I.current;K.current=K.current-e,window.clearTimeout(W.current),null==w||w()};return e.addEventListener(N,r),e.addEventListener(D,t),()=>{e.removeEventListener(N,r),e.removeEventListener(D,t)}}},[C.viewport,F,w,m,U]),n.useEffect(()=>{c&&!C.isClosePausedRef.current&&U(F)},[c,F,C.isClosePausedRef,U]),n.useEffect(()=>(_(),()=>O()),[_,O]);let H=n.useMemo(()=>j?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,o=""===t.dataset.radixToastAnnounceExclude;if(!n){if(o){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}}),r}(j):null,[j]);return C.viewport?(0,E.jsxs)(E.Fragment,{children:[H&&(0,E.jsx)(V,{__scopeToast:r,role:"status","aria-live":"foreground"===s?"assertive":"polite",children:H}),(0,E.jsx)(A,{scope:r,onClose:X,children:o.createPortal((0,E.jsx)(y.ItemSlot,{scope:r,children:(0,E.jsx)(u.fC,{asChild:!0,onEscapeKeyDown:(0,i.Mj)(v,()=>{C.isFocusedToastEscapeKeyDownRef.current||X(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,E.jsx)(p.WV.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":C.swipeDirection,...b,ref:L,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,i.Mj)(e.onKeyDown,e=>{"Escape"!==e.key||(null==v||v(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:(0,i.Mj)(e.onPointerDown,e=>{0===e.button&&(M.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,i.Mj)(e.onPointerMove,e=>{if(!M.current)return;let t=e.clientX-M.current.x,r=e.clientY-M.current.y,n=!!k.current,o=["left","right"].includes(C.swipeDirection),i=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,r),l="touch"===e.pointerType?10:2,u={x:a,y:s},c={originalEvent:e,delta:u};n?(k.current=u,Y("toast.swipeMove",T,c,{discrete:!1})):B(u,C.swipeDirection,l)?(k.current=u,Y("toast.swipeStart",x,c,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(M.current=null)}),onPointerUp:(0,i.Mj)(e.onPointerUp,e=>{let t=k.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),k.current=null,M.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};B(t,C.swipeDirection,C.swipeThreshold)?Y("toast.swipeEnd",g,n,{discrete:!0}):Y("toast.swipeCancel",h,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),V=e=>{let{__scopeToast:t,children:r,...o}=e,i=P(S,t),[a,s]=n.useState(!1),[l,u]=n.useState(!1);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=(0,f.W)(e);(0,w.b)(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>s(!0)),n.useEffect(()=>{let e=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(e)},[]),l?null:(0,E.jsx)(c.h,{asChild:!0,children:(0,E.jsx)(m.TX,{...o,children:a&&(0,E.jsxs)(E.Fragment,{children:[i.label," ",r]})})})},_=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,E.jsx)(p.WV.div,{...n,ref:t})});_.displayName="ToastTitle";var O=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,E.jsx)(p.WV.div,{...n,ref:t})});O.displayName="ToastDescription";var X="ToastAction",U=n.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,E.jsx)(z,{altText:r,asChild:!0,children:(0,E.jsx)(q,{...n,ref:t})}):(console.error("Invalid prop `altText` supplied to `".concat(X,"`. Expected non-empty `string`.")),null)});U.displayName=X;var H="ToastClose",q=n.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=K(H,r);return(0,E.jsx)(z,{asChild:!0,children:(0,E.jsx)(p.WV.button,{type:"button",...n,ref:t,onClick:(0,i.Mj)(e.onClick,o.onClose)})})});q.displayName=H;var z=n.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,E.jsx)(p.WV.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Y(e,t,r,n){let{discrete:o}=n,i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),o?(0,p.jH)(i,a):i.dispatchEvent(a)}var B=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return"left"===t||"right"===t?i&&n>r:!i&&o>r};function G(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var J=j,Q=M,Z=I,$=_,ee=O,et=U,er=q}}]);
|