<commit_before><commit_msg>XWIKI-18860: Cleanup and integrate the Netflux front-end (realtime-netflux-frontend) * Cleanup the home page<commit_after><?xml version="1.1" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<xwikidoc version="1.4" reference="RTFrontend.WebHome" locale="">
  <web>RTFrontend</web>
  <name>WebHome</name>
  <language/>
  <defaultLanguage/>
  <translation>0</translation>
  <creator>xwiki:XWiki.Admin</creator>
  <parent>xwiki:XWiki.WebHome</parent>
  <author>xwiki:XWiki.Admin</author>
  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>
  <version>1.1</version>
  <title>Realtime WebHome</title>
  <comment/>
  <minorEdit>false</minorEdit>
  <syntaxId>xwiki/2.1</syntaxId>
  <hidden>true</hidden>
  <content>{{info}}This document contains the internal code which makes the realtime editors work.{{/info}}
</content>
  <object>
    <name>RTFrontend.WebHome</name>
    <number>0</number>
    <className>RTFrontend.ConfigurationClass</className>
    <guid>e494f23d-7d7c-4b73-ad77-d91a32053155</guid>
    <class>
      <name>RTFrontend.ConfigurationClass</name>
      <customClass/>
      <customMapping/>
      <defaultViewSheet/>
      <defaultEditSheet/>
      <defaultWeb/>
      <nameField/>
      <validationScript/>
      <enableMerge>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayFormType>checkbox</displayFormType>
        <displayType/>
        <name>enableMerge</name>
        <number>4</number>
        <prettyName>Try to merge the content when saving a document (disable only if it causes issues)</prettyName>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </enableMerge>
      <marginAvatar>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayFormType>checkbox</displayFormType>
        <displayType/>
        <name>marginAvatar</name>
        <number>3</number>
        <prettyName>Show avatars in the margin (if available)</prettyName>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </marginAvatar>
      <toolbarUserlist>
        <cache>0</cache>
        <customDisplay/>
        <disabled>0</disabled>
        <displayType>select</displayType>
        <multiSelect>0</multiSelect>
        <name>toolbarUserlist</name>
        <number>2</number>
        <picker>0</picker>
        <prettyName>Connected user list in the toolbar</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator> </separator>
        <separators>|, </separators>
        <size>1</size>
        <sort>none</sort>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <values>name=Display only usernames|avatar=Display only avatars|both=Display usernames and avatars</values>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </toolbarUserlist>
      <useGlobalConfig>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayFormType>checkbox</displayFormType>
        <displayType/>
        <name>useGlobalConfig</name>
        <number>1</number>
        <prettyName>Use the main wiki configuration</prettyName>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </useGlobalConfig>
    </class>
    <property>
      <enableMerge>1</enableMerge>
    </property>
    <property>
      <marginAvatar>1</marginAvatar>
    </property>
    <property>
      <toolbarUserlist>both</toolbarUserlist>
    </property>
    <property>
      <useGlobalConfig>1</useGlobalConfig>
    </property>
  </object>
  <object>
    <name>RTFrontend.WebHome</name>
    <number>0</number>
    <className>XWiki.ConfigurableClass</className>
    <guid>ceaf1c43-5341-4adb-8840-b2785a7967b4</guid>
    <class>
      <name>XWiki.ConfigurableClass</name>
      <customClass/>
      <customMapping/>
      <defaultViewSheet/>
      <defaultEditSheet/>
      <defaultWeb/>
      <nameField/>
      <validationScript/>
      <categoryIcon>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>categoryIcon</name>
        <number>11</number>
        <picker>0</picker>
        <prettyName>categoryIcon</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </categoryIcon>
      <codeToExecute>
        <contenttype>VelocityWiki</contenttype>
        <customDisplay/>
        <disabled>0</disabled>
        <editor>---</editor>
        <hint/>
        <name>codeToExecute</name>
        <number>7</number>
        <picker>0</picker>
        <prettyName>codeToExecute</prettyName>
        <rows>5</rows>
        <size>40</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
      </codeToExecute>
      <configurationClass>
        <cache>0</cache>
        <classname/>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayType>input</displayType>
        <freeText/>
        <hint/>
        <idField/>
        <largeStorage>0</largeStorage>
        <multiSelect>0</multiSelect>
        <name>configurationClass</name>
        <number>3</number>
        <picker>1</picker>
        <prettyName>configurationClass</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator> </separator>
        <separators/>
        <size>30</size>
        <sort>none</sort>
        <sql/>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <valueField/>
        <classType>com.xpn.xwiki.objects.classes.PageClass</classType>
      </configurationClass>
      <configureGlobally>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayFormType>checkbox</displayFormType>
        <displayType/>
        <hint/>
        <name>configureGlobally</name>
        <number>4</number>
        <prettyName>configureGlobally</prettyName>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </configureGlobally>
      <displayBeforeCategory>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>displayBeforeCategory</name>
        <number>10</number>
        <picker>0</picker>
        <prettyName>displayBeforeCategory</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </displayBeforeCategory>
      <displayInCategory>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>displayInCategory</name>
        <number>9</number>
        <picker>0</picker>
        <prettyName>displayInCategory</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </displayInCategory>
      <displayInSection>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>displayInSection</name>
        <number>1</number>
        <picker>0</picker>
        <prettyName>displayInSection</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </displayInSection>
      <heading>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>heading</name>
        <number>2</number>
        <picker>0</picker>
        <prettyName>heading</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </heading>
      <iconAttachment>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>iconAttachment</name>
        <number>8</number>
        <picker>0</picker>
        <prettyName>iconAttachment</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </iconAttachment>
      <linkPrefix>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>linkPrefix</name>
        <number>5</number>
        <picker>0</picker>
        <prettyName>linkPrefix</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </linkPrefix>
      <propertiesToShow>
        <cache>0</cache>
        <customDisplay/>
        <defaultValue/>
        <disabled>0</disabled>
        <displayType>input</displayType>
        <freeText/>
        <hint/>
        <largeStorage>0</largeStorage>
        <multiSelect>1</multiSelect>
        <name>propertiesToShow</name>
        <number>6</number>
        <picker>0</picker>
        <prettyName>propertiesToShow</prettyName>
        <relationalStorage>1</relationalStorage>
        <separator> </separator>
        <separators> ,|</separators>
        <size>20</size>
        <sort>none</sort>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <values/>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </propertiesToShow>
      <sectionOrder>
        <customDisplay/>
        <disabled>0</disabled>
        <hint/>
        <name>sectionOrder</name>
        <number>12</number>
        <numberType>integer</numberType>
        <prettyName>sectionOrder</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <validationMessage/>
        <validationRegExp/>
        <classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
      </sectionOrder>
    </class>
    <property>
      <categoryIcon/>
    </property>
    <property>
      <codeToExecute>#set ($discard = $xwiki.jsx.use('RTFrontend.WebHome'))</codeToExecute>
    </property>
    <property>
      <configurationClass>RTFrontend.ConfigurationClass</configurationClass>
    </property>
    <property>
      <configureGlobally>1</configureGlobally>
    </property>
    <property>
      <displayBeforeCategory/>
    </property>
    <property>
      <displayInCategory/>
    </property>
    <property>
      <displayInSection>Realtime Editors</displayInSection>
    </property>
    <property>
      <heading>Commons</heading>
    </property>
    <property>
      <iconAttachment/>
    </property>
    <property>
      <linkPrefix/>
    </property>
    <property>
      <propertiesToShow/>
    </property>
    <property>
      <sectionOrder/>
    </property>
  </object>
  <object>
    <name>RTFrontend.WebHome</name>
    <number>0</number>
    <className>XWiki.JavaScriptExtension</className>
    <guid>21a44d03-8679-493a-8408-8ae799a82faf</guid>
    <class>
      <name>XWiki.JavaScriptExtension</name>
      <customClass/>
      <customMapping/>
      <defaultViewSheet/>
      <defaultEditSheet/>
      <defaultWeb/>
      <nameField/>
      <validationScript/>
      <cache>
        <cache>0</cache>
        <defaultValue>long</defaultValue>
        <disabled>0</disabled>
        <displayType>select</displayType>
        <freeText>forbidden</freeText>
        <largeStorage>0</largeStorage>
        <multiSelect>0</multiSelect>
        <name>cache</name>
        <number>5</number>
        <prettyName>Caching policy</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator> </separator>
        <separators>|, </separators>
        <size>1</size>
        <unmodifiable>0</unmodifiable>
        <values>long|short|default|forbid</values>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </cache>
      <code>
        <contenttype>PureText</contenttype>
        <disabled>0</disabled>
        <editor>PureText</editor>
        <name>code</name>
        <number>2</number>
        <prettyName>Code</prettyName>
        <rows>20</rows>
        <size>50</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
      </code>
      <name>
        <disabled>0</disabled>
        <name>name</name>
        <number>1</number>
        <prettyName>Name</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </name>
      <parse>
        <disabled>0</disabled>
        <displayFormType>select</displayFormType>
        <displayType>yesno</displayType>
        <name>parse</name>
        <number>4</number>
        <prettyName>Parse content</prettyName>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </parse>
      <use>
        <cache>0</cache>
        <disabled>0</disabled>
        <displayType>select</displayType>
        <freeText>forbidden</freeText>
        <largeStorage>0</largeStorage>
        <multiSelect>0</multiSelect>
        <name>use</name>
        <number>3</number>
        <prettyName>Use this extension</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator> </separator>
        <separators>|, </separators>
        <size>1</size>
        <unmodifiable>0</unmodifiable>
        <values>currentPage|onDemand|always</values>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </use>
    </class>
    <property>
      <cache>long</cache>
    </property>
    <property>
      <code>require(['jquery'], function ($) {
  var form = $('#realtime\\ editors_RTFrontend\\.WebHome');
  if (XWiki.mainWiki === XWiki.currentWiki) {
    form.find('dt:first').hide();
    return;
  }
  var onChange = function () {
    var useGlobal = $(this).prop('checked');
    form.find('input:visible, textarea:visible, select:visible').prop('disabled', useGlobal);
    $(this).prop('disabled', false);
  };
  $('#RTFrontend\\.WebHome_RTFrontend\\.ConfigurationClass_0_useGlobalConfig').change(onChange).trigger('change');
});</code>
    </property>
    <property>
      <name/>
    </property>
    <property>
      <parse>0</parse>
    </property>
    <property>
      <use>onDemand</use>
    </property>
  </object>
  <object>
    <name>RTFrontend.WebHome</name>
    <number>0</number>
    <className>XWiki.UIExtensionClass</className>
    <guid>7d75c87f-14d2-4d68-9b96-7e7fbc4dcaaf</guid>
    <class>
      <name>XWiki.UIExtensionClass</name>
      <customClass/>
      <customMapping/>
      <defaultViewSheet/>
      <defaultEditSheet/>
      <defaultWeb/>
      <nameField/>
      <validationScript/>
      <async_cached>
        <defaultValue>0</defaultValue>
        <disabled>0</disabled>
        <displayFormType>select</displayFormType>
        <displayType/>
        <name>async_cached</name>
        <number>3</number>
        <prettyName>Cached</prettyName>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </async_cached>
      <async_context>
        <cache>0</cache>
        <disabled>0</disabled>
        <displayType>select</displayType>
        <freeText>forbidden</freeText>
        <largeStorage>0</largeStorage>
        <multiSelect>1</multiSelect>
        <name>async_context</name>
        <number>4</number>
        <prettyName>Context elements</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator>, </separator>
        <separators>|, </separators>
        <size>5</size>
        <unmodifiable>0</unmodifiable>
        <values>action=Action|doc.reference=Document|icon.theme=Icon theme|locale=Language|rendering.defaultsyntax=Default syntax|rendering.restricted=Restricted|rendering.targetsyntax=Target syntax|request.base=Request base URL|request.parameters=Request parameters|request.url=Request URL|request.wiki=Request wiki|user=User|wiki=Wiki</values>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </async_context>
      <async_enabled>
        <defaultValue>0</defaultValue>
        <disabled>0</disabled>
        <displayFormType>select</displayFormType>
        <displayType/>
        <name>async_enabled</name>
        <number>2</number>
        <prettyName>Asynchronous rendering</prettyName>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </async_enabled>
      <content>
        <disabled>0</disabled>
        <editor>Text</editor>
        <name>content</name>
        <number>1</number>
        <prettyName>Executed Content</prettyName>
        <rows>25</rows>
        <size>120</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
      </content>
      <extensionPointId>
        <disabled>0</disabled>
        <name>extensionPointId</name>
        <number>5</number>
        <prettyName>Extension Point ID</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </extensionPointId>
      <name>
        <disabled>0</disabled>
        <name>name</name>
        <number>6</number>
        <prettyName>Extension ID</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </name>
      <parameters>
        <contenttype>PureText</contenttype>
        <disabled>0</disabled>
        <editor>PureText</editor>
        <name>parameters</name>
        <number>7</number>
        <prettyName>Extension Parameters</prettyName>
        <rows>10</rows>
        <size>40</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
      </parameters>
      <scope>
        <cache>0</cache>
        <disabled>0</disabled>
        <displayType>select</displayType>
        <freeText>forbidden</freeText>
        <largeStorage>0</largeStorage>
        <multiSelect>0</multiSelect>
        <name>scope</name>
        <number>8</number>
        <prettyName>Extension Scope</prettyName>
        <relationalStorage>0</relationalStorage>
        <separator> </separator>
        <separators>|, </separators>
        <size>1</size>
        <unmodifiable>0</unmodifiable>
        <values>wiki=Current Wiki|user=Current User|global=Global</values>
        <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
      </scope>
    </class>
    <property>
      <async_cached>0</async_cached>
    </property>
    <property>
      <async_context/>
    </property>
    <property>
      <async_enabled>0</async_enabled>
    </property>
    <property>
      <content>{{velocity}}
{{html clean="false"}}
## FIXME: This is not consistent with the Version service (time vs. versionTime).
#set ($versionInfo = {
  'version': $tdoc.version,
  'locale': $tdoc.locale,
  'time': $tdoc.date.time
})
#set ($configRef = $services.model.resolveDocument('RTFrontend.WebHome'))
#set ($configObj = $xwiki.getDocument($configRef).getObject('RTFrontend.ConfigurationClass'))
#if ("$!configObj.getValue('useGlobalConfig')" != '0' &amp;&amp; !$xcontext.isMainWiki())
    #set ($configRef = $services.model.createDocumentReference($xcontext.mainWikiName, 'RTFrontend', 'WebHome'))
    #set ($configObj = $xwiki.getDocument($configRef).getObject('RTFrontend.ConfigurationClass'))
#end
#set ($config = {
  'toolbarUserlist': $configObj.getValue('toolbarUserlist'),
  'marginAvatar': $configObj.getValue('marginAvatar'),
  'enableMerge': $configObj.getValue('enableMerge')
})
&lt;script id="realtime-frontend-getversion" type="application/json"&gt;$jsontool.serialize($versionInfo).replace(
  '&lt;', '\u003C')&lt;/script&gt;
&lt;script id="realtime-frontend-getconfig" type="application/json"&gt;$jsontool.serialize($config).replace(
  '&lt;', '\u003C')&lt;/script&gt;
{{/html}}
{{/velocity}}</content>
    </property>
    <property>
      <extensionPointId>org.xwiki.platform.template.header.after</extensionPointId>
    </property>
    <property>
      <name>header.rtfrontend.getVersion</name>
    </property>
    <property>
      <parameters/>
    </property>
    <property>
      <scope>wiki</scope>
    </property>
  </object>
</xwikidoc>
{'fraction_non_alphanumeric': 0.14209285455204934, 'fraction_numerical': 0.01391911498005078, 'mean_word_length': 2.737841043890866, 'pattern_counts': {'":': 0, '<': 942, '<?xml version=': 1, '>': 942, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2659898', 'n_tokens_mistral': 6892, 'n_tokens_neox': 6735, 'n_words': 921}