From 4d056a19e9c90e7d7ad115ac99452ccca8ac2648 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Thu, 22 Jul 2021 08:50:40 -0600 Subject: [PATCH] Release v2.6.0 Signed-off-by: Ivan Kozlovic --- CMakeLists.txt | 4 +- README.md | 2 +- doc/DoxyFile.NATS.Client | 2 +- doc/html/deprecated.html | 66 +- .../dir_085924db4bed469054a9264cf96b0d5e.html | 61 +- .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 61 +- doc/html/doxygen.svg | 26 + doc/html/dynsections.js | 28 +- doc/html/files.html | 61 +- doc/html/files_dup.js | 7 + doc/html/globals.html | 79 +- doc/html/globals_defs.html | 71 +- doc/html/globals_enum.html | 71 +- doc/html/globals_eval.html | 78 +- doc/html/globals_func.html | 81 +- doc/html/globals_s.html | 79 +- doc/html/globals_type.html | 71 +- doc/html/group__callbacks_group.html | 191 +-- doc/html/group__conn_group.html | 55 +- doc/html/group__conn_mgt_group.html | 341 +++-- doc/html/group__conn_pub_group.html | 156 +- doc/html/group__conn_sub_group.html | 143 +- doc/html/group__env_variables_group.html | 69 +- doc/html/group__func_group.html | 55 +- doc/html/group__inbox_group.html | 73 +- doc/html/group__libevent_functions.html | 91 +- doc/html/group__library_group.html | 199 +-- doc/html/group__libuv_functions.html | 97 +- doc/html/group__msg_group.html | 200 ++- doc/html/group__opts_group.html | 675 +++++---- doc/html/group__stan_conn_group.html | 55 +- doc/html/group__stan_conn_mgt_group.html | 125 +- doc/html/group__stan_conn_opts_group.html | 159 +- doc/html/group__stan_conn_pub_group.html | 73 +- doc/html/group__stan_conn_sub_group.html | 89 +- doc/html/group__stan_msg_group.html | 105 +- doc/html/group__stan_sub_group.html | 111 +- doc/html/group__stan_sub_opts_group.html | 163 +- doc/html/group__stats_group.html | 85 +- doc/html/group__status_group.html | 63 +- doc/html/group__sub_group.html | 297 ++-- doc/html/group__types_group.html | 139 +- doc/html/group__wildcards_group.html | 55 +- doc/html/index.html | 60 +- doc/html/jquery.js | 89 +- doc/html/libevent_8h.html | 61 +- doc/html/libevent_8h_source.html | 271 +++- doc/html/libuv_8h.html | 61 +- doc/html/libuv_8h_source.html | 531 ++++++- doc/html/menu.js | 51 + doc/html/menudata.js | 42 + doc/html/modules.html | 55 +- doc/html/nats_8h.html | 105 +- doc/html/nats_8h_source.html | 1330 +++++++++++++---- doc/html/navtree.css | 7 +- doc/html/navtree.js | 111 +- doc/html/navtreedata.js | 28 +- doc/html/pages.html | 55 +- doc/html/resize.js | 181 ++- doc/html/search/all_0.html | 25 +- doc/html/search/all_0.js | 3 +- doc/html/search/all_1.html | 25 +- doc/html/search/all_1.js | 3 +- doc/html/search/all_2.html | 25 +- doc/html/search/all_2.js | 2 +- doc/html/search/all_3.html | 25 +- doc/html/search/all_3.js | 2 +- doc/html/search/all_4.html | 25 +- doc/html/search/all_4.js | 2 +- doc/html/search/all_5.html | 25 +- doc/html/search/all_5.js | 6 +- doc/html/search/all_6.html | 25 +- doc/html/search/all_6.js | 8 +- doc/html/search/all_7.html | 25 +- doc/html/search/all_7.js | 226 +-- doc/html/search/all_8.html | 25 +- doc/html/search/all_8.js | 225 ++- doc/html/search/all_9.html | 25 +- doc/html/search/all_9.js | 3 +- doc/html/search/all_a.html | 25 +- doc/html/search/all_a.js | 61 +- doc/html/search/all_b.html | 25 +- doc/html/search/all_b.js | 60 +- doc/html/search/all_c.html | 25 +- doc/html/search/all_c.js | 2 +- doc/html/search/all_d.html | 25 +- doc/html/search/all_d.js | 2 +- doc/html/search/close.svg | 31 + doc/html/search/defines_0.html | 25 +- doc/html/search/defines_0.js | 4 +- doc/html/search/enums_0.html | 25 +- doc/html/search/enums_0.js | 4 +- doc/html/search/enumvalues_0.html | 25 +- doc/html/search/enumvalues_0.js | 84 +- doc/html/search/files_0.html | 25 +- doc/html/search/files_0.js | 4 +- doc/html/search/files_1.html | 25 +- doc/html/search/files_1.js | 2 +- doc/html/search/files_2.html | 25 +- doc/html/search/files_2.js | 2 +- doc/html/search/functions_0.html | 25 +- doc/html/search/functions_0.js | 316 ++-- doc/html/search/functions_1.html | 25 +- doc/html/search/functions_1.js | 82 +- doc/html/search/groups_0.html | 25 +- doc/html/search/groups_0.js | 4 +- doc/html/search/groups_1.html | 25 +- doc/html/search/groups_1.js | 2 +- doc/html/search/groups_2.html | 25 +- doc/html/search/groups_2.js | 2 +- doc/html/search/groups_3.html | 25 +- doc/html/search/groups_3.js | 2 +- doc/html/search/groups_4.html | 25 +- doc/html/search/groups_4.js | 6 +- doc/html/search/groups_5.html | 25 +- doc/html/search/groups_5.js | 5 +- doc/html/search/groups_6.html | 25 +- doc/html/search/groups_6.js | 2 +- doc/html/search/groups_7.html | 25 +- doc/html/search/groups_7.js | 3 +- doc/html/search/groups_8.html | 25 +- doc/html/search/groups_8.js | 19 +- doc/html/search/groups_9.html | 25 +- doc/html/search/groups_9.js | 2 +- doc/html/search/groups_a.html | 25 +- doc/html/search/groups_a.js | 2 +- doc/html/search/mag_sel.svg | 74 + doc/html/search/nomatches.html | 5 +- doc/html/search/pages_0.html | 25 +- doc/html/search/pages_0.js | 2 +- doc/html/search/pages_1.html | 37 + doc/html/search/pages_1.js | 4 + doc/html/search/search.css | 110 +- doc/html/search/search.js | 45 +- doc/html/search/search_l.png | Bin 604 -> 567 bytes doc/html/search/search_r.png | Bin 612 -> 553 bytes doc/html/search/searchdata.js | 4 +- doc/html/search/typedefs_0.html | 25 +- doc/html/search/typedefs_0.js | 38 +- doc/html/search/typedefs_1.html | 25 +- doc/html/search/typedefs_1.js | 16 +- doc/html/status_8h.html | 305 ++-- doc/html/status_8h_source.html | 259 ++-- doc/html/tabs.css | 61 +- src/version.h | 6 +- 145 files changed, 6267 insertions(+), 4532 deletions(-) create mode 100644 doc/html/doxygen.svg create mode 100644 doc/html/files_dup.js create mode 100644 doc/html/menu.js create mode 100644 doc/html/menudata.js create mode 100644 doc/html/search/close.svg create mode 100644 doc/html/search/mag_sel.svg create mode 100644 doc/html/search/pages_1.html create mode 100644 doc/html/search/pages_1.js diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ce286040..24680af60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,8 +233,8 @@ endif(NATS_BUILD_WITH_TLS) # Versionning and Doc set(NATS_VERSION_MAJOR 2) -set(NATS_VERSION_MINOR 5) -set(NATS_VERSION_PATCH 1) +set(NATS_VERSION_MINOR 6) +set(NATS_VERSION_PATCH 0) set(NATS_VERSION_SUFFIX "") set(NATS_VERSION_REQUIRED_NUMBER 0x020200) diff --git a/README.md b/README.md index 8a0fb9733..c38f374d8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This NATS Client implementation is heavily based on the [NATS GO Client](https:/ [![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![Build Status](https://travis-ci.com/nats-io/nats.c.svg?branch=main)](https://travis-ci.com/github/nats-io/nats.c) [![Coverage Status](https://coveralls.io/repos/github/nats-io/nats.c/badge.svg?branch=main)](https://coveralls.io/github/nats-io/nats.c?branch=main) -[![Release](https://img.shields.io/badge/release-v2.5.1-blue.svg?style=flat)](https://github.com/nats-io/nats.c/releases/tag/v2.5.1) +[![Release](https://img.shields.io/badge/release-v2.6.0-blue.svg?style=flat)](https://github.com/nats-io/nats.c/releases/tag/v2.6.0) [![Documentation](https://img.shields.io/badge/doc-Doxygen-brightgreen.svg?style=flat)](http://nats-io.github.io/nats.c) [![Total alerts](https://img.shields.io/lgtm/alerts/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/context:cpp) diff --git a/doc/DoxyFile.NATS.Client b/doc/DoxyFile.NATS.Client index 915ad7a85..dcd2b041f 100644 --- a/doc/DoxyFile.NATS.Client +++ b/doc/DoxyFile.NATS.Client @@ -38,7 +38,7 @@ PROJECT_NAME = "NATS C Client with Streaming support" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2.5.1 +PROJECT_NUMBER = 2.6.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/doc/html/deprecated.html b/doc/html/deprecated.html index 1ac163a83..ad6dd2709 100644 --- a/doc/html/deprecated.html +++ b/doc/html/deprecated.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Deprecated List @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@ - + - + + + +
@@ -99,18 +82,19 @@
-
+
Deprecated List
-
globalScope> Member natsSubscription_NoDeliveryDelay (natsSubscription *sub)
-
No longer needed. Will be removed in the future.
-
globalScope> Member natsSubscription_QueuedMsgs (natsSubscription *sub, uint64_t *queuedMsgs)
-
Use natsSubscription_GetPending instead.
+
Member natsSubscription_NoDeliveryDelay (natsSubscription *sub)
+
No longer needed. Will be removed in the future.
+
Member natsSubscription_QueuedMsgs (natsSubscription *sub, uint64_t *queuedMsgs)
+
Use natsSubscription_GetPending instead.
+
diff --git a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html index d621bb605..817cc5988 100644 --- a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html +++ b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: adapters Directory Reference @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,40 +35,22 @@ - + - - + + + +
diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 4a436d099..d1cbd2123 100644 --- a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: src Directory Reference @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,40 +35,22 @@
- + - - + + + +
diff --git a/doc/html/doxygen.svg b/doc/html/doxygen.svg new file mode 100644 index 000000000..d42dad52d --- /dev/null +++ b/doc/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js index 85e183690..3174bd7be 100644 --- a/doc/html/dynsections.js +++ b/doc/html/dynsections.js @@ -1,3 +1,27 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); @@ -15,7 +39,7 @@ function toggleVisibility(linkObj) summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } + } return false; } @@ -94,4 +118,4 @@ function toggleInherit(id) $(img).attr('src',src.substring(0,src.length-10)+'open.png'); } } - +/* @license-end */ diff --git a/doc/html/files.html b/doc/html/files.html index fc397f399..78124ea91 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File List @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,40 +35,22 @@
- + - - + + + +
diff --git a/doc/html/files_dup.js b/doc/html/files_dup.js new file mode 100644 index 000000000..be36eac75 --- /dev/null +++ b/doc/html/files_dup.js @@ -0,0 +1,7 @@ +var files_dup = +[ + [ "libevent.h", "libevent_8h.html", "libevent_8h" ], + [ "libuv.h", "libuv_8h.html", "libuv_8h" ], + [ "nats.h", "nats_8h.html", "nats_8h" ], + [ "status.h", "status_8h.html", "status_8h" ] +]; \ No newline at end of file diff --git a/doc/html/globals.html b/doc/html/globals.html index dd9b3c6ce..2cb41223b 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,56 +35,22 @@
- + - - - - + + + +
@@ -124,7 +85,7 @@
Here is a list of all file members with links to the files they belong to:
-

- n -

    +

    - n -

    • NATS_ADDRESS_MISSING : status.h
    • diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index efca1a91c..0ec12fef6 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
      NATS C Client with Streaming support -  2.5.1 +  2.6.0
      The nats.io C Client, Supported by Synadia Communications Inc.
      @@ -42,50 +35,22 @@
- + - - - + + + +
diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html index bfbf17135..6ec30c96f 100644 --- a/doc/html/globals_enum.html +++ b/doc/html/globals_enum.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,50 +35,22 @@
- + - - - + + + +
diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html index 8f4ad2309..8c46a5678 100644 --- a/doc/html/globals_eval.html +++ b/doc/html/globals_eval.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,55 +35,22 @@
- + - - - - + + + +
@@ -123,7 +85,7 @@
  -

- n -

    +

    - n -

    • NATS_ADDRESS_MISSING : status.h
    • diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index 9e237cf8a..85de764e0 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
      NATS C Client with Streaming support -  2.5.1 +  2.6.0
      The nats.io C Client, Supported by Synadia Communications Inc.
      @@ -42,56 +35,22 @@
- + - - - - + + + +
@@ -124,7 +85,7 @@
  -

- n -

    +

    - n -

    • nats_CheckCompatibility() : nats.h
    • @@ -602,7 +563,7 @@

      - n -

      -

      - s -

        +

        - s -

        • stanConnection_Close() : nats.h
        • diff --git a/doc/html/globals_s.html b/doc/html/globals_s.html index 49dddd40c..b1d1fc90a 100644 --- a/doc/html/globals_s.html +++ b/doc/html/globals_s.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
          NATS C Client with Streaming support -  2.5.1 +  2.6.0
          The nats.io C Client, Supported by Synadia Communications Inc.
          @@ -42,56 +35,22 @@
- + - - - - + + + +
@@ -124,7 +85,7 @@
Here is a list of all file members with links to the files they belong to:
-

- s -

    +

    - s -

    • stanConnection : nats.h
    • diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html index 1aefe30d5..67238aff8 100644 --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: File Members @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
      NATS C Client with Streaming support -  2.5.1 +  2.6.0
      The nats.io C Client, Supported by Synadia Communications Inc.
      @@ -42,50 +35,22 @@
- + - - - + + + +
diff --git a/doc/html/group__callbacks_group.html b/doc/html/group__callbacks_group.html index 5f5ba5b38..7ffd81197 100644 --- a/doc/html/group__callbacks_group.html +++ b/doc/html/group__callbacks_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Callbacks @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,55 +93,57 @@

Typedefs

typedef void(* natsMsgHandler) (natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure) - Callback used to deliver messages to the application. More...
+ Callback used to deliver messages to the application. More...
  typedef void(* natsConnectionHandler) (natsConnection *nc, void *closure) - Callback used to notify the user of asynchronous connection events. More...
+ Callback used to notify the user of asynchronous connection events. More...
  typedef void(* natsErrHandler) (natsConnection *nc, natsSubscription *subscription, natsStatus err, void *closure) - Callback used to notify the user of errors encountered while processing inbound messages. More...
+ Callback used to notify the user of errors encountered while processing inbound messages. More...
  typedef natsStatus(* natsEvLoop_Attach) (void **userData, void *loop, natsConnection *nc, natsSock socket) - Attach this connection to the external event loop. More...
+ Attach this connection to the external event loop. More...
  typedef natsStatus(* natsEvLoop_ReadAddRemove) (void *userData, bool add) - Read event needs to be added or removed. More...
+ Read event needs to be added or removed. More...
  typedef natsStatus(* natsEvLoop_WriteAddRemove) (void *userData, bool add) - Write event needs to be added or removed. More...
+ Write event needs to be added or removed. More...
  typedef natsStatus(* natsEvLoop_Detach) (void *userData) - Detach from the event loop. More...
+ Detach from the event loop. More...
  typedef natsStatus(* natsUserJWTHandler) (char **userJWT, char **customErrTxt, void *closure) - Callback used to fetch and return account signed user JWT. More...
+ Callback used to fetch and return account signed user JWT. More...
  typedef natsStatus(* natsSignatureHandler) (char **customErrTxt, unsigned char **signature, int *signatureLength, const char *nonce, void *closure) - Callback used to sign a nonce sent by the server. More...
+ Callback used to sign a nonce sent by the server. More...
  typedef const char *(* natsTokenHandler) (void *closure) - Callback used to build a token on connections and reconnections. More...
+ Callback used to build a token on connections and reconnections. More...
  typedef void(* natsOnCompleteCB) (void *closure) - Callback used to notify that an object lifecycle is complete. More...
+ Callback used to notify that an object lifecycle is complete. More...
  typedef int64_t(* natsCustomReconnectDelayHandler) (natsConnection *nc, int attempts, void *closure) - Callback used to specify how long to wait between reconnects. More...
+ Callback used to specify how long to wait between reconnects. More...
  typedef void(* stanPubAckHandler) (const char *guid, const char *error, void *closure) - Callback used to notify of an asynchronous publish result. More...
+ Callback used to notify of an asynchronous publish result. More...
  typedef void(* stanMsgHandler) (stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure) - Callback used to deliver messages to the application. More...
+ Callback used to deliver messages to the application. More...
  typedef void(* stanConnectionLostHandler) (stanConnection *sc, const char *errorTxt, void *closure) - Callback used to notify the user of the permanent loss of the connection. More...
+ Callback used to notify the user of the permanent loss of the connection. More...
 

Detailed Description

NATS Callbacks.

Typedef Documentation

- + +

◆ natsMsgHandler

+
@@ -168,16 +153,18 @@

Typedef Documentation

This is the callback that one provides when creating an asynchronous subscription. The library will invoke this callback for each message arriving through the subscription's connection.

-
Warning
If this callback is setup for a subject that is used as the reply subject to natsConnection_PublishRequest calls (and its variants), it is possible to get an empty message with a header "Status" with value "503" that is sent by the server when there were no responders on the request's subject. Use natsMsg_IsNoResponders to know if that is the case.
-
See also
natsConnection_Subscribe()
+
Warning
If this callback is setup for a subject that is used as the reply subject to natsConnection_PublishRequest calls (and its variants), it is possible to get an empty message with a header "Status" with value "503" that is sent by the server when there were no responders on the request's subject. Use natsMsg_IsNoResponders to know if that is the case.
+
See also
natsConnection_Subscribe()
-natsConnection_QueueSubscribe()
+natsConnection_QueueSubscribe()
-natsMsg_IsNoResponders()
+natsMsg_IsNoResponders()
- + +

◆ natsConnectionHandler

+
@@ -187,16 +174,18 @@

Typedef Documentation

This callback is used for asynchronous events such as disconnected and closed connections.

-
See also
natsOptions_SetClosedCB()
+
See also
natsOptions_SetClosedCB()
-natsOptions_SetDisconnectedCB()
+natsOptions_SetDisconnectedCB()
-natsOptions_SetReconnectedCB()
+natsOptions_SetReconnectedCB()
Warning
Such callback is invoked from a dedicated thread and the state of the connection that triggered the event may have changed since that event was generated.
- + +

◆ natsErrHandler

+
@@ -209,7 +198,9 @@

Typedef Documentation

- + +

◆ natsEvLoop_Attach

+
@@ -231,7 +222,9 @@

Typedef Documentation

- + +

◆ natsEvLoop_ReadAddRemove

+
@@ -243,7 +236,7 @@

Typedef Documentation

The NATS library will invoke this callback to indicate if the event loop should start (add istrue) or stop (addisfalse`) polling for read events on the socket.

Parameters
- +
userDatathe pointer to an user object created in natsEvLoop_Attach.
userDatathe pointer to an user object created in natsEvLoop_Attach.
addtrue if the event library should start polling, false otherwise.
@@ -251,7 +244,9 @@

Typedef Documentation

- + +

◆ natsEvLoop_WriteAddRemove

+
@@ -263,7 +258,7 @@

Typedef Documentation

The NATS library will invoke this callback to indicate if the event loop should start (add istrue) or stop (addisfalse`) polling for write events on the socket.

Parameters
- +
userDatathe pointer to an user object created in natsEvLoop_Attach.
userDatathe pointer to an user object created in natsEvLoop_Attach.
addtrue if the event library should start polling, false otherwise.
@@ -271,7 +266,9 @@

Typedef Documentation

- + +

◆ natsEvLoop_Detach

+
@@ -283,14 +280,16 @@

Typedef Documentation

The NATS library will invoke this callback to indicate that the connection no longer needs to be attached to the event loop. User can cleanup some state.

Parameters
- +
userDatathe pointer to an user object created in natsEvLoop_Attach.
userDatathe pointer to an user object created in natsEvLoop_Attach.
- + +

◆ natsUserJWTHandler

+
@@ -303,13 +302,15 @@

Typedef Documentation

The user JWT is returned as a string that is allocated by the user and is freed by the library after the handler is invoked.

If the user is unable to return the JWT, a status other than NATS_OK should be returned (we recommend NATS_ERR). A custom error message can be returned through customErrTxt. The user must allocate the memory for this error message and the library will free it after the invocation of the handler.

Warning
There may be repeated invocations of this handler for a given connection so it is crucial to always return a copy of the user JWT maintained by the application, since again, the library will free the memory pointed by userJWT after each invocation of this handler.
-
See also
natsOptions_SetUserCredentialsCallbacks()
+
See also
natsOptions_SetUserCredentialsCallbacks()
-natsOptions_SetUserCredentialsFromFiles()
+natsOptions_SetUserCredentialsFromFiles()
- + +

◆ natsSignatureHandler

+
@@ -323,15 +324,17 @@

Typedef Documentation

If the user is unable to sign, a status other than NATS_OK (we recommend NATS_ERR) should be returned. A custom error message can be returned through customErrTxt. The user must allocate the memory for this error message and the library will free it after the invocation of this handler.

The library will base64 encode this raw signature and send that to the server.

Warning
There may be repeated invocations of this handler for a given connection so it is crucial to always return a copy of the signature, since again, the library will free the memory pointed by signature after each invocation of this handler.
-
See also
natsOptions_SetUserCredentialsCallbacks()
+
See also
natsOptions_SetUserCredentialsCallbacks()
-natsOptions_SetUserCredentialsFromFiles()
+natsOptions_SetUserCredentialsFromFiles()
-natsOptions_SetNKey()
+natsOptions_SetNKey()
- + +

◆ natsTokenHandler

+
@@ -341,12 +344,14 @@

Typedef Documentation

This is the function that one provides to build a different token at each reconnect.

-
See also
natsOptions_SetTokenHandler()
+
See also
natsOptions_SetTokenHandler()
Warning
Such callback is invoked synchronously from the connection thread.
- + +

◆ natsOnCompleteCB

+
@@ -355,12 +360,14 @@

Typedef Documentation

-

Currently used for asynchronous natsSubscription objects. When set, this callback will be invoked after the subscription is closed and the message handler has returned.

-
See also
natsSubscription_SetOnCompleteCB()
+

Currently used for asynchronous natsSubscription objects. When set, this callback will be invoked after the subscription is closed and the message handler has returned.

+
See also
natsSubscription_SetOnCompleteCB()
- + +

◆ natsCustomReconnectDelayHandler

+
@@ -370,10 +377,10 @@

Typedef Documentation

This callback is used to get from the user the desired delay the library should pause before attempting to reconnect again. Note that this is invoked after the library tried the whole list of URLs and failed to reconnect.

-
Note
This callback is invoked from the connection reconnect thread and waits for user input. It should not block and instead quickly return the desired reconnect delay. The state of the connection is disconnected when this callback is invoked. Not much can be done with the passed connection, but user can call natsConnection_Close() if desired. This will abort the reconnect attempts and close the connection.
+
Note
This callback is invoked from the connection reconnect thread and waits for user input. It should not block and instead quickly return the desired reconnect delay. The state of the connection is disconnected when this callback is invoked. Not much can be done with the passed connection, but user can call natsConnection_Close() if desired. This will abort the reconnect attempts and close the connection.
Parameters
- +
ncthe pointer to the natsConnection invoking this handler.
ncthe pointer to the natsConnection invoking this handler.
attemptsthe number of times the library tried the whole list of server URLs.
closurean optional pointer to a user defined object that was specified when registering the callback.
@@ -383,7 +390,9 @@

Typedef Documentation

- + +

◆ stanPubAckHandler

+
@@ -393,11 +402,13 @@

Typedef Documentation

This is used for asynchronous publishing to provide status of the acknowledgment. The function will be passed the GUID and any error state. No error means the message was successfully received by NATS Streaming.

-
See also
stanConnection_PublishAsync()
+
See also
stanConnection_PublishAsync()
- + +

◆ stanMsgHandler

+
@@ -407,13 +418,15 @@

Typedef Documentation

This is the callback that one provides when creating an asynchronous subscription. The library will invoke this callback for each message arriving through the subscription's connection.

-
See also
stanConnection_Subscribe()
+
See also
stanConnection_Subscribe()
-stanConnection_QueueSubscribe()
+stanConnection_QueueSubscribe()
- + +

◆ stanConnectionLostHandler

+
diff --git a/doc/html/group__conn_group.html b/doc/html/group__conn_group.html index 4efc4e396..79fe4682f 100644 --- a/doc/html/group__conn_group.html +++ b/doc/html/group__conn_group.html @@ -4,7 +4,7 @@ - +NATS C Client with Streaming support: Connection @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@ @@ -42,34 +35,22 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
- + - + + + +
diff --git a/doc/html/group__conn_mgt_group.html b/doc/html/group__conn_mgt_group.html index 1e42a0dd4..ab74fef18 100644 --- a/doc/html/group__conn_mgt_group.html +++ b/doc/html/group__conn_mgt_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Management @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,94 +93,96 @@

Functions

NATS_EXTERN natsStatus natsConnection_Connect (natsConnection **nc, natsOptions *options) - Connects to a NATS Server using the provided options. More...
+ Connects to a NATS Server using the provided options. More...
  NATS_EXTERN void natsConnection_ProcessReadEvent (natsConnection *nc) - Process a read event when using external event loop. More...
+ Process a read event when using external event loop. More...
  NATS_EXTERN void natsConnection_ProcessWriteEvent (natsConnection *nc) - Process a write event when using external event loop. More...
+ Process a write event when using external event loop. More...
  NATS_EXTERN natsStatus natsConnection_ConnectTo (natsConnection **nc, const char *urls) - Connects to a NATS Server using any of the URL from the given list. More...
+ Connects to a NATS Server using any of the URL from the given list. More...
  NATS_EXTERN bool natsConnection_IsClosed (natsConnection *nc) - Test if connection has been closed. More...
+ Test if connection has been closed. More...
  NATS_EXTERN bool natsConnection_IsReconnecting (natsConnection *nc) - Test if connection is reconnecting. More...
+ Test if connection is reconnecting. More...
  bool natsConnection_IsDraining (natsConnection *nc) - Test if connection is draining. More...
+ Test if connection is draining. More...
  NATS_EXTERN natsConnStatus natsConnection_Status (natsConnection *nc) - Returns the current state of the connection. More...
+ Returns the current state of the connection. More...
  NATS_EXTERN int natsConnection_Buffered (natsConnection *nc) - Returns the number of bytes to be sent to the server. More...
+ Returns the number of bytes to be sent to the server. More...
  NATS_EXTERN natsStatus natsConnection_Flush (natsConnection *nc) - Flushes the connection. More...
+ Flushes the connection. More...
  NATS_EXTERN natsStatus natsConnection_FlushTimeout (natsConnection *nc, int64_t timeout) - Flushes the connection with a given timeout. More...
+ Flushes the connection with a given timeout. More...
  NATS_EXTERN int64_t natsConnection_GetMaxPayload (natsConnection *nc) - Returns the maximum message payload. More...
+ Returns the maximum message payload. More...
  NATS_EXTERN natsStatus natsConnection_GetStats (natsConnection *nc, natsStatistics *stats) - Gets the connection statistics. More...
+ Gets the connection statistics. More...
  NATS_EXTERN natsStatus natsConnection_GetConnectedUrl (natsConnection *nc, char *buffer, size_t bufferSize) - Gets the URL of the currently connected server. More...
+ Gets the URL of the currently connected server. More...
  NATS_EXTERN natsStatus natsConnection_GetConnectedServerId (natsConnection *nc, char *buffer, size_t bufferSize) - Gets the server Id. More...
+ Gets the server Id. More...
  NATS_EXTERN natsStatus natsConnection_GetServers (natsConnection *nc, char ***servers, int *count) - Returns the list of server URLs known to this connection. More...
+ Returns the list of server URLs known to this connection. More...
  NATS_EXTERN natsStatus natsConnection_GetDiscoveredServers (natsConnection *nc, char ***servers, int *count) - Returns the list of discovered server URLs. More...
+ Returns the list of discovered server URLs. More...
  NATS_EXTERN natsStatus natsConnection_GetLastError (natsConnection *nc, const char **lastError) - Gets the last connection error. More...
+ Gets the last connection error. More...
  NATS_EXTERN natsStatus natsConnection_GetClientID (natsConnection *nc, uint64_t *cid) - Gets the current client ID assigned by the server. More...
+ Gets the current client ID assigned by the server. More...
  NATS_EXTERN natsStatus natsConnection_Drain (natsConnection *nc) - Drains the connection with default timeout. More...
+ Drains the connection with default timeout. More...
  NATS_EXTERN natsStatus natsConnection_DrainTimeout (natsConnection *nc, int64_t timeout) - Drains the connection with given timeout. More...
+ Drains the connection with given timeout. More...
  NATS_EXTERN natsStatus natsConnection_Sign (natsConnection *nc, const unsigned char *message, int messageLen, unsigned char sig[64]) - Signs any 'message' using the connection's user credentials. More...
+ Signs any 'message' using the connection's user credentials. More...
  NATS_EXTERN natsStatus natsConnection_GetClientIP (natsConnection *nc, char **ip) - Returns the client's IP address as reported by the server. More...
+ Returns the client's IP address as reported by the server. More...
  NATS_EXTERN natsStatus natsConnection_GetRTT (natsConnection *nc, int64_t *rtt) - Returns the round trip time between this client and the server. More...
+ Returns the round trip time between this client and the server. More...
  NATS_EXTERN natsStatus natsConnection_HasHeaderSupport (natsConnection *nc) - Returns if the connection to current server supports headers. More...
+ Returns if the connection to current server supports headers. More...
  natsStatus natsConnection_GetLocalIPAndPort (natsConnection *nc, char **ip, int *port) - Returns the connection local IP and port. More...
+ Returns the connection local IP and port. More...
  NATS_EXTERN void natsConnection_Close (natsConnection *nc) - Closes the connection. More...
+ Closes the connection. More...
  NATS_EXTERN void natsConnection_Destroy (natsConnection *nc) - Destroys the connection object. More...
+ Destroys the connection object. More...
 

Detailed Description

Functions related to connection management.

Function Documentation

- + +

◆ natsConnection_Connect()

+
@@ -221,21 +206,23 @@

Function Documentation

Attempts to connect to a NATS Server with multiple options.

-

This call is cloning the natsOptions object. Once this call returns, changes made to the options will not have an effect to this connection. The options can however be changed prior to be passed to another natsConnection_Connect() call if desired.

-
See also
natsOptions
+

This call is cloning the natsOptions object. Once this call returns, changes made to the options will not have an effect to this connection. The options can however be changed prior to be passed to another natsConnection_Connect() call if desired.

+
See also
natsOptions
-natsConnection_Destroy()
+natsConnection_Destroy()
Parameters
- - + +
ncthe location where to store the pointer to the newly created natsConnection object.
optionsthe options to use for this connection. If NULL this call is equivalent to natsConnection_ConnectTo() with NATS_DEFAULT_URL.
ncthe location where to store the pointer to the newly created natsConnection object.
optionsthe options to use for this connection. If NULL this call is equivalent to natsConnection_ConnectTo() with NATS_DEFAULT_URL.
- + +

◆ natsConnection_ProcessReadEvent()

+
@@ -251,7 +238,7 @@

Function Documentation

When using an external event loop, and the callback indicating that the socket is ready for reading, this call will read data from the socket and process it.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
@@ -259,7 +246,9 @@

Function Documentation

- + +

◆ natsConnection_ProcessWriteEvent()

+
@@ -275,7 +264,7 @@

Function Documentation

When using an external event loop, and the callback indicating that the socket is ready for writing, this call will write data to the socket.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
@@ -283,7 +272,9 @@

Function Documentation

- + +

◆ natsConnection_ConnectTo()

+
@@ -307,21 +298,23 @@

Function Documentation

Attempts to connect to a NATS Server.

-

This call supports multiple comma separated URLs. If more than one is specified, it behaves as if you were using a natsOptions object and called natsOptions_SetServers() with the equivalent array of URLs. The list is randomized before the connect sequence starts.

-
See also
natsConnection_Destroy()
+

This call supports multiple comma separated URLs. If more than one is specified, it behaves as if you were using a natsOptions object and called natsOptions_SetServers() with the equivalent array of URLs. The list is randomized before the connect sequence starts.

+
See also
natsConnection_Destroy()
-natsOptions_SetServers()
+natsOptions_SetServers()
Parameters
- - + +
ncthe location where to store the pointer to the newly created natsConnection object.
urlsthe URL to connect to, or the list of URLs to chose from. If NULL this call is equivalent to natsConnection_ConnectTo() with NATS_DEFAULT_URL
ncthe location where to store the pointer to the newly created natsConnection object.
urlsthe URL to connect to, or the list of URLs to chose from. If NULL this call is equivalent to natsConnection_ConnectTo() with NATS_DEFAULT_URL
- + +

◆ natsConnection_IsClosed()

+
@@ -337,14 +330,16 @@

Function Documentation

Tests if connection has been closed.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_IsReconnecting()

+
@@ -360,14 +355,16 @@

Function Documentation

Tests if connection is reconnecting.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_IsDraining()

+
@@ -383,14 +380,16 @@

Function Documentation

Tests if connection is draining.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_Status()

+
@@ -404,17 +403,19 @@

Function Documentation

Returns the current state of the connection.

-
See also
natsConnStatus
+
See also
natsConnStatus
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_Buffered()

+
@@ -430,7 +431,7 @@

Function Documentation

When calling any of the publish functions, data is not necessarily immediately sent to the server. Some buffering occurs, allowing for better performance. This function indicates if there is any data not yet transmitted to the server.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
@@ -438,7 +439,9 @@

Function Documentation

- + +

◆ natsConnection_Flush()

+
@@ -453,17 +456,19 @@

Function Documentation

Performs a round trip to the server and return when it receives the internal reply.

Note that if this call occurs when the connection to the server is lost, the PING will not be echoed even if the library can connect to a new (or the same) server. Therefore, in such situation, this call will fail with the status NATS_CONNECTION_DISCONNECTED.

-

If the connection is closed while this call is in progress, then the status NATS_CONN_STATUS_CLOSED would be returned instead.

+

If the connection is closed while this call is in progress, then the status NATS_CONN_STATUS_CLOSED would be returned instead.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_FlushTimeout()

+
@@ -487,10 +492,10 @@

Function Documentation

Performs a round trip to the server and return when it receives the internal reply, or if the call times-out (timeout is expressed in milliseconds).

-

See possible failure case described in natsConnection_Flush().

+

See possible failure case described in natsConnection_Flush().

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
timeoutin milliseconds, is the time allowed for the flush to complete before NATS_TIMEOUT error is returned.
@@ -498,7 +503,9 @@

Function Documentation

- + +

◆ natsConnection_GetMaxPayload()

+
@@ -514,7 +521,7 @@

Function Documentation

Returns the maximum message payload accepted by the server. The information is gathered from the NATS Server when the connection is first established.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
@@ -522,7 +529,9 @@

Function Documentation

- + +

◆ natsConnection_GetStats()

+
@@ -548,15 +557,17 @@

Function Documentation

Copies in the provided statistics structure, a snapshot of the statistics for this connection.

Parameters
- - + +
ncthe pointer to the natsConnection object.
statsthe pointer to a natsStatistics object in which statistics will be copied.
ncthe pointer to the natsConnection object.
statsthe pointer to a natsStatistics object in which statistics will be copied.
- + +

◆ natsConnection_GetConnectedUrl()

+
@@ -588,7 +599,7 @@

Function Documentation

Copies in the given buffer, the connected server's Url. If the buffer is too small, an error is returned.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
bufferthe buffer in which the URL is copied.
bufferSizethe size of the buffer.
@@ -597,7 +608,9 @@

Function Documentation

- + +

◆ natsConnection_GetConnectedServerId()

+
@@ -629,7 +642,7 @@

Function Documentation

Copies in the given buffer, the connected server's Id. If the buffer is too small, an error is returned.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
bufferthe buffer in which the server id is copied.
bufferSizethe size of the buffer.
@@ -638,7 +651,9 @@

Function Documentation

- + +

◆ natsConnection_GetServers()

+
@@ -668,12 +683,12 @@

Function Documentation

Returns the list of known servers, including additional servers discovered after a connection has been established (with servers version 0.9.2 and above).

-

No credential information is included in any of the server URLs returned by this call.
- If you want to use any of these URLs to connect to a server that requires authentication, you will need to use natsOptions_SetUserInfo or natsOptions_SetToken.

+

No credential information is included in any of the server URLs returned by this call.
+ If you want to use any of these URLs to connect to a server that requires authentication, you will need to use natsOptions_SetUserInfo or natsOptions_SetToken.

Note
The user is responsible for freeing the memory of the returned array.
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
serversthe location where to store the pointer to the array of server URLs.
countthe location where to store the number of elements of the returned array.
@@ -682,7 +697,9 @@

Function Documentation

- + +

◆ natsConnection_GetDiscoveredServers()

+
@@ -711,13 +728,13 @@

Function Documentation

-

Unlike natsConnection_GetServers, this function only returns the list of servers that have been discovered after the a connection has been established (with servers version 0.9.2 and above).

-

No credential information is included in any of the server URLs returned by this call.
- If you want to use any of these URLs to connect to a server that requires authentication, you will need to use natsOptions_SetUserInfo or natsOptions_SetToken.

+

Unlike natsConnection_GetServers, this function only returns the list of servers that have been discovered after the a connection has been established (with servers version 0.9.2 and above).

+

No credential information is included in any of the server URLs returned by this call.
+ If you want to use any of these URLs to connect to a server that requires authentication, you will need to use natsOptions_SetUserInfo or natsOptions_SetToken.

Note
The user is responsible for freeing the memory of the returned array.
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
serversthe location where to store the pointer to the array of server URLs.
countthe location where to store the number of elements of the returned array.
@@ -726,7 +743,9 @@

Function Documentation

- + +

◆ natsConnection_GetLastError()

+
@@ -753,7 +772,7 @@

Function Documentation

Warning
The returned string is owned by the connection object and must not be freed.
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
lastErrorthe location where the pointer to the connection's last error string is copied.
@@ -761,7 +780,9 @@

Function Documentation

- + +

◆ natsConnection_GetClientID()

+
@@ -786,10 +807,10 @@

Function Documentation

Returns the client ID assigned by the server to which the client is currently connected to.

Note
The value may change if the client reconnects.
-

This function returns NATS_NO_SERVER_SUPPORT if the server's version is less than 1.2.0.

+

This function returns NATS_NO_SERVER_SUPPORT if the server's version is less than 1.2.0.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
cidthe location where to store the client ID.
@@ -797,7 +818,9 @@

Function Documentation

- + +

◆ natsConnection_Drain()

+
@@ -810,22 +833,24 @@

Function Documentation

-

Drain will put a connection into a drain state. All subscriptions will immediately be put into a drain state. Upon completion, the publishers will be drained and can not publish any additional messages. Upon draining of the publishers, the connection will be closed. Use the natsOptions_SetClosedCB() option to know when the connection has moved from draining to closed.

+

Drain will put a connection into a drain state. All subscriptions will immediately be put into a drain state. Upon completion, the publishers will be drained and can not publish any additional messages. Upon draining of the publishers, the connection will be closed. Use the natsOptions_SetClosedCB() option to know when the connection has moved from draining to closed.

This call uses a default drain timeout of 30 seconds.

Warning
This function does not block waiting for the draining operation to complete.
-
See also
natsOptions_SetClosedCB
+
See also
natsOptions_SetClosedCB
-natsConnection_DrainTimeout
+natsConnection_DrainTimeout
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_DrainTimeout()

+
@@ -848,15 +873,15 @@

Function Documentation

-

Identical to natsConnection_Drain but the timeout can be specified here.

+

Identical to natsConnection_Drain but the timeout can be specified here.

The value is expressed in milliseconds. Zero or negative value means that the operation will not timeout.

Warning
This function does not block waiting for the draining operation to complete.
-
See also
natsOptions_SetClosedCB
+
See also
natsOptions_SetClosedCB
-natsConnection_Drain
+natsConnection_Drain
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
timeoutthe allowed time for a drain operation to complete, expressed in milliseconds.
@@ -864,7 +889,9 @@

Function Documentation

- + +

◆ natsConnection_Sign()

+
@@ -899,11 +926,11 @@

Function Documentation

-

The connection must have been created with the natsOptions_SetUserCredentialsFromFiles.

+

The connection must have been created with the natsOptions_SetUserCredentialsFromFiles.

This call will sign the given message with the private key extracted through the user credentials file(s).

Parameters
- + @@ -913,7 +940,9 @@

Function Documentation

- + +

◆ natsConnection_GetClientIP()

+
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
messagethe byte array to sign.
messageLenthe length of the given byte array.
sigan array of 64 bytes in which the signature will be copied.
@@ -939,11 +968,11 @@

Function Documentation

When a connection is created to the server, the server identifies the connection's remote IP address and return it back to the client.

Note
The user is responsible to free memory allocated to store the client IP address.
-This is supported on servers >= version 2.1.6. Calling natsConnection_GetClientIP() with server below this version will return the NATS_NO_SERVER_SUPPORT error.
-
See also
natsConnection_GetLocalIPAndPort to get the local IP and port instead.
+This is supported on servers >= version 2.1.6. Calling natsConnection_GetClientIP() with server below this version will return the NATS_NO_SERVER_SUPPORT error. +
See also
natsConnection_GetLocalIPAndPort to get the local IP and port instead.
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
ipthe memory location where to store the client's IP string. The user is responsible from freeing this memory.
@@ -951,7 +980,9 @@

Function Documentation

- + +

◆ natsConnection_GetRTT()

+
@@ -978,7 +1009,7 @@

Function Documentation

Note
If the library is currently trying to reconnect, this call will return NATS_CONNECTION_DISCONNECTED.
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
rttthe memory location where to store the rtt.
@@ -986,7 +1017,9 @@

Function Documentation

- + +

◆ natsConnection_HasHeaderSupport()

+
@@ -1002,14 +1035,16 @@

Function Documentation

Returns NATS_OK if the server this client is currently connected to supports headers, NATS_NO_SERVER_SUPPORT otherwise.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_GetLocalIPAndPort()

+
@@ -1038,29 +1073,31 @@

Function Documentation

-

Unlike natsConnection_GetClientIP, this function returns the connection's local IP and port.

+

Unlike natsConnection_GetClientIP, this function returns the connection's local IP and port.

Note
The user is responsible for freeing the memory allocated for the returned IP string.
Parameters
- +
ncthe pointer of the natsConnection object.
ncthe pointer of the natsConnection object.
ipthe memory location where to store the local IP string. The user is responsible from freeing this memory.
portthe memory location where to store the local port.
-
Returns
NATS_OK on success.
+
Returns
NATS_OK on success.
NATS_CONNECTION_DISCONNECTED if disconnected.
NATS_CONNECTION_CLOSED is connection is closed.
-NATS_SYS_ERROR if a system error getting the IP and port occurred.
+NATS_SYS_ERROR if a system error getting the IP and port occurred.
NATS_NO_MEMORY if the library was unable to allocate memory for the returned IP string.
- + +

◆ natsConnection_Close()

+
@@ -1073,17 +1110,19 @@

Function Documentation

-

Closes the connection to the server. This call will release all blocking calls, such as natsConnection_Flush() and natsSubscription_NextMsg(). The connection object is still usable until the call to natsConnection_Destroy().

+

Closes the connection to the server. This call will release all blocking calls, such as natsConnection_Flush() and natsSubscription_NextMsg(). The connection object is still usable until the call to natsConnection_Destroy().

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
- + +

◆ natsConnection_Destroy()

+
@@ -1099,7 +1138,7 @@

Function Documentation

Destroys the connection object, freeing up memory. If not already done, this call first closes the connection to the server.

Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
diff --git a/doc/html/group__conn_pub_group.html b/doc/html/group__conn_pub_group.html index 33aa527ec..3b8599931 100644 --- a/doc/html/group__conn_pub_group.html +++ b/doc/html/group__conn_pub_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Publishing @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,34 +93,36 @@

Functions

NATS_EXTERN natsStatus natsConnection_Publish (natsConnection *nc, const char *subj, const void *data, int dataLen) - Publishes data on a subject. More...
+ Publishes data on a subject. More...
  NATS_EXTERN natsStatus natsConnection_PublishString (natsConnection *nc, const char *subj, const char *str) - Publishes a string on a subject. More...
+ Publishes a string on a subject. More...
  NATS_EXTERN natsStatus natsConnection_PublishMsg (natsConnection *nc, natsMsg *msg) - Publishes a message on a subject. More...
+ Publishes a message on a subject. More...
  NATS_EXTERN natsStatus natsConnection_PublishRequest (natsConnection *nc, const char *subj, const char *reply, const void *data, int dataLen) - Publishes data on a subject expecting replies on the given reply. More...
+ Publishes data on a subject expecting replies on the given reply. More...
  NATS_EXTERN natsStatus natsConnection_PublishRequestString (natsConnection *nc, const char *subj, const char *reply, const char *str) - Publishes a string on a subject expecting replies on the given reply. More...
+ Publishes a string on a subject expecting replies on the given reply. More...
  NATS_EXTERN natsStatus natsConnection_Request (natsMsg **replyMsg, natsConnection *nc, const char *subj, const void *data, int dataLen, int64_t timeout) - Sends a request and waits for a reply. More...
+ Sends a request and waits for a reply. More...
  NATS_EXTERN natsStatus natsConnection_RequestString (natsMsg **replyMsg, natsConnection *nc, const char *subj, const char *str, int64_t timeout) - Sends a request (as a string) and waits for a reply. More...
+ Sends a request (as a string) and waits for a reply. More...
  NATS_EXTERN natsStatus natsConnection_RequestMsg (natsMsg **replyMsg, natsConnection *nc, natsMsg *requestMsg, int64_t timeout) - Sends a request based on the given requestMsg and waits for a reply. More...
+ Sends a request based on the given requestMsg and waits for a reply. More...
 

Detailed Description

Publishing functions

Function Documentation

- + +

◆ natsConnection_Publish()

+
@@ -175,7 +160,7 @@

Function Documentation

Publishes the data argument to the given subject. The data argument is left untouched and needs to be correctly interpreted on the receiver.

Parameters
- + @@ -185,7 +170,9 @@

Function Documentation

- + +

◆ natsConnection_PublishString()

+
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
subjthe subject the data is sent to.
datathe data to be sent, can be NULL.
dataLenthe length of the data to be sent.
@@ -215,9 +202,13 @@

Function Documentation

Convenient function to publish a string. This call is equivalent to:

-
const char* myString = "hello";
natsConnection_Publish(nc, subj, (const void*) myString, (int) strlen(myString));
Parameters
+
const char* myString = "hello";
+
+
natsConnection_Publish(nc, subj, (const void*) myString, (int) strlen(myString));
+
NATS_EXTERN natsStatus natsConnection_Publish(natsConnection *nc, const char *subj, const void *data, int dataLen)
Publishes data on a subject.
+
Parameters
- +
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
subjthe subject the data is sent to.
strthe string to be sent.
@@ -226,7 +217,9 @@

Function Documentation

- + +

◆ natsConnection_PublishMsg()

+
@@ -249,19 +242,21 @@

Function Documentation

-

Publishes the natsMsg, which includes the subject, an optional reply and optional data.

-
See also
natsMsg_Create()
+

Publishes the natsMsg, which includes the subject, an optional reply and optional data.

+
See also
natsMsg_Create()
Parameters
- - + +
ncthe pointer to the natsConnection object.
msgthe pointer to the natsMsg object to send.
ncthe pointer to the natsConnection object.
msgthe pointer to the natsMsg object to send.
- + +

◆ natsConnection_PublishRequest()

+
@@ -302,10 +297,10 @@

Function Documentation

-

Publishes the data argument to the given subject expecting a response on the reply subject. Use natsConnection_Request() for automatically waiting for a response inline.

+

Publishes the data argument to the given subject expecting a response on the reply subject. Use natsConnection_Request() for automatically waiting for a response inline.

Parameters
- + @@ -316,7 +311,9 @@

Function Documentation

- + +

◆ natsConnection_PublishRequestString()

+
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
subjthe subject the request is sent to.
replythe reply on which resonses are expected.
datathe data to be sent, can be NULL.
@@ -352,9 +349,12 @@

Function Documentation

Convenient function to publish a request as a string. This call is equivalent to:

-
const char* myString = "hello";
natsPublishRequest(nc, subj, reply, (const void*) myString, (int) strlen(myString));
Parameters
+
const char* myString = "hello";
+
+
natsPublishRequest(nc, subj, reply, (const void*) myString, (int) strlen(myString));
+
Parameters
- + @@ -364,7 +364,9 @@

Function Documentation

- + +

◆ natsConnection_Request()

+
ncthe pointer to the natsConnection object.
ncthe pointer to the natsConnection object.
subjthe subject the request is sent to.
replythe reply on which resonses are expected.
strthe string to send.
@@ -412,11 +414,11 @@

Function Documentation

Sends a request payload and delivers the first response message, or an error, including a timeout if no message was received properly.

-
Warning
If connected to a NATS Server v2.2.0+ with no responder running when the request is received, this call will return a NATS_NO_RESPONDERS error.
+
Warning
If connected to a NATS Server v2.2.0+ with no responder running when the request is received, this call will return a NATS_NO_RESPONDERS error.
Parameters
- - + + @@ -427,7 +429,9 @@

Function Documentation

- + +

◆ natsConnection_RequestString()

+
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
subjthe subject the request is sent to.
datathe data of the request, can be NULL.
dataLenthe length of the data to send.
@@ -469,11 +473,15 @@

Function Documentation

Convenient function to send a request as a string. This call is equivalent to:

-
const char* myString = "hello";
natsConnection_Request(replyMsg, nc, subj, (const void*) myString, (int) strlen(myString));
Warning
See warning about no responders in natsConnection_Request().
+
const char* myString = "hello";
+
+
natsConnection_Request(replyMsg, nc, subj, (const void*) myString, (int) strlen(myString));
+
NATS_EXTERN natsStatus natsConnection_Request(natsMsg **replyMsg, natsConnection *nc, const char *subj, const void *data, int dataLen, int64_t timeout)
Sends a request and waits for a reply.
+
Warning
See warning about no responders in natsConnection_Request().
Parameters
- - + + @@ -483,7 +491,9 @@

Function Documentation

- + +

◆ natsConnection_RequestMsg()

+
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
subjthe subject the request is sent to.
strthe string to send.
timeoutin milliseconds, before this call returns NATS_TIMEOUT if no response is received in this alloted time.
@@ -518,12 +528,12 @@

Function Documentation

-

Similar to natsConnection_Request but uses requestMsg to extract subject, and payload to send.

-
Warning
See warning about no responders in natsConnection_Request().
+

Similar to natsConnection_Request but uses requestMsg to extract subject, and payload to send.

+
Warning
See warning about no responders in natsConnection_Request().
Parameters
- - + +
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
replyMsgthe location where to store the pointer to the received natsMsg reply.
ncthe pointer to the natsConnection object.
requestMsgthe message used for the request.
timeoutin milliseconds, before this call returns NATS_TIMEOUT if no response is received in this alloted time.
diff --git a/doc/html/group__conn_sub_group.html b/doc/html/group__conn_sub_group.html index 6e2fd1ac1..615f34f4e 100644 --- a/doc/html/group__conn_sub_group.html +++ b/doc/html/group__conn_sub_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Subscribing @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,28 +93,30 @@

Functions

NATS_EXTERN natsStatus natsConnection_Subscribe (natsSubscription **sub, natsConnection *nc, const char *subject, natsMsgHandler cb, void *cbClosure) - Creates an asynchronous subscription. More...
+ Creates an asynchronous subscription. More...
  NATS_EXTERN natsStatus natsConnection_SubscribeTimeout (natsSubscription **sub, natsConnection *nc, const char *subject, int64_t timeout, natsMsgHandler cb, void *cbClosure) - Creates an asynchronous subscription with a timeout. More...
+ Creates an asynchronous subscription with a timeout. More...
  NATS_EXTERN natsStatus natsConnection_SubscribeSync (natsSubscription **sub, natsConnection *nc, const char *subject) - Creates a synchronous subcription. More...
+ Creates a synchronous subcription. More...
  NATS_EXTERN natsStatus natsConnection_QueueSubscribe (natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup, natsMsgHandler cb, void *cbClosure) - Creates an asynchronous queue subscriber. More...
+ Creates an asynchronous queue subscriber. More...
  NATS_EXTERN natsStatus natsConnection_QueueSubscribeTimeout (natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup, int64_t timeout, natsMsgHandler cb, void *cbClosure) - Creates an asynchronous queue subscriber with a timeout. More...
+ Creates an asynchronous queue subscriber with a timeout. More...
  NATS_EXTERN natsStatus natsConnection_QueueSubscribeSync (natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup) - Creates a synchronous queue subscriber. More...
+ Creates a synchronous queue subscriber. More...
 

Detailed Description

Subscribing functions.

Function Documentation

- + +

◆ natsConnection_Subscribe()

+
@@ -172,21 +157,23 @@

Function Documentation

-

Expresses interest in the given subject. The subject can have wildcards (see Wildcards). Messages will be delivered to the associated natsMsgHandler.

+

Expresses interest in the given subject. The subject can have wildcards (see Wildcards). Messages will be delivered to the associated natsMsgHandler.

Parameters
- - + + - - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
- + +

◆ natsConnection_SubscribeTimeout()

+
@@ -233,26 +220,28 @@

Function Documentation

-

Expresses interest in the given subject. The subject can have wildcards (see Wildcards). Messages will be delivered to the associated natsMsgHandler.

-

If no message is received by the given timeout (in milliseconds), the message handler is invoked with a NULL message.
+

Expresses interest in the given subject. The subject can have wildcards (see Wildcards). Messages will be delivered to the associated natsMsgHandler.

+

If no message is received by the given timeout (in milliseconds), the message handler is invoked with a NULL message.
You can then destroy the subscription in the callback, or simply return, in which case, the message handler will fire again when a message is received or the subscription times-out again.

Note
Receiving a message reset the timeout. Until all pending messages are processed, no timeout will occur. The timeout starts when the message handler for the last pending message returns.
Warning
If you re-use message handler code between subscriptions with and without timeouts, keep in mind that the message passed in the message handler may be NULL.
Parameters
- - + + - - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
timeoutthe interval (in milliseconds) after which, if no message is received, the message handler is invoked with a NULL message.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
- + +

◆ natsConnection_SubscribeSync()

+
@@ -281,11 +270,11 @@

Function Documentation

-

Similar to natsConnection_Subscribe, but creates a synchronous subscription that can be polled via natsSubscription_NextMsg().

+

Similar to natsConnection_Subscribe, but creates a synchronous subscription that can be polled via natsSubscription_NextMsg().

Parameters
- - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
@@ -293,7 +282,9 @@

Function Documentation

- + +

◆ natsConnection_QueueSubscribe()

+
@@ -343,19 +334,21 @@

Function Documentation

Creates an asynchronous queue subscriber on the given subject. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.

Parameters
- - + + - - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
queueGroupthe name of the group.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
- + +

◆ natsConnection_QueueSubscribeTimeout()

+
@@ -409,26 +402,28 @@

Function Documentation

Creates an asynchronous queue subscriber on the given subject. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.

-

If no message is received by the given timeout (in milliseconds), the message handler is invoked with a NULL message.
+

If no message is received by the given timeout (in milliseconds), the message handler is invoked with a NULL message.
You can then destroy the subscription in the callback, or simply return, in which case, the message handler will fire again when a message is received or the subscription times-out again.

Note
Receiving a message reset the timeout. Until all pending messages are processed, no timeout will occur. The timeout starts when the message handler for the last pending message returns.
Warning
If you re-use message handler code between subscriptions with and without timeouts, keep in mind that the message passed in the message handler may be NULL.
Parameters
- - + + - - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
queueGroupthe name of the group.
timeoutthe interval (in milliseconds) after which, if no message is received, the message handler is invoked with a NULL message.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
cbthe natsMsgHandler callback.
cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
- + +

◆ natsConnection_QueueSubscribeSync()

+
@@ -463,11 +458,11 @@

Function Documentation

-

Similar to natsConnection_QueueSubscribe, but creates a synchronous subscription that can be polled via natsSubscription_NextMsg().

+

Similar to natsConnection_QueueSubscribe, but creates a synchronous subscription that can be polled via natsSubscription_NextMsg().

Parameters
- - + +
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subthe location where to store the pointer to the newly created natsSubscription object.
ncthe pointer to the natsConnection object.
subjectthe subject this subscription is created for.
queueGroupthe name of the group.
diff --git a/doc/html/group__env_variables_group.html b/doc/html/group__env_variables_group.html index 60d617664..0aac62a69 100644 --- a/doc/html/group__env_variables_group.html +++ b/doc/html/group__env_variables_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Environment Variables @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -104,13 +87,13 @@
Environment Variables
-

You will find here the environment variables that change the default behavior of the NATS C Client library.
-
-

- - - - +

You will find here the environment variables that change the default behavior of the NATS C Client library.
+
+

Name Effect
NATS_DEFAULT_TO_LIB_MSG_DELIVERY On nats_Open, the library looks for this environment variable. If set (to any value), the library will default to using a global thread pool to perform message delivery. See natsOptions_UseGlobalMessageDelivery and nats_SetMessageDeliveryPoolSize.
+ + + +
Name Effect
NATS_DEFAULT_TO_LIB_MSG_DELIVERY On nats_Open, the library looks for this environment variable. If set (to any value), the library will default to using a global thread pool to perform message delivery. See natsOptions_UseGlobalMessageDelivery and nats_SetMessageDeliveryPoolSize.
diff --git a/doc/html/group__func_group.html b/doc/html/group__func_group.html index 56d3e1f9f..d6ed5c068 100644 --- a/doc/html/group__func_group.html +++ b/doc/html/group__func_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Functions @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
diff --git a/doc/html/group__inbox_group.html b/doc/html/group__inbox_group.html index f779a3a79..6602d16bb 100644 --- a/doc/html/group__inbox_group.html +++ b/doc/html/group__inbox_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Inboxes @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,16 +93,18 @@

Functions

NATS_EXTERN natsStatus natsInbox_Create (natsInbox **newInbox) - Creates an inbox. More...
+ Creates an inbox. More...
  NATS_EXTERN void natsInbox_Destroy (natsInbox *inbox) - Destroys the inbox. More...
+ Destroys the inbox. More...
 

Detailed Description

NATS Inboxes.

Function Documentation

- + +

◆ natsInbox_Create()

+
@@ -134,17 +119,19 @@

Function Documentation

Returns an inbox string which can be used for directed replies from subscribers. These are guaranteed to be unique, but can be shared and subscribed to by others.

Note
The inbox needs to be destroyed when no longer needed.
-
See also
natsInbox_Destroy()
+
See also
natsInbox_Destroy()
Parameters
- +
newInboxthe location where to store a pointer to the newly created natsInbox.
newInboxthe location where to store a pointer to the newly created natsInbox.
- + +

◆ natsInbox_Destroy()

+
@@ -160,7 +147,7 @@

Function Documentation

Destroys the inbox.

Parameters
- +
inboxthe pointer to the natsInbox object to destroy.
inboxthe pointer to the natsInbox object to destroy.
diff --git a/doc/html/group__libevent_functions.html b/doc/html/group__libevent_functions.html index 1da24e0ba..3adda8230 100644 --- a/doc/html/group__libevent_functions.html +++ b/doc/html/group__libevent_functions.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Libevent Adapter @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,25 +93,27 @@

Functions

void natsLibevent_Init (void) - Initialize the adapter. More...
+ Initialize the adapter. More...
  natsStatus natsLibevent_Attach (void **userData, void *loop, natsConnection *nc, natsSock socket) - Attach a connection to the given event loop. More...
+ Attach a connection to the given event loop. More...
  natsStatus natsLibevent_Read (void *userData, bool add) - Start or stop polling on READ events. More...
+ Start or stop polling on READ events. More...
  natsStatus natsLibevent_Write (void *userData, bool add) - Start or stop polling on WRITE events. More...
+ Start or stop polling on WRITE events. More...
  natsStatus natsLibevent_Detach (void *userData) - The connection is closed, it can be safely detached. More...
+ The connection is closed, it can be safely detached. More...
 

Detailed Description

Adapter to plug a NATS connection to a libevent event loop.

Function Documentation

- + +

◆ natsLibevent_Init()

+
@@ -145,7 +130,9 @@

Function Documentation

- + +

◆ natsLibevent_Attach()

+
@@ -193,7 +180,9 @@

Function Documentation

- + +

◆ natsLibevent_Read()

+
@@ -219,7 +208,7 @@

Function Documentation

This callback is invoked to notify that the event library should start or stop polling for READ events.

Parameters
- +
userDatathe user object created in natsLibevent_Attach
userDatathe user object created in natsLibevent_Attach
addtrue if the library needs to start polling, false otherwise.
@@ -227,7 +216,9 @@

Function Documentation

- + +

◆ natsLibevent_Write()

+
@@ -253,7 +244,7 @@

Function Documentation

This callback is invoked to notify that the event library should start or stop polling for WRITE events.

Parameters
- +
userDatathe user object created in natsLibevent_Attach
userDatathe user object created in natsLibevent_Attach
addtrue if the library needs to start polling, false otherwise.
@@ -261,7 +252,9 @@

Function Documentation

- + +

◆ natsLibevent_Detach()

+
@@ -277,7 +270,7 @@

Function Documentation

When a connection is closed (not disconnected, pending a reconnect), this callback will be invoked. This is the opportunity to cleanup the state maintained by the adapter for this connection.

Parameters
- +
userDatathe user object created in natsLibevent_Attach
userDatathe user object created in natsLibevent_Attach
diff --git a/doc/html/group__library_group.html b/doc/html/group__library_group.html index 157d90a10..e31c8c456 100644 --- a/doc/html/group__library_group.html +++ b/doc/html/group__library_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Library @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,55 +93,57 @@

Functions

NATS_EXTERN natsStatus nats_Open (int64_t lockSpinCount) - Initializes the library. More...
+ Initializes the library. More...
  NATS_EXTERN const char * nats_GetVersion (void) - Returns the Library's version. More...
+ Returns the Library's version. More...
  NATS_EXTERN uint32_t nats_GetVersionNumber (void) - Returns the Library's version as a number. More...
+ Returns the Library's version as a number. More...
  NATS_EXTERN bool nats_CheckCompatibility (void) - Check that the header is compatible with the library. More...
+ Check that the header is compatible with the library. More...
  NATS_EXTERN int64_t nats_Now (void) - Gives the current time in milliseconds. More...
+ Gives the current time in milliseconds. More...
  NATS_EXTERN int64_t nats_NowInNanoSeconds (void) - Gives the current time in nanoseconds. More...
+ Gives the current time in nanoseconds. More...
  NATS_EXTERN void nats_Sleep (int64_t sleepTime) - Sleeps for a given number of milliseconds. More...
+ Sleeps for a given number of milliseconds. More...
  NATS_EXTERN const char * nats_GetLastError (natsStatus *status) - Returns the calling thread's last known error. More...
+ Returns the calling thread's last known error. More...
  NATS_EXTERN natsStatus nats_GetLastErrorStack (char *buffer, size_t bufLen) - Returns the calling thread's last known error stack. More...
+ Returns the calling thread's last known error stack. More...
  NATS_EXTERN void nats_PrintLastErrorStack (FILE *file) - Prints the calling thread's last known error stack into the file. More...
+ Prints the calling thread's last known error stack into the file. More...
  NATS_EXTERN natsStatus nats_SetMessageDeliveryPoolSize (int max) - Sets the maximum size of the global message delivery thread pool. More...
+ Sets the maximum size of the global message delivery thread pool. More...
  NATS_EXTERN void nats_ReleaseThreadMemory (void) - Release thread-local memory possibly allocated by the library. More...
+ Release thread-local memory possibly allocated by the library. More...
  NATS_EXTERN natsStatus nats_Sign (const char *encodedSeed, const char *input, unsigned char **signature, int *signatureLength) - Signs a given text using the provided private key. More...
+ Signs a given text using the provided private key. More...
  NATS_EXTERN void nats_Close (void) - Tear down the library. More...
+ Tear down the library. More...
  NATS_EXTERN natsStatus nats_CloseAndWait (int64_t timeout) - Tear down the library and wait for all resources to be released. More...
+ Tear down the library and wait for all resources to be released. More...
 

Detailed Description

Library and helper functions.

Function Documentation

- + +

◆ nats_Open()

+
@@ -173,7 +158,7 @@

Function Documentation

This initializes the library.

It is invoked automatically when creating a connection, using a default spin count. However, you can call this explicitly before creating the very first connection in order for your chosen spin count to take effect.

-
Warning
You must not call nats_Open and nats_Close concurrently.
+
Warning
You must not call nats_Open and nats_Close concurrently.
Parameters
@@ -183,7 +168,9 @@

Function Documentation

- + +

◆ nats_GetVersion()

+
lockSpinCountThe number of times the library will spin trying to lock a mutex object.
@@ -200,7 +187,9 @@

Function Documentation

- + +

◆ nats_GetVersionNumber()

+
@@ -215,12 +204,14 @@

Function Documentation

The version is returned as an hexadecimal number. For instance, if the string version is "1.2.3", the value returned will be:

-

0x010203

+

0x010203

- + +

◆ nats_CheckCompatibility()

+
@@ -236,13 +227,15 @@

Function Documentation

The version of the header you used to compile your application may be incompatible with the library the application is linked with.

This function will check that the two are compatibles. If they are not, a message is printed and the application will exit.

Returns
true if the header and library are compatibles, otherwise the application exits.
-
See also
nats_GetVersion
+
See also
nats_GetVersion
-nats_GetVersionNumber
+nats_GetVersionNumber
- + +

◆ nats_Now()

+
@@ -259,7 +252,9 @@

Function Documentation

- + +

◆ nats_NowInNanoSeconds()

+
@@ -276,7 +271,9 @@

Function Documentation

- + +

◆ nats_Sleep()

+
@@ -299,7 +296,9 @@

Function Documentation

- + +

◆ nats_GetLastError()

+
@@ -312,7 +311,7 @@

Function Documentation

-

Returns the calling thread's last known error. This can be useful when natsConnection_Connect fails. Since no connection object is returned, you would not be able to call natsConnection_GetLastError.

+

Returns the calling thread's last known error. This can be useful when natsConnection_Connect fails. Since no connection object is returned, you would not be able to call natsConnection_GetLastError.

Parameters
@@ -324,7 +323,9 @@

Function Documentation

- + +

◆ nats_GetLastErrorStack()

+
statusif not NULL, this function will store the last error status in there.
@@ -347,7 +348,7 @@

Function Documentation

-

Copies the calling thread's last known error stack into the provided buffer. If the buffer is not big enough, NATS_INSUFFICIENT_BUFFER is returned.

+

Copies the calling thread's last known error stack into the provided buffer. If the buffer is not big enough, NATS_INSUFFICIENT_BUFFER is returned.

Parameters
@@ -358,7 +359,9 @@

Function Documentation

- + +

◆ nats_PrintLastErrorStack()

+
bufferthe buffer into the stack is copied.
@@ -373,7 +376,15 @@

Function Documentation

This call prints the calling thread's last known error stack into the file file. It first prints the error status and the error string, then the stack.

Here is an example for a call:

-
1 Error: 29 - SSL Error - (conn.c:565): SSL handshake error: sslv3 alert bad certificate
2 Stack: (library version: 1.2.3-beta)
3  01 - _makeTLSConn
4  02 - _checkForSecure
5  03 - _processExpectedInfo
6  04 - _processConnInit
7  05 - _connect
8  06 - natsConnection_Connect
Parameters
+
Error: 29 - SSL Error - (conn.c:565): SSL handshake error: sslv3 alert bad certificate
+
Stack: (library version: 1.2.3-beta)
+
01 - _makeTLSConn
+
02 - _checkForSecure
+
03 - _processExpectedInfo
+
04 - _processConnInit
+
05 - _connect
+
06 - natsConnection_Connect
+
Parameters
filethe file the stack is printed to.
@@ -382,7 +393,9 @@

Function Documentation

- + +

◆ nats_SetMessageDeliveryPoolSize()

+
@@ -395,13 +408,13 @@

Function Documentation

-

Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.
+

Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.
However, if an application creates many subscribers, this is not scaling well since the process would use too many threads.

-

The library has a thread pool that can perform message delivery. If a connection is created with the proper option set (natsOptions_UseGlobalMessageDelivery), then this thread pool will be responsible for delivering the messages. The thread pool is lazily initialized, that is, no thread is used as long as no subscriber (requiring global message delivery) is created.

+

The library has a thread pool that can perform message delivery. If a connection is created with the proper option set (natsOptions_UseGlobalMessageDelivery), then this thread pool will be responsible for delivering the messages. The thread pool is lazily initialized, that is, no thread is used as long as no subscriber (requiring global message delivery) is created.

Each subscriber will be attached to a given worker on the pool so that message delivery order is guaranteed.

This call allows you to set the maximum size of the pool.

Note
At this time, a pool does not shrink, but the caller will not get an error when calling this function with a size smaller than the current size.
-
See also
natsOptions_UseGlobalMessageDelivery()
+
See also
natsOptions_UseGlobalMessageDelivery()
Environment Variables
Parameters
@@ -413,7 +426,9 @@

Function Documentation

- + +

◆ nats_ReleaseThreadMemory()

+
@@ -427,11 +442,13 @@

Function Documentation

This needs to be called on user-created threads where NATS calls are performed. This does not need to be called in threads created by the library. For instance, do not call this function in the message handler that you specify when creating a subscription.

-

Also, you do not need to call this in an user thread (or the main) if you are calling nats_Close() there.

+

Also, you do not need to call this in an user thread (or the main) if you are calling nats_Close() there.

- + +

◆ nats_Sign()

+
@@ -468,8 +485,8 @@

Function Documentation

The key is the encoded string representation of the private key, or seed. This is what you get when generating an NKey using NATS tooling.

The input is a string, generally the nonce sent by the server when accepting a connection.

-

This function signs the input and returns the signature through the output arguments. This call allocates memory necessary to hold the signature. If this is used as part of the signature callback passed to natsOptions_SetNKey(), then the memory will be automatically freed by the library after the signature has been inserted in the CONNECT protocol. If this function is used outside of this context, it is the user responsibility to free the allocated memory when no longer needed.

-
See also
natsOptions_SetNKey()
+

This function signs the input and returns the signature through the output arguments. This call allocates memory necessary to hold the signature. If this is used as part of the signature callback passed to natsOptions_SetNKey(), then the memory will be automatically freed by the library after the signature has been inserted in the CONNECT protocol. If this function is used outside of this context, it is the user responsibility to free the allocated memory when no longer needed.

+
See also
natsOptions_SetNKey()
Parameters
@@ -482,7 +499,9 @@

Function Documentation

- + +

◆ nats_Close()

+
encodedSeedthe string encoded private key, also known as seed.
@@ -497,14 +516,16 @@

Function Documentation

Releases memory used by the library.

For this to take effect, all NATS objects that you have created must first be destroyed.

-

This call does not block and it is possible that the library is not unloaded right away if there are still internal threads referencing it, so calling nats_Open() right away may fail. If you want to ensure that the library is fully unloaded, call nats_CloseAndWait() instead.

+

This call does not block and it is possible that the library is not unloaded right away if there are still internal threads referencing it, so calling nats_Open() right away may fail. If you want to ensure that the library is fully unloaded, call nats_CloseAndWait() instead.

Note
There are still a small number of thread local keys and a mutex that are not freed until the application exit (in which case a final cleanup is executed).
-
Warning
You must not call nats_Open and nats_Close concurrently.
-
See also
nats_CloseAndWait()
+
Warning
You must not call nats_Open and nats_Close concurrently.
+
See also
nats_CloseAndWait()
- + +

◆ nats_CloseAndWait()

+
@@ -517,11 +538,17 @@

Function Documentation

-

Similar to nats_Close() except that this call will make sure that all references to the library are decremented before returning (up to the given timeout). Internal threads (such as subscriptions dispatchers, etc..) hold a reference to the library. Only when all references have been released that this call will return. It means that you must call all the "destroy" calls before calling this function, otherwise it will block forever (or up to given timeout).

-

For instance, this code would "deadlock":

1 natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
2 nats_CloseWait(0);
3 natsConnection_Destroy(nc);

But this would work as expected:

1 natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
2 natsConnection_Destroy(nc);
3 nats_CloseWait(0);

The library and other objects (such as connections, subscriptions, etc) use internal threads. After the destroy call, it is possible or even likely that some threads are still running, holding references to the library. Unlike nats_Close(), which will simply ensure that the library is ultimately releasing memory, the nats_CloseAndWait() API will ensure that all those internal threads have unrolled and that the memory used by the library is released before returning.

-
Note
If a timeout is specified, the call may return NATS_TIMEOUT but the library is still being tear down and memory will be released. The error is just to notify you that the operation did not complete in the allotted time. Calling nats_Open() in this case (or any implicit opening of the library) may result in an error since the library may still be in the process of being closed.
+

Similar to nats_Close() except that this call will make sure that all references to the library are decremented before returning (up to the given timeout). Internal threads (such as subscriptions dispatchers, etc..) hold a reference to the library. Only when all references have been released that this call will return. It means that you must call all the "destroy" calls before calling this function, otherwise it will block forever (or up to given timeout).

+

For instance, this code would "deadlock":

natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+
nats_CloseWait(0);
+
natsConnection_Destroy(nc);
+

But this would work as expected:

natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+
natsConnection_Destroy(nc);
+
nats_CloseWait(0);
+

The library and other objects (such as connections, subscriptions, etc) use internal threads. After the destroy call, it is possible or even likely that some threads are still running, holding references to the library. Unlike nats_Close(), which will simply ensure that the library is ultimately releasing memory, the nats_CloseAndWait() API will ensure that all those internal threads have unrolled and that the memory used by the library is released before returning.

+
Note
If a timeout is specified, the call may return NATS_TIMEOUT but the library is still being tear down and memory will be released. The error is just to notify you that the operation did not complete in the allotted time. Calling nats_Open() in this case (or any implicit opening of the library) may result in an error since the library may still be in the process of being closed.
Warning
Due to the blocking nature it is illegal to call this from any NATS thread (such as message or connection callbacks). If trying to do so, a NATS_ILLEGAL_STATE error will be returned.
-
See also
nats_Close()
+
See also
nats_Close()
Parameters
diff --git a/doc/html/group__libuv_functions.html b/doc/html/group__libuv_functions.html index a0c2312e1..eed499f46 100644 --- a/doc/html/group__libuv_functions.html +++ b/doc/html/group__libuv_functions.html @@ -4,7 +4,7 @@ - +NATS C Client with Streaming support: Libuv Adapter @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@ @@ -42,34 +35,22 @@
timeoutthe maximum time to wait for the library to be closed. If negative or 0, waits for as long as needed.
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
- + - + + + +
@@ -110,28 +93,30 @@

Functions

void natsLibuv_Init (void) - Initialize the adapter. More...
+ Initialize the adapter. More...
  void natsLibuv_SetThreadLocalLoop (uv_loop_t *loop) - Register the event loop with the thread running uv_run(). More...
+ Register the event loop with the thread running uv_run(). More...
  natsStatus natsLibuv_Attach (void **userData, void *loop, natsConnection *nc, natsSock socket) - Attach a connection to the given event loop. More...
+ Attach a connection to the given event loop. More...
  natsStatus natsLibuv_Read (void *userData, bool add) - Start or stop polling on READ events. More...
+ Start or stop polling on READ events. More...
  natsStatus natsLibuv_Write (void *userData, bool add) - Start or stop polling on WRITE events. More...
+ Start or stop polling on WRITE events. More...
  natsStatus natsLibuv_Detach (void *userData) - The connection is closed, it can be safely detached. More...
+ The connection is closed, it can be safely detached. More...
 

Detailed Description

Adapter to plug a NATS connection to a libuv event loop.

Function Documentation

- + +

◆ natsLibuv_Init()

+
@@ -148,7 +133,9 @@

Function Documentation

- + +

◆ natsLibuv_SetThreadLocalLoop()

+
@@ -171,7 +158,9 @@

Function Documentation

- + +

◆ natsLibuv_Attach()

+
@@ -219,7 +208,9 @@

Function Documentation

- + +

◆ natsLibuv_Read()

+
@@ -245,7 +236,7 @@

Function Documentation

This callback is invoked to notify that the event library should start or stop polling for READ events.

Parameters
- +
userDatathe user object created in natsLibuv_Attach
userDatathe user object created in natsLibuv_Attach
addtrue if the library needs to start polling, false otherwise.
@@ -253,7 +244,9 @@

Function Documentation

- + +

◆ natsLibuv_Write()

+
@@ -279,7 +272,7 @@

Function Documentation

This callback is invoked to notify that the event library should start or stop polling for WRITE events.

Parameters
- +
userDatathe user object created in natsLibuv_Attach
userDatathe user object created in natsLibuv_Attach
addtrue if the library needs to start polling, false otherwise.
@@ -287,7 +280,9 @@

Function Documentation

- + +

◆ natsLibuv_Detach()

+
@@ -303,7 +298,7 @@

Function Documentation

When a connection is closed (not disconnected, pending a reconnect), this callback will be invoked. This is the opportunity to cleanup the state maintained by the adapter for this connection.

Parameters
- +
userDatathe user object created in natsLibuv_Attach
userDatathe user object created in natsLibuv_Attach
diff --git a/doc/html/group__msg_group.html b/doc/html/group__msg_group.html index cc3873add..6c2eeb9f1 100644 --- a/doc/html/group__msg_group.html +++ b/doc/html/group__msg_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Message @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,49 +93,51 @@

Functions

NATS_EXTERN natsStatus natsMsg_Create (natsMsg **newMsg, const char *subj, const char *reply, const char *data, int dataLen) - Creates a natsMsg object. More...
+ Creates a natsMsg object. More...
  NATS_EXTERN const char * natsMsg_GetSubject (const natsMsg *msg) - Returns the subject set in this message. More...
+ Returns the subject set in this message. More...
  NATS_EXTERN const char * natsMsg_GetReply (const natsMsg *msg) - Returns the reply set in this message. More...
+ Returns the reply set in this message. More...
  NATS_EXTERN const char * natsMsg_GetData (const natsMsg *msg) - Returns the message payload. More...
+ Returns the message payload. More...
  NATS_EXTERN int natsMsg_GetDataLength (const natsMsg *msg) - Returns the message length. More...
+ Returns the message length. More...
  NATS_EXTERN natsStatus natsMsgHeader_Set (natsMsg *msg, const char *key, const char *value) - Set the header entries associated with key to the single element value. More...
+ Set the header entries associated with key to the single element value. More...
  NATS_EXTERN natsStatus natsMsgHeader_Add (natsMsg *msg, const char *key, const char *value) - Add value to the header associated with key. More...
+ Add value to the header associated with key. More...
  NATS_EXTERN natsStatus natsMsgHeader_Get (natsMsg *msg, const char *key, const char **value) - Get the header entry associated with key. More...
+ Get the header entry associated with key. More...
  NATS_EXTERN natsStatus natsMsgHeader_Values (natsMsg *msg, const char *key, const char ***values, int *count) - Get all header values associated with key. More...
+ Get all header values associated with key. More...
  NATS_EXTERN natsStatus natsMsgHeader_Keys (natsMsg *msg, const char ***keys, int *count) - Get all header keys. More...
+ Get all header keys. More...
  NATS_EXTERN natsStatus natsMsgHeader_Delete (natsMsg *msg, const char *key) - Delete the value(s) associated with key. More...
+ Delete the value(s) associated with key. More...
  NATS_EXTERN bool natsMsg_IsNoResponders (natsMsg *msg) - Indicates if this message is a "no responders" message from the server. More...
+ Indicates if this message is a "no responders" message from the server. More...
  NATS_EXTERN void natsMsg_Destroy (natsMsg *msg) - Destroys the message object. More...
+ Destroys the message object. More...
 

Detailed Description

NATS Message.

Function Documentation

- + +

◆ natsMsg_Create()

+
@@ -193,12 +178,12 @@

Function Documentation

-

Creates a natsMsg object. This is used by the subscription related calls and by natsConnection_PublishMsg().

-
Note
Messages need to be destroyed with natsMsg_Destroy() when no longer needed.
-
See also
natsMsg_Destroy()
+

Creates a natsMsg object. This is used by the subscription related calls and by natsConnection_PublishMsg().

+
Note
Messages need to be destroyed with natsMsg_Destroy() when no longer needed.
+
See also
natsMsg_Destroy()
Parameters
- + @@ -209,7 +194,9 @@

Function Documentation

- + +

◆ natsMsg_GetSubject()

+
newMsgthe location where to store the pointer to the newly created natsMsg object.
newMsgthe location where to store the pointer to the newly created natsMsg object.
subjthe subject this message will be sent to. Cannot be NULL.
replythe optional reply for this message.
datathe optional message payload.
@@ -226,14 +213,16 @@

Function Documentation

Warning
The string belongs to the message and must not be freed. Copy it if needed.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
- + +

◆ natsMsg_GetReply()

+
@@ -250,14 +239,16 @@

Function Documentation

Warning
The string belongs to the message and must not be freed. Copy it if needed.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
- + +

◆ natsMsg_GetData()

+
@@ -271,18 +262,20 @@

Function Documentation

Returns the message payload, possibly NULL.

-

Note that although the data sent and received from the server is not NULL terminated, the NATS C Client does add a NULL byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call natsMsg_GetData() without having to copy the returned data to a buffer to add the NULL byte at the end.

+

Note that although the data sent and received from the server is not NULL terminated, the NATS C Client does add a NULL byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call natsMsg_GetData() without having to copy the returned data to a buffer to add the NULL byte at the end.

Warning
The string belongs to the message and must not be freed. Copy it if needed.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
- + +

◆ natsMsg_GetDataLength()

+
@@ -298,14 +291,16 @@

Function Documentation

Returns the message's payload length, possibly 0.

Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
- + +

◆ natsMsgHeader_Set()

+
@@ -339,7 +334,7 @@

Function Documentation

Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keythe key under which the value will be stored. It can't ne NULL or empty.
valuethe string to store under the given key. The value can be NULL or empty string.
@@ -348,7 +343,9 @@

Function Documentation

- + +

◆ natsMsgHeader_Add()

+
@@ -382,7 +379,7 @@

Function Documentation

Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keythe key under which the value will be stored. It can't ne NULL or empty.
valuethe string to add to the values associated with the given key. The value can be NULL or empty string.
@@ -391,7 +388,9 @@

Function Documentation

- + +

◆ natsMsgHeader_Get()

+
@@ -425,7 +424,7 @@

Function Documentation

Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keythe key for which the value is requested.
valuethe memory location where the library will store the pointer to the first value (if more than one is found) associated with the key.
@@ -435,7 +434,9 @@

Function Documentation

- + +

◆ natsMsgHeader_Values()

+
@@ -471,11 +472,24 @@

Function Documentation

The returned strings are own by the library and MUST not be freed or altered. However, the returned array values MUST be freed by the user.

-
const char* *values = NULL;
int count = 0;
s = natsMsgHeader_Values(msg, "My-Key", &values, &count);
if (s == NATS_OK)
{
// do something with the values
// then free the array of pointers.
free((void*) values);
}
Note
The key will be store as its canonical form, that is, the key "my-key" is stored as "My-Key".
+
const char* *values = NULL;
+
int count = 0;
+
+
s = natsMsgHeader_Values(msg, "My-Key", &values, &count);
+
if (s == NATS_OK)
+
{
+
// do something with the values
+
+
// then free the array of pointers.
+
free((void*) values);
+
}
+
NATS_EXTERN natsStatus natsMsgHeader_Values(natsMsg *msg, const char *key, const char ***values, int *count)
Get all header values associated with key.
+
@ NATS_OK
Success.
Definition: status.h:51
+
Note
The key will be store as its canonical form, that is, the key "my-key" is stored as "My-Key".
Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- + @@ -486,7 +500,9 @@

Function Documentation

- + +

◆ natsMsgHeader_Keys()

+
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keythe key for which the values are requested.
valuesthe memory location where the library will store the pointer to the array of values.
countthe memory location where the library will store the number of values returned.
@@ -516,10 +532,22 @@

Function Documentation

The returned strings are own by the library and MUST not be freed or altered. However, the returned array keys MUST be freed by the user.

-
const char* *keys = NULL;
int count = 0;
s = natsMsgHeader_Keys(msg, &keys, &count);
if (s == NATS_OK)
{
// do something with the keys
// then free the array of pointers.
free((void*) keys);
}
Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
+
const char* *keys = NULL;
+
int count = 0;
+
+
s = natsMsgHeader_Keys(msg, &keys, &count);
+
if (s == NATS_OK)
+
{
+
// do something with the keys
+
+
// then free the array of pointers.
+
free((void*) keys);
+
}
+
NATS_EXTERN natsStatus natsMsgHeader_Keys(natsMsg *msg, const char ***keys, int *count)
Get all header keys.
+
Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keysthe memory location where the library will store the pointer to the array of keys.
countthe memory location where the library will store the number of keys returned.
@@ -529,7 +557,9 @@

Function Documentation

- + +

◆ natsMsgHeader_Delete()

+
@@ -556,7 +586,7 @@

Function Documentation

Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
keythe key to delete from the headers map.
@@ -565,7 +595,9 @@

Function Documentation

- + +

◆ natsMsg_IsNoResponders()

+
@@ -579,12 +611,12 @@

Function Documentation

Starting with the NATS Server v2.2.0+ and the C client v2.2.0+ releases, which introduced support for message headers and the "no responders" feature, if a request is received by the server and there are no subscriptions on the request's subject, the server sends a message with no payload but with a header "Status" with value "503".

-

The call natsConnection_Request() and its variants intercept this special message and instead of returning it to the user, they return NATS_NO_RESPONDERS.

-

If a synchronous subscription is created on a subject used as a reply subject to a natsConnection_PublishRequest call (and its variants), natsSubscription_NextMsg also detects this message and returns NATS_NO_RESPONDERS (but it was not from release v2.2.0 to v2.4.1).

+

The call natsConnection_Request() and its variants intercept this special message and instead of returning it to the user, they return NATS_NO_RESPONDERS.

+

If a synchronous subscription is created on a subject used as a reply subject to a natsConnection_PublishRequest call (and its variants), natsSubscription_NextMsg also detects this message and returns NATS_NO_RESPONDERS (but it was not from release v2.2.0 to v2.4.1).

For asynchronous subscriptions, the user may want to know that the request failed because there are no responders. For that reason, the message is passed to the message callback, and this function can be used to detect that this is a "no responders" message from the server and act accordingly.

Parameters
- +
msgthe pointer to the natsMsg object.
msgthe pointer to the natsMsg object.
@@ -592,7 +624,9 @@

Function Documentation

- + +

◆ natsMsg_Destroy()

+
@@ -608,7 +642,7 @@

Function Documentation

Destroys the message, freeing memory.

Parameters
- +
msgthe pointer to the natsMsg object to destroy.
msgthe pointer to the natsMsg object to destroy.
diff --git a/doc/html/group__opts_group.html b/doc/html/group__opts_group.html index 2e2f8d48b..99eaf61a6 100644 --- a/doc/html/group__opts_group.html +++ b/doc/html/group__opts_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Options @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
NATS C Client with Streaming support -  2.5.1 +  2.6.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -42,34 +35,22 @@
- + - + + + +
@@ -110,163 +93,165 @@

Functions

NATS_EXTERN natsStatus natsOptions_Create (natsOptions **newOpts) - Creates a natsOptions object. More...
+ Creates a natsOptions object. More...
  NATS_EXTERN natsStatus natsOptions_SetURL (natsOptions *opts, const char *url) - Sets the URL to connect to. More...
+ Sets the URL to connect to. More...
  NATS_EXTERN natsStatus natsOptions_SetServers (natsOptions *opts, const char **servers, int serversCount) - Set the list of servers to try to (re)connect to. More...
+ Set the list of servers to try to (re)connect to. More...
  NATS_EXTERN natsStatus natsOptions_SetUserInfo (natsOptions *opts, const char *user, const char *password) - Sets the user name/password to use when not specified in the URL. More...
+ Sets the user name/password to use when not specified in the URL. More...
  NATS_EXTERN natsStatus natsOptions_SetToken (natsOptions *opts, const char *token) - Sets the token to use when not specified in the URL. More...
+ Sets the token to use when not specified in the URL. More...
  NATS_EXTERN natsStatus natsOptions_SetTokenHandler (natsOptions *opts, natsTokenHandler tokenCb, void *closure) - Sets the tokenCb to use whenever a token is needed. More...
+ Sets the tokenCb to use whenever a token is needed. More...
  NATS_EXTERN natsStatus natsOptions_SetNoRandomize (natsOptions *opts, bool noRandomize) - Indicate if the servers list should be randomized. More...
+ Indicate if the servers list should be randomized. More...
  NATS_EXTERN natsStatus natsOptions_SetTimeout (natsOptions *opts, int64_t timeout) - Sets the (re)connect process timeout. More...
+ Sets the (re)connect process timeout. More...
  NATS_EXTERN natsStatus natsOptions_SetName (natsOptions *opts, const char *name) - Sets the name. More...
+ Sets the name. More...
  NATS_EXTERN natsStatus natsOptions_SetSecure (natsOptions *opts, bool secure) - Sets the secure mode. More...
+ Sets the secure mode. More...
  NATS_EXTERN natsStatus natsOptions_LoadCATrustedCertificates (natsOptions *opts, const char *fileName) - Loads the trusted CA certificates from a file. More...
+ Loads the trusted CA certificates from a file. More...
  NATS_EXTERN natsStatus natsOptions_SetCATrustedCertificates (natsOptions *opts, const char *certificates) - Sets the trusted CA certificates from memory. More...
+ Sets the trusted CA certificates from memory. More...
  NATS_EXTERN natsStatus natsOptions_LoadCertificatesChain (natsOptions *opts, const char *certsFileName, const char *keyFileName) - Loads the certificate chain from a file, using the given key. More...
+ Loads the certificate chain from a file, using the given key. More...
  NATS_EXTERN natsStatus natsOptions_SetCertificatesChain (natsOptions *opts, const char *cert, const char *key) - Sets the client certificate and key. More...
+ Sets the client certificate and key. More...
  NATS_EXTERN natsStatus natsOptions_SetCiphers (natsOptions *opts, const char *ciphers) - Sets the list of available ciphers. More...
+ Sets the list of available ciphers. More...
  NATS_EXTERN natsStatus natsOptions_SetCipherSuites (natsOptions *opts, const char *ciphers) - Sets the list of available ciphers for TLSv1.3. More...
+ Sets the list of available ciphers for TLSv1.3. More...
  NATS_EXTERN natsStatus natsOptions_SetExpectedHostname (natsOptions *opts, const char *hostname) - Sets the server certificate's expected hostname. More...
+ Sets the server certificate's expected hostname. More...
  NATS_EXTERN natsStatus natsOptions_SkipServerVerification (natsOptions *opts, bool skip) - Switch server certificate verification. More...
+ Switch server certificate verification. More...
  NATS_EXTERN natsStatus natsOptions_SetVerbose (natsOptions *opts, bool verbose) - Sets the verbose mode. More...
+ Sets the verbose mode. More...
  NATS_EXTERN natsStatus natsOptions_SetPedantic (natsOptions *opts, bool pedantic) - Sets the pedantic mode. More...
+ Sets the pedantic mode. More...
  NATS_EXTERN natsStatus natsOptions_SetPingInterval (natsOptions *opts, int64_t interval) - Sets the ping interval. More...
+ Sets the ping interval. More...
  NATS_EXTERN natsStatus natsOptions_SetMaxPingsOut (natsOptions *opts, int maxPingsOut) - Sets the limit of outstanding PINGs without corresponding PONGs. More...
+ Sets the limit of outstanding PINGs without corresponding PONGs. More...
  NATS_EXTERN natsStatus natsOptions_SetIOBufSize (natsOptions *opts, int ioBufSize) - Sets the size of the internal read/write buffers. More...
+ Sets the size of the internal read/write buffers. More...
  NATS_EXTERN natsStatus natsOptions_SetAllowReconnect (natsOptions *opts, bool allow) - Indicates if the connection will be allowed to reconnect. More...
+ Indicates if the connection will be allowed to reconnect. More...
  NATS_EXTERN natsStatus natsOptions_SetMaxReconnect (natsOptions *opts, int maxReconnect) - Sets the maximum number of reconnect attempts. More...
+ Sets the maximum number of reconnect attempts. More...
  NATS_EXTERN natsStatus natsOptions_SetReconnectWait (natsOptions *opts, int64_t reconnectWait) - Sets the time between reconnect attempts. More...
+ Sets the time between reconnect attempts. More...
  NATS_EXTERN natsStatus natsOptions_SetReconnectJitter (natsOptions *opts, int64_t jitter, int64_t jitterTLS) - Set the upper bound of a random delay added to reconnect wait. More...
+ Set the upper bound of a random delay added to reconnect wait. More...
  NATS_EXTERN natsStatus natsOptions_SetCustomReconnectDelay (natsOptions *opts, natsCustomReconnectDelayHandler cb, void *closure) - Sets the handler to invoke when the library needs to wait before the next reconnect attempts. More...
+ Sets the handler to invoke when the library needs to wait before the next reconnect attempts. More...
  NATS_EXTERN natsStatus natsOptions_SetReconnectBufSize (natsOptions *opts, int reconnectBufSize) - Sets the size of the backing buffer used during reconnect. More...
+ Sets the size of the backing buffer used during reconnect. More...
  NATS_EXTERN natsStatus natsOptions_SetMaxPendingMsgs (natsOptions *opts, int maxPending) - Sets the maximum number of pending messages per subscription. More...
+ Sets the maximum number of pending messages per subscription. More...
  NATS_EXTERN natsStatus natsOptions_SetErrorHandler (natsOptions *opts, natsErrHandler errHandler, void *closure) - Sets the error handler for asynchronous events. More...
+ Sets the error handler for asynchronous events. More...
  NATS_EXTERN natsStatus natsOptions_SetClosedCB (natsOptions *opts, natsConnectionHandler closedCb, void *closure) - Sets the callback to be invoked when a connection to a server is permanently lost. More...
+ Sets the callback to be invoked when a connection to a server is permanently lost. More...
  NATS_EXTERN natsStatus natsOptions_SetDisconnectedCB (natsOptions *opts, natsConnectionHandler disconnectedCb, void *closure) - Sets the callback to be invoked when the connection to a server is lost. More...
+ Sets the callback to be invoked when the connection to a server is lost. More...
  NATS_EXTERN natsStatus natsOptions_SetReconnectedCB (natsOptions *opts, natsConnectionHandler reconnectedCb, void *closure) - Sets the callback to be invoked when the connection has reconnected. More...
+ Sets the callback to be invoked when the connection has reconnected. More...
  NATS_EXTERN natsStatus natsOptions_SetDiscoveredServersCB (natsOptions *opts, natsConnectionHandler discoveredServersCb, void *closure) - Sets the callback to be invoked when new servers are discovered. More...
+ Sets the callback to be invoked when new servers are discovered. More...
  NATS_EXTERN natsStatus natsOptions_SetLameDuckModeCB (natsOptions *opts, natsConnectionHandler lameDuckCb, void *closure) - Sets the callback to be invoked when server enters lame duck mode. More...
+ Sets the callback to be invoked when server enters lame duck mode. More...
  NATS_EXTERN natsStatus natsOptions_SetEventLoop (natsOptions *opts, void *loop, natsEvLoop_Attach attachCb, natsEvLoop_ReadAddRemove readCb, natsEvLoop_WriteAddRemove writeCb, natsEvLoop_Detach detachCb) - Sets the external event loop and associated callbacks. More...
+ Sets the external event loop and associated callbacks. More...
  NATS_EXTERN natsStatus natsOptions_UseGlobalMessageDelivery (natsOptions *opts, bool global) - Switch on/off the use of a central message delivery thread pool. More...
+ Switch on/off the use of a central message delivery thread pool. More...
  NATS_EXTERN natsStatus natsOptions_IPResolutionOrder (natsOptions *opts, int order) - Dictates the order in which host name are resolved during connect. More...
+ Dictates the order in which host name are resolved during connect. More...
  NATS_EXTERN natsStatus natsOptions_SetSendAsap (natsOptions *opts, bool sendAsap) - Sets if Publish calls should send data right away. More...
+ Sets if Publish calls should send data right away. More...
  NATS_EXTERN natsStatus natsOptions_UseOldRequestStyle (natsOptions *opts, bool useOldStyle) - Switches the use of old style requests. More...
+ Switches the use of old style requests. More...
  NATS_EXTERN natsStatus natsOptions_SetFailRequestsOnDisconnect (natsOptions *opts, bool failRequests) - Fails pending requests on disconnect event. More...
+ Fails pending requests on disconnect event. More...
  NATS_EXTERN natsStatus natsOptions_SetNoEcho (natsOptions *opts, bool noEcho) - Sets if connection receives its own messages. More...
+ Sets if connection receives its own messages. More...
  NATS_EXTERN natsStatus natsOptions_SetRetryOnFailedConnect (natsOptions *opts, bool retry, natsConnectionHandler connectedCb, void *closure) - Indicates if initial connect failure should be retried or not. More...
+ Indicates if initial connect failure should be retried or not. More...
  NATS_EXTERN natsStatus natsOptions_SetUserCredentialsCallbacks (natsOptions *opts, natsUserJWTHandler ujwtCB, void *ujwtClosure, natsSignatureHandler sigCB, void *sigClosure) - Sets the callbacks to fetch user JWT and sign server's nonce. More...
+ Sets the callbacks to fetch user JWT and sign server's nonce. More...
  NATS_EXTERN natsStatus natsOptions_SetUserCredentialsFromFiles (natsOptions *opts, const char *userOrChainedFile, const char *seedFile) - Sets the file(s) to use to fetch user JWT and seed required to sign nonce. More...
+ Sets the file(s) to use to fetch user JWT and seed required to sign nonce. More...
  NATS_EXTERN natsStatus natsOptions_SetNKey (natsOptions *opts, const char *pubKey, natsSignatureHandler sigCB, void *sigClosure) - Sets the NKey public key and signature callback. More...
+ Sets the NKey public key and signature callback. More...
  NATS_EXTERN natsStatus natsOptions_SetNKeyFromSeed (natsOptions *opts, const char *pubKey, const char *seedFile) - Sets the NKey public key and its seed file. More...
+ Sets the NKey public key and its seed file. More...
  NATS_EXTERN natsStatus natsOptions_SetWriteDeadline (natsOptions *opts, int64_t deadline) - Sets the write deadline. More...
+ Sets the write deadline. More...
  NATS_EXTERN natsStatus natsOptions_DisableNoResponders (natsOptions *opts, bool disabled) - Enable/Disable the "no responders" feature. More...
+ Enable/Disable the "no responders" feature. More...
  NATS_EXTERN void natsOptions_Destroy (natsOptions *opts) - Destroys a natsOptions object. More...
+ Destroys a natsOptions object. More...
 

Detailed Description

NATS Options.

Function Documentation

- + +

◆ natsOptions_Create()

+
@@ -279,22 +264,24 @@

Function Documentation

-

Creates a natsOptions object. This object is used when one wants to set specific options prior to connecting to the NATS Server.

-

After making the appropriate natsOptions_Set calls, this object is passed to the natsConnection_Connect() call, which will clone this object. After natsConnection_Connect() returns, modifications to the options object will not affect the connection.

+

Creates a natsOptions object. This object is used when one wants to set specific options prior to connecting to the NATS Server.

+

After making the appropriate natsOptions_Set calls, this object is passed to the natsConnection_Connect() call, which will clone this object. After natsConnection_Connect() returns, modifications to the options object will not affect the connection.

Note
The object needs to be destroyed when no longer needed.*
-
See also
natsConnection_Connect()
+
See also
natsConnection_Connect()
-natsOptions_Destroy()
+natsOptions_Destroy()
Parameters
- +
newOptsthe location where store the pointer to the newly created natsOptions object.
newOptsthe location where store the pointer to the newly created natsOptions object.
- + +

◆ natsOptions_SetURL()

+
@@ -324,14 +311,14 @@

Function Documentation

  • nats://user@localhost:4222
  • nats://user:password@localhost:4222
  • -
    See also
    natsOptions_SetServers
    +
    See also
    natsOptions_SetServers
    -natsOptions_SetUserInfo
    +natsOptions_SetUserInfo
    -natsOptions_SetToken
    +natsOptions_SetToken
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    urlthe string representing the URL the connection should use to connect to the server.
    @@ -339,7 +326,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetServers()

    +
    @@ -368,15 +357,15 @@

    Function Documentation

    -

    This specifies a list of servers to try to connect (or reconnect) to. Note that if you call natsOptions_SetURL() too, the actual list will contain the one from natsOptions_SetURL() and the ones specified in this call.

    -
    See also
    natsOptions_SetURL
    +

    This specifies a list of servers to try to connect (or reconnect) to. Note that if you call natsOptions_SetURL() too, the actual list will contain the one from natsOptions_SetURL() and the ones specified in this call.

    +
    See also
    natsOptions_SetURL
    -natsOptions_SetUserInfo
    +natsOptions_SetUserInfo
    -natsOptions_SetToken
    +natsOptions_SetToken
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    serversthe array of strings representing the server URLs.
    serversCountthe size of the array.
    @@ -385,7 +374,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetUserInfo()

    +
    @@ -414,19 +405,19 @@

    Function Documentation

    -

    Credentials are usually provided through the URL in the form: nats://foo:bar@localhost:4222.
    - Until now, you could specify URLs in two ways, with natsOptions_SetServers or natsConnection_ConnectTo. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate credentials in the URLs.
    -
    - However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded credentials.
    - You need to use this function (or natsOptions_SetToken) to instruct the client library to use those credentials when connecting to a server that requires authentication and for which there is no embedded credentials in the URL.

    -
    See also
    natsOptions_SetToken
    +

    Credentials are usually provided through the URL in the form: nats://foo:bar@localhost:4222.
    + Until now, you could specify URLs in two ways, with natsOptions_SetServers or natsConnection_ConnectTo. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate credentials in the URLs.
    +
    + However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded credentials.
    + You need to use this function (or natsOptions_SetToken) to instruct the client library to use those credentials when connecting to a server that requires authentication and for which there is no embedded credentials in the URL.

    +
    See also
    natsOptions_SetToken
    -natsOptions_SetURL
    +natsOptions_SetURL
    -natsOptions_SetServers
    +natsOptions_SetServers
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    userthe user name to send to the server during connect.
    passwordthe password to send to the server during connect.
    @@ -435,7 +426,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetToken()

    +
    @@ -458,19 +451,19 @@

    Function Documentation

    -

    Tokens are usually provided through the URL in the form: nats://mytoken@localhost:4222.
    - Until now, you could specify URLs in two ways, with natsOptions_SetServers or natsConnection_ConnectTo. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate token in the URLs.
    -
    - However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded tokens.
    - You need to use this function (or natsOptions_SetUserInfo) to instruct the client library to use this token when connecting to a server that requires authentication and for which there is no embedded token in the URL.

    -
    See also
    natsOptions_SetUserInfo
    +

    Tokens are usually provided through the URL in the form: nats://mytoken@localhost:4222.
    + Until now, you could specify URLs in two ways, with natsOptions_SetServers or natsConnection_ConnectTo. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate token in the URLs.
    +
    + However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded tokens.
    + You need to use this function (or natsOptions_SetUserInfo) to instruct the client library to use this token when connecting to a server that requires authentication and for which there is no embedded token in the URL.

    +
    See also
    natsOptions_SetUserInfo
    -natsOptions_SetURL
    +natsOptions_SetURL
    -natsOptions_SetServers
    +natsOptions_SetServers
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    tokenthe token to send to the server during connect.
    @@ -478,7 +471,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetTokenHandler()

    +
    @@ -507,24 +502,26 @@

    Function Documentation

    -

    For use cases where setting a static token through the URL
    - or through natsOptions_SetToken is not desirable.
    -
    - This function can be used to generate a token whenever the client needs one.
    +

    For use cases where setting a static token through the URL
    + or through natsOptions_SetToken is not desirable.
    +
    + This function can be used to generate a token whenever the client needs one.
    Some example of use cases: expiring token, credential rotation, ...

    -
    See also
    natsOptions_SetToken
    +
    See also
    natsOptions_SetToken
    Parameters
    - + - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    tokenCbthe tokenCb to use to generate a token to the server during connect.
    closurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
    closurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
    - + +

    ◆ natsOptions_SetNoRandomize()

    +
    @@ -547,10 +544,10 @@

    Function Documentation

    -

    If 'noRandomize' is true, then the list of server URLs is used in the order provided by natsOptions_SetURL() + natsOptions_SetServers(). Otherwise, the list is formed in a random order.

    +

    If 'noRandomize' is true, then the list of server URLs is used in the order provided by natsOptions_SetURL() + natsOptions_SetServers(). Otherwise, the list is formed in a random order.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    noRandomizeif true, the list will be used as-is.
    @@ -558,7 +555,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetTimeout()

    +
    @@ -584,7 +583,7 @@

    Function Documentation

    This timeout, expressed in milliseconds, is used to interrupt a (re)connect attempt to a NATS Server. This timeout is used both for the low level TCP connect call, and for timing out the response from the server to the client's initial PING protocol.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    timeoutthe time, in milliseconds, allowed for an individual connect (or reconnect) to complete.
    @@ -592,7 +591,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetName()

    +
    @@ -618,7 +619,7 @@

    Function Documentation

    This name is sent as part of the CONNECT protocol. There is no default name.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    namethe name to set.
    @@ -626,7 +627,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetSecure()

    +
    @@ -653,7 +656,7 @@

    Function Documentation

    The default is false.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    securetrue for a secure connection, false otherwise.
    @@ -661,7 +664,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_LoadCATrustedCertificates()

    +
    @@ -685,10 +690,10 @@

    Function Documentation

    Loads the trusted CA certificates from a file.

    -

    Note that the certificates are added to a SSL context for this natsOptions object at the time of this call, so possible errors while loading the certificates will be reported now instead of when a connection is created. You can get extra information by calling nats_GetLastError.

    +

    Note that the certificates are added to a SSL context for this natsOptions object at the time of this call, so possible errors while loading the certificates will be reported now instead of when a connection is created. You can get extra information by calling nats_GetLastError.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    fileNamethe file containing the CA certificates.
    @@ -696,7 +701,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetCATrustedCertificates()

    +
    @@ -719,12 +726,21 @@

    Function Documentation

    -

    Similar to natsOptions_LoadCATrustedCertificates expect that instead of loading from file, this loads from the given memory location.

    +

    Similar to natsOptions_LoadCATrustedCertificates expect that instead of loading from file, this loads from the given memory location.

    If more than one certificate need to be provided, they need to be concatenated. For instance:

    -
    1 const char *certs =
    2  "-----BEGIN CERTIFICATE-----\n"
    3  "MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD\n"
    4  (...)
    5  "-----END CERTIFICATE-----\n"
    6  "-----BEGIN CERTIFICATE-----\n"
    7  "MIIXyz...\n"
    8  (...)
    9  "-----END CERTIFICATE-----\n"
    See also
    natsOptions_LoadCATrustedCertificates
    +
    const char *certs =
    +
    "-----BEGIN CERTIFICATE-----\n"
    +
    "MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD\n"
    +
    (...)
    +
    "-----END CERTIFICATE-----\n"
    +
    "-----BEGIN CERTIFICATE-----\n"
    +
    "MIIXyz...\n"
    +
    (...)
    +
    "-----END CERTIFICATE-----\n"
    +
    See also
    natsOptions_LoadCATrustedCertificates
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    certificatesthe string containing the concatenated CA certificates.
    @@ -732,7 +748,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_LoadCertificatesChain()

    +
    @@ -763,10 +781,10 @@

    Function Documentation

    The certificates must be in PEM format and must be sorted starting with the subject's certificate, followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.

    The private key file format supported is also PEM.

    -

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    +

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    certsFileNamethe file containing the client certificates.
    keyFileNamethe file containing the client private key.
    @@ -775,7 +793,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetCertificatesChain()

    +
    @@ -804,11 +824,11 @@

    Function Documentation

    -

    Similar to natsOptions_LoadCertificatesChain expect that instead of loading from file, this loads from the given memory locations.

    -
    See also
    natsOptions_LoadCertificatesChain()
    +

    Similar to natsOptions_LoadCertificatesChain expect that instead of loading from file, this loads from the given memory locations.

    +
    See also
    natsOptions_LoadCertificatesChain()
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    certthe memory location containing the client certificates.
    keythe memory location containing the client private key.
    @@ -817,7 +837,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetCiphers()

    +
    @@ -845,10 +867,10 @@

    Function Documentation

    "-ALL:HIGH"

    -

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    +

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    ciphersthe ciphers suite.
    @@ -856,7 +878,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetCipherSuites()

    +
    @@ -883,10 +907,10 @@

    Function Documentation

    "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"

    -

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    +

    See natsOptions_LoadCATrustedCertificates regarding error reports.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    ciphersthe ciphers suite.
    @@ -894,7 +918,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetExpectedHostname()

    +
    @@ -920,7 +946,7 @@

    Function Documentation

    If set, the library will check that the hostname in the server certificate matches the given hostname. This will occur when a connection is created, not at the time of this call.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    hostnamethe expected server certificate hostname.
    @@ -928,7 +954,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SkipServerVerification()

    +
    @@ -955,7 +983,7 @@

    Function Documentation

    Warning
    This is fine for tests but use with caution since this is not secure.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    skipset it to true to disable - or skip - server certificate verification.
    @@ -963,7 +991,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetVerbose()

    +
    @@ -990,7 +1020,7 @@

    Function Documentation

    The default is false.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    verbosetrue for a verbose protocol, false otherwise.
    @@ -998,7 +1028,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetPedantic()

    +
    @@ -1025,7 +1057,7 @@

    Function Documentation

    The default is false

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    pedantictrue for a pedantic protocol, false otherwise.
    @@ -1033,7 +1065,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetPingInterval()

    +
    @@ -1059,7 +1093,7 @@

    Function Documentation

    Interval, expressed in milliseconds, in which the client sends PING protocols to the NATS Server.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    intervalthe interval, in milliseconds, at which the connection will send PING protocols to the server.
    @@ -1067,7 +1101,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetMaxPingsOut()

    +
    @@ -1093,7 +1129,7 @@

    Function Documentation

    Specifies the maximum number of PINGs without corresponding PONGs (which should be received from the server) before closing the connection with the NATS_STALE_CONNECTION status. If reconnection is allowed, the client library will try to reconnect.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    maxPingsOutthe maximum number of PINGs without PONGs (positive number).
    @@ -1101,7 +1137,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetIOBufSize()

    +
    @@ -1127,7 +1165,7 @@

    Function Documentation

    Sets the size, in bytes, of the internal read/write buffers used for reading/writing data from a socket. If not specified, or the value is 0, the library will use a default value, currently set to 32KB.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    ioBufSizethe size, in bytes, of the internal buffer for read/write operations.
    @@ -1135,7 +1173,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetAllowReconnect()

    +
    @@ -1162,7 +1202,7 @@

    Function Documentation

    The default is true.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    allowtrue if the connection is allowed to reconnect, false otherwise.
    @@ -1170,7 +1210,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetMaxReconnect()

    +
    @@ -1196,7 +1238,7 @@

    Function Documentation

    Specifies the maximum number of reconnect attempts.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    maxReconnectthe maximum number of reconnects (positive number).
    @@ -1204,7 +1246,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetReconnectWait()

    +
    @@ -1230,7 +1274,7 @@

    Function Documentation

    Specifies how long to wait between two reconnect attempts from the same server. This means that if you have a list with S1,S2 and are currently connected to S1, and get disconnected, the library will immediately attempt to connect to S2. If this fails, it will go back to S1, and this time will wait for reconnectWait milliseconds since the last attempt to connect to S1.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    reconnectWaitthe time, in milliseconds, to wait between attempts to reconnect to the same server.
    @@ -1238,7 +1282,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetReconnectJitter()

    +
    @@ -1268,12 +1314,12 @@

    Function Documentation

    After a disconnect, the library will try to reconnect to any server URLs in its list (the URLs are either provided by the user or discovered through gossip protocol).

    -

    After the library failed to reconnect to every server in the list, it will wait for reconnectWait as specified with natsOptions_SetReconnectWait(). This option adds some random jitter to the reconnect wait delay.

    +

    After the library failed to reconnect to every server in the list, it will wait for reconnectWait as specified with natsOptions_SetReconnectWait(). This option adds some random jitter to the reconnect wait delay.

    This will help minimize the thundering herd phenomenon. For instance, suppose a server has 1000 connections, all were created at different times, but have the same reconnect wait option. If this server suddenly stops, then all connections will detect the failure and initiate a reconnect at the same time. The issue is even greater when those connections are TLS because of the added cost of the TLS handshake.

    -
    See also
    natsOptions_SetReconnectWait()
    +
    See also
    natsOptions_SetReconnectWait()
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    jitterthe jitter in milliseconds for non TLS connections.
    jitterTLSthe jitter in milliseconds for TLS connections.
    @@ -1282,7 +1328,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetCustomReconnectDelay()

    +
    @@ -1313,19 +1361,21 @@

    Function Documentation

    This callback is invoked after the library tried every URL in the server list and failed to reconnect. It passes to the user the current number of attempts. This function shall return the amount of time the library will sleep before attempting to reconnect again.

    It is strongly recommended that this value contains some jitter to prevent all connections to attempt reconnecting at the same time.

    -
    Note
    When using this approach, the reconnect wait as specified by natsOptions_SetReconnectWait() is ignored.
    +
    Note
    When using this approach, the reconnect wait as specified by natsOptions_SetReconnectWait() is ignored.
    Parameters
    - + - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    cbthe custom reconnect delay handler to invoke.
    closurea pointer to an user defined object (can be NULL). See the natsCustomReconnectDelayHandler prototype.
    closurea pointer to an user defined object (can be NULL). See the natsCustomReconnectDelayHandler prototype.
    - + +

    ◆ natsOptions_SetReconnectBufSize()

    +
    @@ -1348,10 +1398,10 @@

    Function Documentation

    -

    Sets the size, in bytes, of the backing buffer holding published data while the library is reconnecting. Once this buffer has been exhausted, publish operations will return the NATS_INSUFFICIENT_BUFFER error. If not specified, or the value is 0, the library will use a default value, currently set to 8MB.

    +

    Sets the size, in bytes, of the backing buffer holding published data while the library is reconnecting. Once this buffer has been exhausted, publish operations will return the NATS_INSUFFICIENT_BUFFER error. If not specified, or the value is 0, the library will use a default value, currently set to 8MB.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    reconnectBufSizethe size, in bytes, of the backing buffer for write operations during a reconnect.
    @@ -1359,7 +1409,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetMaxPendingMsgs()

    +
    @@ -1382,11 +1434,11 @@

    Function Documentation

    -

    Specifies the maximum number of inbound messages that can be buffered in the library, for each subscription, before inbound messages are dropped and NATS_SLOW_CONSUMER status is reported to the natsErrHandler callback (if one has been set).

    -
    See also
    natsOptions_SetErrorHandler()
    +

    Specifies the maximum number of inbound messages that can be buffered in the library, for each subscription, before inbound messages are dropped and NATS_SLOW_CONSUMER status is reported to the natsErrHandler callback (if one has been set).

    +
    See also
    natsOptions_SetErrorHandler()
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    maxPendingthe number of messages allowed to be buffered by the library before triggering a slow consumer scenario.
    @@ -1394,7 +1446,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetErrorHandler()

    +
    @@ -1424,10 +1478,10 @@

    Function Documentation

    Specifies the callback to invoke when an asynchronous error occurs. This is used by applications having only asynchronous subscriptions that would not know otherwise that a problem with the connection occurred.

    -
    See also
    natsErrHandler
    +
    See also
    natsErrHandler
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    errHandlerthe error handler callback.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1436,7 +1490,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetClosedCB()

    +
    @@ -1468,7 +1524,7 @@

    Function Documentation

    Specifies the callback to invoke when a connection is terminally closed, that is, after all reconnect attempts have failed (when reconnection is allowed).

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    closedCbthe callback to be invoked when the connection is closed.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1477,7 +1533,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetDisconnectedCB()

    +
    @@ -1510,7 +1568,7 @@

    Function Documentation

    Warning
    Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    disconnectedCbthe callback to be invoked when a connection to a server is lost
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1519,7 +1577,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetReconnectedCB()

    +
    @@ -1552,7 +1612,7 @@

    Function Documentation

    Warning
    Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    reconnectedCbthe callback to be invoked when the connection to a server has been re-established.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1561,7 +1621,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetDiscoveredServersCB()

    +
    @@ -1594,7 +1656,7 @@

    Function Documentation

    Warning
    Invocation of this callback is asynchronous, which means that the state may have changed when this callback is invoked.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    discoveredServersCbthe callback to be invoked when new servers have been discovered.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1603,7 +1665,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetLameDuckModeCB()

    +
    @@ -1636,7 +1700,7 @@

    Function Documentation

    Warning
    Invocation of this callback is asynchronous, which means that the state may have changed when this callback is invoked.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    lameDuckCbthe callback to be invoked when server enters lame duck mode.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -1645,7 +1709,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetEventLoop()

    +
    @@ -1695,7 +1761,7 @@

    Function Documentation

    If you want to use an external event loop, the NATS library will not create a thread to read data from the socket, and will not directly write data to the socket. Instead, the library will invoke those callbacks for various events.

    Parameters
    - + @@ -1707,7 +1773,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_UseGlobalMessageDelivery()

    +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    loopthe void* pointer to the external event loop.
    attachCbthe callback invoked after the connection is connected, or reconnected.
    readCbthe callback invoked when the event library should start or stop polling for read events.
    @@ -1730,16 +1798,16 @@

    Function Documentation

    -

    Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.
    +

    Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.
    However, if an application creates many subscribers, this is not scaling well since the process would use too many threads.

    When a connection is created from a nats_Options that has enabled global message delivery, asynchronous subscribers from this connection will use a shared thread pool responsible for message delivery.

    Note
    The message order per subscription is still guaranteed.
    -
    See also
    nats_SetMessageDeliveryPoolSize()
    +
    See also
    nats_SetMessageDeliveryPoolSize()
    Environment Variables
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    globalif true, uses the global message delivery thread pool, otherwise, each asynchronous subscriber will create their own message delivery thread.
    @@ -1747,7 +1815,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_IPResolutionOrder()

    +
    @@ -1770,26 +1840,26 @@

    Function Documentation

    -

    The library would previously favor IPv6 addresses during the connect process.
    - You can now change the order, or even exclude a family of addresses, using this option. Here is the list of possible values:
    -

    - - - - - - - - - - - - +

    The library would previously favor IPv6 addresses during the connect process.
    + You can now change the order, or even exclude a family of addresses, using this option. Here is the list of possible values:
    +

    Value Meaning
    46 try IPv4 first, if it fails try IPv6
    64 try IPv6 first, if it fails try IPv4
    4 use only IPv4
    6 use only IPv6
    0 any family, no specific order
    + + + + + + + + + + + +
    Value Meaning
    46 try IPv4 first, if it fails try IPv6
    64 try IPv6 first, if it fails try IPv4
    4 use only IPv4
    6 use only IPv6
    0 any family, no specific order
    Note
    If this option is not set, or you specify 0 for the order, the library will use the first IP (based on the DNS configuration) for which a successful connection can be made.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    ordera string representing the order for the IP resolution.
    @@ -1797,7 +1867,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetSendAsap()

    +
    @@ -1822,14 +1894,14 @@

    Function Documentation

    For throughput performance, the client library tries by default to buffer as much data as possible before sending it over TCP.

    Setting this option to true will make Publish calls send the data right away, reducing latency, but also throughput.

    -

    A good use-case would be a connection used to solely send replies. Imagine, a requestor sending a request, waiting for the reply before sending the next request.
    - The replier application will send only one reply at a time (since it will not receive the next request until the requestor receives the reply).
    +

    A good use-case would be a connection used to solely send replies. Imagine, a requestor sending a request, waiting for the reply before sending the next request.
    + The replier application will send only one reply at a time (since it will not receive the next request until the requestor receives the reply).
    In such case, it makes sense for the reply to be sent right away.

    -

    The alternative would be to call natsConnection_Flush(), but this call requires a round-trip with the server, which is less efficient than using this option.

    +

    The alternative would be to call natsConnection_Flush(), but this call requires a round-trip with the server, which is less efficient than using this option.

    Note that the Request() call already automatically sends the request as fast as possible, there is no need to set an option for that.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    sendAsapa boolean indicating if published data should be sent right away or be buffered.
    @@ -1837,7 +1909,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_UseOldRequestStyle()

    +
    @@ -1863,7 +1937,7 @@

    Function Documentation

    Setting useOldStyle to true forces the request calls to use the original behavior, which is to create a new inbox, a new subscription on that inbox and set auto-unsubscribe to 1.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    useOldStylea boolean indicating if old request style should be used.
    @@ -1871,7 +1945,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetFailRequestsOnDisconnect()

    +
    @@ -1894,12 +1970,12 @@

    Function Documentation

    -

    If this option is enabled, all pending natsConnection_Request() family calls will fail with the NATS_CONNECTION_DISCONNECTED status.

    +

    If this option is enabled, all pending natsConnection_Request() family calls will fail with the NATS_CONNECTION_DISCONNECTED status.

    Note
    This does not apply to requests from connections that use the old style requests.
    -
    See also
    natsOptions_UseOldRequestStyle
    +
    See also
    natsOptions_UseOldRequestStyle
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    failRequestsa boolean indicating if pending requests should fail when a disconnect event occurs.
    @@ -1907,7 +1983,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetNoEcho()

    +
    @@ -1932,10 +2010,10 @@

    Function Documentation

    This configures whether the server will echo back messages that are sent on this connection if there is also matching subscriptions.

    Set this to true to prevent the server from sending back messages produced by this connection. The default is false, that is, messages originating from this connection will be sent by the server if the connection has matching subscriptions.

    -
    Note
    This is supported on servers >= version 1.2.0. Calling natsConnection_Connect() with the option set to true to server below this version will return the NATS_NO_SERVER_SUPPORT error.
    +
    Note
    This is supported on servers >= version 1.2.0. Calling natsConnection_Connect() with the option set to true to server below this version will return the NATS_NO_SERVER_SUPPORT error.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    noEchoa boolean indicating if sent messages can be delivered back to this connection or not.
    @@ -1943,7 +2021,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetRetryOnFailedConnect()

    +
    @@ -1978,26 +2058,26 @@

    Function Documentation

    -

    By default, natsConnection_Connect() attempts to connect to a server specified in provided list of servers. If it cannot connect and the list has been fully tried, the function returns an error.

    +

    By default, natsConnection_Connect() attempts to connect to a server specified in provided list of servers. If it cannot connect and the list has been fully tried, the function returns an error.

    This option is used to changed this default behavior.

    If retry is set to true and connection cannot be established right away, the library will attempt to connect based on the reconnect attempts and delay settings.

    -
    Note
    The connect retry logic uses reconnect settings even if natsOptions_SetAllowReconnect() has been set to false. In other words, a failed connect may be retried even though a reconnect will not be allowed should the connection to the server be lost after initial connect.
    +
    Note
    The connect retry logic uses reconnect settings even if natsOptions_SetAllowReconnect() has been set to false. In other words, a failed connect may be retried even though a reconnect will not be allowed should the connection to the server be lost after initial connect.

    The behavior will then depend on the value of the connectedCb parameter:

    • If NULL, then the call blocks until it can connect or exhausts the reconnect attempts.
    • -
    • If not NULL, and no connection can be immediately established, the natsConnection_Connect() calls returns NATS_NOT_YET_CONNECTED to indicate that no connection is currently established, but will try asynchronously to connect using the reconnect attempts/delay settings. If the connection is later established, the specified callback will be invoked. If no connection can be made and the retry attempts are exhausted, the callback registered with natsOptions_SetClosedCB(), if any, will be invoked.
    • +
    • If not NULL, and no connection can be immediately established, the natsConnection_Connect() calls returns NATS_NOT_YET_CONNECTED to indicate that no connection is currently established, but will try asynchronously to connect using the reconnect attempts/delay settings. If the connection is later established, the specified callback will be invoked. If no connection can be made and the retry attempts are exhausted, the callback registered with natsOptions_SetClosedCB(), if any, will be invoked.
    -
    Note
    If natsConnection_Connect() returns NATS_OK (that is, a connection to a NATS Server was established in that call), then the connectedCb callback will not be invoked.
    -

    If retry is set to false, natsConnection_Connect() behaves as originally designed, that is, returns an error and no connection object if failing to connect to any server in the list.

    +
    Note
    If natsConnection_Connect() returns NATS_OK (that is, a connection to a NATS Server was established in that call), then the connectedCb callback will not be invoked.
    +

    If retry is set to false, natsConnection_Connect() behaves as originally designed, that is, returns an error and no connection object if failing to connect to any server in the list.

    Note
    The connectedCb parameter is ignored and set to NULL in the options object when retry is set to false.
    -
    See also
    natsOptions_SetMaxReconnect()
    +
    See also
    natsOptions_SetMaxReconnect()
    -natsOptions_SetReconnectWait()
    +natsOptions_SetReconnectWait()
    -natsOptions_SetClosedCB()
    +natsOptions_SetClosedCB()
    Parameters
    - + @@ -2007,7 +2087,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetUserCredentialsCallbacks()

    +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    retrya boolean indicating if a failed connect should be retried.
    connectedCbif retry is true and this is not NULL, then the connect may be asynchronous and this callback will be invoked if the connect succeeds.
    closurea pointer to an user object that will be passed to the callback. closure can be NULL.
    @@ -2050,16 +2132,16 @@

    Function Documentation

    Any time the library creates a TCP connection to the server, the server in response sends an INFO protocol. That INFO protocol, for NATS Server at v2.0.0+, may include a nonce for the client to sign.

    If this option is set, the library will invoke the two handlers to fetch the user JWT and sign the server's nonce.

    -

    This is an option that will be used only by users that are able to sign using Ed25519 (public-key signature system). Most users will probably prefer the user of natsOptions_SetUserCredentialsFromFiles().

    -
    Note
    natsOptions_SetUserCredentialsCallbacks() and natsOptions_SetNKey() are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with natsOptions_SetNKey(), with this one.
    -
    See also
    natsUserJWTHandler
    +

    This is an option that will be used only by users that are able to sign using Ed25519 (public-key signature system). Most users will probably prefer the user of natsOptions_SetUserCredentialsFromFiles().

    +
    Note
    natsOptions_SetUserCredentialsCallbacks() and natsOptions_SetNKey() are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with natsOptions_SetNKey(), with this one.
    +
    See also
    natsUserJWTHandler
    -natsSignatureHandler
    +natsSignatureHandler
    -natsOptions_SetUserCredentialsFromFiles()
    +natsOptions_SetUserCredentialsFromFiles()
    Parameters
    - + @@ -2070,7 +2152,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetUserCredentialsFromFiles()

    +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    ujwtCBthe callback to invoke to fetch the user JWT.
    ujwtClosurethe closure that will be passed to the ujwtCB callback.
    sigCBthe callback to invoke to sign the server nonce.
    @@ -2101,12 +2185,23 @@

    Function Documentation

    This is a convenient option that specifies the files(s) to use to fetch the user JWT and the user seed to be used to sign the server's nonce.

    The userOrChainedFile contains the user JWT token and possibly the user NKey seed. Note the format of this file:

    -
    1 -----BEGIN NATS USER JWT-----
    2 ...an user JWT token...
    3 ------END NATS USER JWT------
    4 
    5 ************************* IMPORTANT *************************
    6 NKEY Seed printed below can be used to sign and prove identity.
    7 NKEYs are sensitive and should be treated as secrets.
    8 
    9 -----BEGIN USER NKEY SEED-----
    10 SU...
    11 ------END USER NKEY SEED------

    The ---BEGIN NATS USER JWT--- header is used to detect where the user JWT is in this file.

    +
    -----BEGIN NATS USER JWT-----
    +
    ...an user JWT token...
    +
    ------END NATS USER JWT------
    +
    +
    ************************* IMPORTANT *************************
    +
    NKEY Seed printed below can be used to sign and prove identity.
    +
    NKEYs are sensitive and should be treated as secrets.
    +
    +
    -----BEGIN USER NKEY SEED-----
    +
    SU...
    +
    ------END USER NKEY SEED------
    +

    The ---BEGIN NATS USER JWT--- header is used to detect where the user JWT is in this file.

    If the file does not contain the user NKey seed, then the seedFile file name must be specified and must contain the user NKey seed.

    -
    Note
    natsOptions_SetUserCredentialsFromFiles() and natsOptions_SetNKey() are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with natsOptions_SetNKey(), with an internal one that will handle the signature.
    +
    Note
    natsOptions_SetUserCredentialsFromFiles() and natsOptions_SetNKey() are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with natsOptions_SetNKey(), with an internal one that will handle the signature.
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    userOrChainedFilethe name of the file containing the user JWT and possibly the user NKey seed.
    seedFilethe name of the file containing the user NKey seed.
    @@ -2115,7 +2210,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetNKey()

    +
    @@ -2152,11 +2249,11 @@

    Function Documentation

    Any time the library creates a TCP connection to the server, the server in response sends an INFO protocol. That INFO protocol, for NATS Server at v2.0.0+, may include a nonce for the client to sign.

    If this option is set, the library will add the NKey public key pubKey to the CONNECT protocol along with the server's nonce signature resulting from the invocation of the signature handler sigCB.

    -
    Note
    natsOptions_SetNKey() and natsOptions_SetUserCredentialsCallbacks() or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.
    -
    See also
    natsSignatureHandler
    +
    Note
    natsOptions_SetNKey() and natsOptions_SetUserCredentialsCallbacks() or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.
    +
    See also
    natsSignatureHandler
    Parameters
    - + @@ -2166,7 +2263,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetNKeyFromSeed()

    +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    pubKeythe user NKey public key.
    sigCBthe callback to invoke to sign the server nonce.
    sigClosurethe closure that will be passed to the sigCB callback.
    @@ -2197,11 +2296,11 @@

    Function Documentation

    Any time the library creates a TCP connection to the server, the server in response sends an INFO protocol. That INFO protocol, for NATS Server at v2.0.0+, may include a nonce for the client to sign.

    If this option is set, the library will add the NKey public key pubKey to the CONNECT protocol along with the server's nonce signature signed using the private key from the provided seed file. The library takes care of clearing the memory holding the private key read from the file as soon as it is no longer needed.

    -
    Note
    natsOptions_SetNKeyFromSeed() and natsOptions_SetUserCredentialsCallbacks() or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.
    -
    See also
    natsSignatureHandler
    +
    Note
    natsOptions_SetNKeyFromSeed() and natsOptions_SetUserCredentialsCallbacks() or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.
    +
    See also
    natsSignatureHandler
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    pubKeythe user NKey public key.
    seedFilethe name of the file containing the user NKey seed.
    @@ -2210,7 +2309,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_SetWriteDeadline()

    +
    @@ -2236,7 +2337,7 @@

    Function Documentation

    If this is set, the socket is set to non-blocking mode and write will have a deadline set. If the deadline is reached, the write call will return an error which will translate to publish calls, or any library call trying to send data to the server, to possibly fail.

    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    deadlinethe write deadline expressed in milliseconds. If set to 0, it means that there is no deadline and socket is in blocking mode.
    @@ -2244,7 +2345,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_DisableNoResponders()

    +
    @@ -2267,14 +2370,14 @@

    Function Documentation

    -

    By default, when a connection to a NATS Server v2.2.0+ is made, the library signals to the server that it supports the "no responders" feature, which means that if a request is made, and there are no subscriptions on the request subject (no responders), then the server sends back an empty message with the header "Status" and value "503". The request APIs capture this message and instead return a NATS_NO_RESPONDERS status, instead of waiting for the timeout to occur and return NATS_TIMEOUT.

    -

    In case where users set up their own asynchronous subscription on the reply subject and publish the request with natsConnection_PublishRequest and the like, then the message callback may be invoked with this "no responders" message, which can be checked with natsMsg_IsNoResponders.

    +

    By default, when a connection to a NATS Server v2.2.0+ is made, the library signals to the server that it supports the "no responders" feature, which means that if a request is made, and there are no subscriptions on the request subject (no responders), then the server sends back an empty message with the header "Status" and value "503". The request APIs capture this message and instead return a NATS_NO_RESPONDERS status, instead of waiting for the timeout to occur and return NATS_TIMEOUT.

    +

    In case where users set up their own asynchronous subscription on the reply subject and publish the request with natsConnection_PublishRequest and the like, then the message callback may be invoked with this "no responders" message, which can be checked with natsMsg_IsNoResponders.

    However, if users don't want to have to deal with that, it is possible to instruct the server to disable this feature for a given connection. If that is the case, requests will behave as with pre-v2.2.0 servers, in that the request will timeout when there are no responders.

    Note
    This function is to disable the feature that is normally enabled by default. Passing false means that it would enable it again if you had previously disable the option. However, the feature may still be disabled when connecting to a server that does not support it.
    -
    See also
    natsMsg_IsNoResponders()
    +
    See also
    natsMsg_IsNoResponders()
    Parameters
    - +
    optsthe pointer to the natsOptions object.
    optsthe pointer to the natsOptions object.
    disabledthe boolean to indicate if the feature should be disabled or not.
    @@ -2282,7 +2385,9 @@

    Function Documentation

    - + +

    ◆ natsOptions_Destroy()

    +
    @@ -2295,10 +2400,10 @@

    Function Documentation

    -

    Destroys the natsOptions object, freeing used memory. See the note in the natsOptions_Create() call.

    +

    Destroys the natsOptions object, freeing used memory. See the note in the natsOptions_Create() call.

    Parameters
    - +
    optsthe pointer to the natsOptions object to destroy.
    optsthe pointer to the natsOptions object to destroy.
    diff --git a/doc/html/group__stan_conn_group.html b/doc/html/group__stan_conn_group.html index 5d2c3de4b..b95dc677b 100644 --- a/doc/html/group__stan_conn_group.html +++ b/doc/html/group__stan_conn_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Streaming Connection @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    diff --git a/doc/html/group__stan_conn_mgt_group.html b/doc/html/group__stan_conn_mgt_group.html index cbf461bd1..145c62fd7 100644 --- a/doc/html/group__stan_conn_mgt_group.html +++ b/doc/html/group__stan_conn_mgt_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Management @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,25 +93,27 @@

    Functions

    NATS_EXTERN natsStatus stanConnection_Connect (stanConnection **sc, const char *clusterID, const char *clientID, stanConnOptions *options) - Connects to a NATS Streaming Server using the provided options. More...
    + Connects to a NATS Streaming Server using the provided options. More...
      NATS_EXTERN natsStatus stanConnection_GetNATSConnection (stanConnection *sc, natsConnection **nc) - Returns the underlying NATS Connection. More...
    + Returns the underlying NATS Connection. More...
      NATS_EXTERN void stanConnection_ReleaseNATSConnection (stanConnection *sc) - Releases the NATS Connection. More...
    + Releases the NATS Connection. More...
      NATS_EXTERN natsStatus stanConnection_Close (stanConnection *sc) - Closes the connection. More...
    + Closes the connection. More...
      NATS_EXTERN natsStatus stanConnection_Destroy (stanConnection *sc) - Destroys the connection object. More...
    + Destroys the connection object. More...
     

    Detailed Description

    Functions related to connection management.

    Function Documentation

    - + +

    ◆ stanConnection_Connect()

    +
    @@ -164,15 +149,15 @@

    Function Documentation

    Attempts to connect to a NATS Streaming Server.

    -

    This call is cloning the stanConnOptions object, if given. Once this call returns, changes made to the options will not have an effect to this connection. The options can however be changed prior to be passed to another stanConnection_Connect() call if desired.

    -
    Note
    The Streaming connection does not honor the NATS Connection option natsOptions_SetRetryOnFailedConnect(). If you pass NATS Options with this option enabled, no error is returned, but if the connection cannot be established "right away", the connect call will return an error.
    -
    Warning
    If connecting to a NATS Server v2.2.0+ and there is no Streaming server listening on the connect request subject, this call will return NATS_NO_RESPONDERS, not NATS_TIMEOUT.
    -
    See also
    stanConnOptions
    +

    This call is cloning the stanConnOptions object, if given. Once this call returns, changes made to the options will not have an effect to this connection. The options can however be changed prior to be passed to another stanConnection_Connect() call if desired.

    +
    Note
    The Streaming connection does not honor the NATS Connection option natsOptions_SetRetryOnFailedConnect(). If you pass NATS Options with this option enabled, no error is returned, but if the connection cannot be established "right away", the connect call will return an error.
    +
    Warning
    If connecting to a NATS Server v2.2.0+ and there is no Streaming server listening on the connect request subject, this call will return NATS_NO_RESPONDERS, not NATS_TIMEOUT.
    +
    See also
    stanConnOptions
    -stanConnection_Destroy()
    +stanConnection_Destroy()
    Parameters
    - + @@ -182,7 +167,9 @@

    Function Documentation

    - + +

    ◆ stanConnection_GetNATSConnection()

    +
    scthe location where to store the pointer to the newly created natsConnection object.
    scthe location where to store the pointer to the newly created natsConnection object.
    clusterIDthe name of the cluster this connection is for.
    clientIDthe client ID for this connection. Only one connection with this ID will be accepted by the server. Use only a-zA-Z0-9_- characters.
    optionsthe options to use for this connection (can be NULL).
    @@ -207,20 +194,22 @@

    Function Documentation

    This can be used if the application needs to do non streaming messaging but does not want to create a separate NATS Connection.

    Obtain a NATS connection from a NATS streaming connection. The NATS connection can be used to perform regular NATS operations, but it is owned and managed by the NATS streaming connection. It cannot be closed, which will happen when the NATS streaming connection is closed.

    -
    Note
    For each call to this function, the user must call stanConnection_ReleaseNATSConnection() when access to the NATS Connection is no longer needed.
    +
    Note
    For each call to this function, the user must call stanConnection_ReleaseNATSConnection() when access to the NATS Connection is no longer needed.
    Warning
    The returned connection cannot be closed, drained nor destroyed. Calling corresponding functions will have no effect or return NATS_ILLEGAL_STATE.
    -
    See also
    stanConnection_ReleaseNATSConnection()
    +
    See also
    stanConnection_ReleaseNATSConnection()
    Parameters
    - - + +
    scthe pointer to the stanConnection object.
    ncthe location where to store the pointer of the natsConnection object.
    scthe pointer to the stanConnection object.
    ncthe location where to store the pointer of the natsConnection object.
    - + +

    ◆ stanConnection_ReleaseNATSConnection()

    +
    @@ -233,21 +222,23 @@

    Function Documentation

    -

    This should be paired with the stanConnection_GetNATSConnection() call. That is, after getting a reference to the underlying NATS Connection and once that connection is no longer needed, calling this function will allow resources to be properly released when the streaming connection is destroyed.

    -

    You would normally call stanConnection_GetNATSConnection() and this function only once.

    -

    After the last stanConnection_ReleaseNATSConnection() call is made, you must no longer use the NATS Connection because if stanConnection_Destroy() is called, that could make the pointer to the NATS Connection invalid.

    -
    Note
    If the streaming connection is closed/destroyed before the last call to stanConnection_ReleaseNATSConnection, the pointer to the NATS connection will still be valid, although all calls will fail since the connection is now closed. Calling this function will release the streaming object allowing memory to be freed.
    -
    See also
    stanConnection_GetNATSConnection
    +

    This should be paired with the stanConnection_GetNATSConnection() call. That is, after getting a reference to the underlying NATS Connection and once that connection is no longer needed, calling this function will allow resources to be properly released when the streaming connection is destroyed.

    +

    You would normally call stanConnection_GetNATSConnection() and this function only once.

    +

    After the last stanConnection_ReleaseNATSConnection() call is made, you must no longer use the NATS Connection because if stanConnection_Destroy() is called, that could make the pointer to the NATS Connection invalid.

    +
    Note
    If the streaming connection is closed/destroyed before the last call to stanConnection_ReleaseNATSConnection, the pointer to the NATS connection will still be valid, although all calls will fail since the connection is now closed. Calling this function will release the streaming object allowing memory to be freed.
    +
    See also
    stanConnection_GetNATSConnection
    Parameters
    - +
    scthe pointer to the stanConnection object.
    scthe pointer to the stanConnection object.
    - + +

    ◆ stanConnection_Close()

    +
    @@ -260,18 +251,20 @@

    Function Documentation

    -

    Closes the connection to the server. This call will release all blocking calls. The connection object is still usable until the call to stanConnection_Destroy().

    -
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    +

    Closes the connection to the server. This call will release all blocking calls. The connection object is still usable until the call to stanConnection_Destroy().

    +
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    Parameters
    - +
    scthe pointer to the stanConnection object.
    scthe pointer to the stanConnection object.
    - + +

    ◆ stanConnection_Destroy()

    +
    @@ -287,7 +280,7 @@

    Function Documentation

    Destroys the connection object, freeing up memory. If not already done, this call first closes the connection to the server.

    Parameters
    - +
    scthe pointer to the stanConnection object.
    scthe pointer to the stanConnection object.
    diff --git a/doc/html/group__stan_conn_opts_group.html b/doc/html/group__stan_conn_opts_group.html index 4494f9c4b..e5d05e662 100644 --- a/doc/html/group__stan_conn_opts_group.html +++ b/doc/html/group__stan_conn_opts_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Streaming Connection Options @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,40 +93,42 @@

    Functions

    NATS_EXTERN natsStatus stanConnOptions_Create (stanConnOptions **newOpts) - Creates a stanConnOptions object. More...
    + Creates a stanConnOptions object. More...
      NATS_EXTERN natsStatus stanConnOptions_SetURL (stanConnOptions *opts, const char *url) - Sets the URL to connect to. More...
    + Sets the URL to connect to. More...
      NATS_EXTERN natsStatus stanConnOptions_SetNATSOptions (stanConnOptions *opts, natsOptions *nOpts) - Sets the NATS Options to use to create the connection. More...
    + Sets the NATS Options to use to create the connection. More...
      NATS_EXTERN natsStatus stanConnOptions_SetConnectionWait (stanConnOptions *opts, int64_t wait) - Sets the timeout for establishing a connection. More...
    + Sets the timeout for establishing a connection. More...
      NATS_EXTERN natsStatus stanConnOptions_SetPubAckWait (stanConnOptions *opts, int64_t wait) - Sets the timeout for waiting for an ACK for a published message. More...
    + Sets the timeout for waiting for an ACK for a published message. More...
      NATS_EXTERN natsStatus stanConnOptions_SetDiscoveryPrefix (stanConnOptions *opts, const char *prefix) - Sets the subject prefix the library sends the connect request to. More...
    + Sets the subject prefix the library sends the connect request to. More...
      NATS_EXTERN natsStatus stanConnOptions_SetMaxPubAcksInflight (stanConnOptions *opts, int maxPubAcksInflight, float percentage) - Sets the maximum number of published messages without outstanding ACKs from the server. More...
    + Sets the maximum number of published messages without outstanding ACKs from the server. More...
      NATS_EXTERN natsStatus stanConnOptions_SetPings (stanConnOptions *opts, int interval, int maxOut) - Sets the ping interval and max out values. More...
    + Sets the ping interval and max out values. More...
      NATS_EXTERN natsStatus stanConnOptions_SetConnectionLostHandler (stanConnOptions *opts, stanConnectionLostHandler handler, void *closure) - Sets the connection lost handler. More...
    + Sets the connection lost handler. More...
      NATS_EXTERN void stanConnOptions_Destroy (stanConnOptions *opts) - Destroys a stanConnOptions object. More...
    + Destroys a stanConnOptions object. More...
     

    Detailed Description

    NATS Streaming Connection Options.

    Function Documentation

    - + +

    ◆ stanConnOptions_Create()

    +
    @@ -156,23 +141,25 @@

    Function Documentation

    -

    Creates a stanConnOptions object. This object is used when one wants to set specific options prior to connecting to the NATS Streaning Server.

    -

    After making the appropriate stanConnOptions_SetXXX() calls, this object is passed to the stanConnection_Connect() call, which will clone this object. After stanConnection_Connect() returns, modifications to the options object will not affect the connection.

    +

    Creates a stanConnOptions object. This object is used when one wants to set specific options prior to connecting to the NATS Streaning Server.

    +

    After making the appropriate stanConnOptions_SetXXX() calls, this object is passed to the stanConnection_Connect() call, which will clone this object. After stanConnection_Connect() returns, modifications to the options object will not affect the connection.

    The default options set in this call are: url: nats://localhost:4222 connection wait: 2 seconds publish ack wait: 30 seconds discovery prefix: _STAN.discovery maximum publish acks inflight and percentage: 16384, 50% ping interval: 5 seconds max ping out without response: 3

    Note
    The object needs to be destroyed when no longer needed.
    -
    See also
    stanConnection_Connect()
    +
    See also
    stanConnection_Connect()
    -stanConnOptions_Destroy()
    +stanConnOptions_Destroy()
    Parameters
    - +
    newOptsthe location where store the pointer to the newly created stanConnOptions object.
    newOptsthe location where store the pointer to the newly created stanConnOptions object.
    - + +

    ◆ stanConnOptions_SetURL()

    +
    @@ -203,10 +190,10 @@

    Function Documentation

  • nats://user:password@localhost:4222
  • nats://host1:4222,nats://host2:4222,nats://host3:4222
  • -
    Note
    This option takes precedence over natsOptions_SetURL when NATS options are passed with stanConnOptions_SetNATSOptions.
    +
    Note
    This option takes precedence over natsOptions_SetURL when NATS options are passed with stanConnOptions_SetNATSOptions.
    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    urlthe string representing the URL the connection should use to connect to the server.
    @@ -214,7 +201,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetNATSOptions()

    +
    @@ -237,20 +226,22 @@

    Function Documentation

    -

    The Streaming client connects to the NATS Streaming Server through a regular NATS Connection (natsConnection). To configure this connection create a natsOptions and configure it as needed, then call this function.

    -

    This function clones the passed options, so after this call, any changes to the given natsOptions will not affect the stanConnOptions.

    -
    Note
    If both natsOptions_SetURL and stanConnOptions_SetURL are used the URL(s) set in the later take precedence.
    +

    The Streaming client connects to the NATS Streaming Server through a regular NATS Connection (natsConnection). To configure this connection create a natsOptions and configure it as needed, then call this function.

    +

    This function clones the passed options, so after this call, any changes to the given natsOptions will not affect the stanConnOptions.

    +
    Note
    If both natsOptions_SetURL and stanConnOptions_SetURL are used the URL(s) set in the later take precedence.
    Parameters
    - - + +
    optsthe pointer to the stanConnOptions object.
    nOptsthe pointer to the natsOptions object to use to create the connection to the server.
    optsthe pointer to the stanConnOptions object.
    nOptsthe pointer to the natsOptions object to use to create the connection to the server.
    - + +

    ◆ stanConnOptions_SetConnectionWait()

    +
    @@ -277,7 +268,7 @@

    Function Documentation

    Default is 2000 milliseconds (2 seconds).

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    waithow long to wait for a response from the streaming server.
    @@ -285,7 +276,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetPubAckWait()

    +
    @@ -312,7 +305,7 @@

    Function Documentation

    Default is 30000 milliseconds (30 seconds).

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    waithow long to wait for a response from the streaming server.
    @@ -320,7 +313,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetDiscoveryPrefix()

    +
    @@ -346,7 +341,7 @@

    Function Documentation

    Default is _STAN.discovery

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    prefixthe subject prefix the library sends the connect request to.
    @@ -354,7 +349,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetMaxPubAcksInflight()

    +
    @@ -383,11 +380,11 @@

    Function Documentation

    -

    A connection will block stanConnection_Publish() or stanConnection_PublishAsync calls if the number of outstanding published messages has reached this number.

    +

    A connection will block stanConnection_Publish() or stanConnection_PublishAsync calls if the number of outstanding published messages has reached this number.

    When the connection receives ACKs, the number of outstanding messages will decrease. If the number falls between maxPubAcksInflight * percentage, then the blocked publish calls will be released.

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    maxPubAcksInflightthe maximum number of published messages without ACKs from the server.
    percentagethe percentage (expressed as a float between ]0.0 and 1.0]) of the maxPubAcksInflight number below which a blocked publish call is released.
    @@ -396,7 +393,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetPings()

    +
    @@ -430,7 +429,7 @@

    Function Documentation

    The interval needs to be at least 1 and represents the number of seconds. The maxOut needs to be at least 2, since the count of sent PINGs increase whenever a PING is sent and reset to 0 when a response is received. Setting to 1 would cause the library to close the connection right away.

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    intervalthe number of seconds between each PING.
    maxOutthe maximum number of PINGs without receiving a PONG back.
    @@ -439,7 +438,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_SetConnectionLostHandler()

    +
    @@ -468,10 +469,10 @@

    Function Documentation

    -

    This callback will be invoked should the client permanently lose contact with the server (or another client replaces it while being disconnected). The callback will not be invoked on normal stanConnection_Close().

    +

    This callback will be invoked should the client permanently lose contact with the server (or another client replaces it while being disconnected). The callback will not be invoked on normal stanConnection_Close().

    Parameters
    - +
    optsthe pointer to the stanConnOptions object.
    optsthe pointer to the stanConnOptions object.
    handlerthe handler to be invoked when the connection to the streaming server is lost.
    closurethe closure the library will pass to the callback.
    @@ -480,7 +481,9 @@

    Function Documentation

    - + +

    ◆ stanConnOptions_Destroy()

    +
    @@ -493,10 +496,10 @@

    Function Documentation

    -

    Destroys the stanConnOptions object, freeing used memory. See the note in the stanConnOptions_Create() call.

    +

    Destroys the stanConnOptions object, freeing used memory. See the note in the stanConnOptions_Create() call.

    Parameters
    - +
    optsthe pointer to the stanConnOptions object to destroy.
    optsthe pointer to the stanConnOptions object to destroy.
    diff --git a/doc/html/group__stan_conn_pub_group.html b/doc/html/group__stan_conn_pub_group.html index 970dc1415..4634fed9b 100644 --- a/doc/html/group__stan_conn_pub_group.html +++ b/doc/html/group__stan_conn_pub_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Publishing @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,16 +93,18 @@

    Functions

    NATS_EXTERN natsStatus stanConnection_Publish (stanConnection *sc, const char *channel, const void *data, int dataLen) - Publishes data on a channel. More...
    + Publishes data on a channel. More...
      NATS_EXTERN natsStatus stanConnection_PublishAsync (stanConnection *sc, const char *channel, const void *data, int dataLen, stanPubAckHandler ah, void *ahClosure) - Asynchronously publishes data on a channel. More...
    + Asynchronously publishes data on a channel. More...
     

    Detailed Description

    Publishing functions

    Function Documentation

    - + +

    ◆ stanConnection_Publish()

    +
    @@ -157,7 +142,7 @@

    Function Documentation

    Publishes the data argument to the given channel. The data argument is left untouched and needs to be correctly interpreted on the receiver.

    Parameters
    - + @@ -167,7 +152,9 @@

    Function Documentation

    - + +

    ◆ stanConnection_PublishAsync()

    +
    scthe pointer to the stanConnection object.
    scthe pointer to the stanConnection object.
    channelthe channel name the data is sent to.
    datathe data to be sent, can be NULL.
    dataLenthe length of the data to be sent.
    @@ -216,10 +203,10 @@

    Function Documentation

    Publishes the data argument to the given channel. The data argument is left untouched and needs to be correctly interpreted on the receiver.

    This function does not wait for an acknowledgment back from the server. Instead, the library will invoke the provided callback when that acknowledgment comes.

    -

    In order to correlate the acknowledgment with the published message, you can use the ahClosure since this will be passed to the stanPubAckHandler on every invocation. In other words, you should use a unique closure for each published message.

    +

    In order to correlate the acknowledgment with the published message, you can use the ahClosure since this will be passed to the stanPubAckHandler on every invocation. In other words, you should use a unique closure for each published message.

    Parameters
    - + diff --git a/doc/html/group__stan_conn_sub_group.html b/doc/html/group__stan_conn_sub_group.html index dd94c62ae..aebe9edc2 100644 --- a/doc/html/group__stan_conn_sub_group.html +++ b/doc/html/group__stan_conn_sub_group.html @@ -4,7 +4,7 @@ - +NATS C Client with Streaming support: Subscribing @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@ @@ -42,34 +35,22 @@
    scthe pointer to the natsConnection object.
    scthe pointer to the natsConnection object.
    channelthe channel name the data is sent to.
    datathe data to be sent, can be NULL.
    dataLenthe length of the data to be sent.
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    - + - + + + +
    @@ -110,16 +93,18 @@

    Functions

    NATS_EXTERN natsStatus stanConnection_Subscribe (stanSubscription **sub, stanConnection *sc, const char *channel, stanMsgHandler cb, void *cbClosure, stanSubOptions *options) - Creates a subscription. More...
    + Creates a subscription. More...
      NATS_EXTERN natsStatus stanConnection_QueueSubscribe (stanSubscription **sub, stanConnection *sc, const char *channel, const char *queueGroup, stanMsgHandler cb, void *cbClosure, stanSubOptions *options) - Creates a queue subscription. More...
    + Creates a queue subscription. More...
     

    Detailed Description

    Subscribing functions.

    Function Documentation

    - + +

    ◆ stanConnection_Subscribe()

    +
    @@ -166,15 +151,15 @@

    Function Documentation

    -

    Expresses interest in the given subject. The subject can NOT have wildcards. Messages will be delivered to the associated stanMsgHandler.

    -
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    +

    Expresses interest in the given subject. The subject can NOT have wildcards. Messages will be delivered to the associated stanMsgHandler.

    +
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    Parameters
    - - + + - - + +
    subthe location where to store the pointer to the newly created natsSubscription object.
    scthe pointer to the natsConnection object.
    subthe location where to store the pointer to the newly created natsSubscription object.
    scthe pointer to the natsConnection object.
    channelthe channel this subscription is created for.
    cbthe stanMsgHandler callback.
    cbClosurea pointer to an user defined object (can be NULL). See the stanMsgHandler prototype.
    cbthe stanMsgHandler callback.
    cbClosurea pointer to an user defined object (can be NULL). See the stanMsgHandler prototype.
    optionsthe optional to further configure the subscription.
    @@ -182,7 +167,9 @@

    Function Documentation

    - + +

    ◆ stanConnection_QueueSubscribe()

    +
    @@ -236,15 +223,15 @@

    Function Documentation

    Creates a queue subscriber on the given channel. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.

    -
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    +
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    Parameters
    - - + + - - + +
    subthe location where to store the pointer to the newly created natsSubscription object.
    scthe pointer to the natsConnection object.
    subthe location where to store the pointer to the newly created natsSubscription object.
    scthe pointer to the natsConnection object.
    channelthe channel name this subscription is created for.
    queueGroupthe name of the group.
    cbthe natsMsgHandler callback.
    cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
    cbthe natsMsgHandler callback.
    cbClosurea pointer to an user defined object (can be NULL). See the natsMsgHandler prototype.
    optionsthe optional options to further configure this queue subscription.
    diff --git a/doc/html/group__stan_msg_group.html b/doc/html/group__stan_msg_group.html index a1d50c8cf..dd3d7e4f5 100644 --- a/doc/html/group__stan_msg_group.html +++ b/doc/html/group__stan_msg_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Streaming Message @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,28 +93,30 @@

    Functions

    NATS_EXTERN uint64_t stanMsg_GetSequence (const stanMsg *msg) - Returns the message's sequence number. More...
    + Returns the message's sequence number. More...
      NATS_EXTERN int64_t stanMsg_GetTimestamp (const stanMsg *msg) - Returns the message's timestamp. More...
    + Returns the message's timestamp. More...
      NATS_EXTERN bool stanMsg_IsRedelivered (const stanMsg *msg) - Returns the message's redelivered flag. More...
    + Returns the message's redelivered flag. More...
      NATS_EXTERN const char * stanMsg_GetData (const stanMsg *msg) - Returns the message payload. More...
    + Returns the message payload. More...
      NATS_EXTERN int stanMsg_GetDataLength (const stanMsg *msg) - Returns the message length. More...
    + Returns the message length. More...
      NATS_EXTERN void stanMsg_Destroy (stanMsg *msg) - Destroys the message object. More...
    + Destroys the message object. More...
     

    Detailed Description

    NATS Streaming Message.

    Function Documentation

    - + +

    ◆ stanMsg_GetSequence()

    +
    @@ -147,14 +132,16 @@

    Function Documentation

    Returns the message's sequence number (as assigned by the cluster).

    Parameters
    - +
    msgthe pointer to the stanMsg object.
    msgthe pointer to the stanMsg object.
    - + +

    ◆ stanMsg_GetTimestamp()

    +
    @@ -170,14 +157,16 @@

    Function Documentation

    Returns the message's timestamp (as assigned by the cluster).

    Parameters
    - +
    msgthe pointer to the stanMsg object.
    msgthe pointer to the stanMsg object.
    - + +

    ◆ stanMsg_IsRedelivered()

    +
    @@ -193,14 +182,16 @@

    Function Documentation

    Returns the message's redelivered flag. This can help detect if this message is a possible duplicate (due to redelivery and at-least-once semantic).

    Parameters
    - +
    msgthe pointer to the stanMsg object.
    msgthe pointer to the stanMsg object.
    - + +

    ◆ stanMsg_GetData()

    +
    @@ -214,18 +205,20 @@

    Function Documentation

    Returns the message payload, possibly NULL.

    -

    Note that although the data sent and received from the server is not NULL terminated, the NATS C Client does add a NULL byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call stanMsg_GetData() without having to copy the returned data to a buffer to add the NULL byte at the end.

    +

    Note that although the data sent and received from the server is not NULL terminated, the NATS C Client does add a NULL byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call stanMsg_GetData() without having to copy the returned data to a buffer to add the NULL byte at the end.

    Warning
    The string belongs to the message and must not be freed. Copy it if needed.
    Parameters
    - +
    msgthe pointer to the stanMsg object.
    msgthe pointer to the stanMsg object.
    - + +

    ◆ stanMsg_GetDataLength()

    +
    @@ -241,14 +234,16 @@

    Function Documentation

    Returns the message's payload length, possibly 0.

    Parameters
    - +
    msgthe pointer to the stanMsg object.
    msgthe pointer to the stanMsg object.
    - + +

    ◆ stanMsg_Destroy()

    +
    @@ -264,7 +259,7 @@

    Function Documentation

    Destroys the message, freeing memory.

    Parameters
    - +
    msgthe pointer to the stanMsg object to destroy.
    msgthe pointer to the stanMsg object to destroy.
    diff --git a/doc/html/group__stan_sub_group.html b/doc/html/group__stan_sub_group.html index b1e0622dc..87b1f47d1 100644 --- a/doc/html/group__stan_sub_group.html +++ b/doc/html/group__stan_sub_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Streaming Subscription @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,25 +93,27 @@

    Functions

    NATS_EXTERN natsStatus stanSubscription_SetOnCompleteCB (stanSubscription *sub, natsOnCompleteCB cb, void *closure) - Sets a completion callback. More...
    + Sets a completion callback. More...
      NATS_EXTERN natsStatus stanSubscription_AckMsg (stanSubscription *sub, stanMsg *msg) - Acknowledge a message. More...
    + Acknowledge a message. More...
      NATS_EXTERN natsStatus stanSubscription_Unsubscribe (stanSubscription *sub) - Permanently remove a subscription. More...
    + Permanently remove a subscription. More...
      NATS_EXTERN natsStatus stanSubscription_Close (stanSubscription *sub) - Closes the subscription. More...
    + Closes the subscription. More...
      NATS_EXTERN void stanSubscription_Destroy (stanSubscription *sub) - Destroys the subscription. More...
    + Destroys the subscription. More...
     

    Detailed Description

    NATS Streaming Subscriptions.

    Function Documentation

    - + +

    ◆ stanSubscription_SetOnCompleteCB()

    +
    @@ -157,14 +142,14 @@

    Function Documentation

    -

    In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (or unsubscribed) (stanSubscription_Close, stanSubscription_Unsubscribe), the subscription should be closed from the message handler itslef.

    +

    In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (or unsubscribed) (stanSubscription_Close, stanSubscription_Unsubscribe), the subscription should be closed from the message handler itslef.

    If the application closes the subscription from a different thread and immediately frees resources needed in the message handler, there is a risk of a crash since the subscription's message handler may still be invoked one last time or already in the process of executing.

    To address this, the user can set a callback that will be invoked after the subscription is closed and the message handler has returned.

    Note
    You don't need to call this function if you are not freeing resources needed in the message handler or if you always close the subscription from the message handler itself.
    -
    See also
    natsOnCompleteCB
    +
    See also
    natsOnCompleteCB
    Parameters
    - +
    subthe pointer to the stanSubscription object
    subthe pointer to the stanSubscription object
    cbthe callback to invoke when the last message of a closed subscription has been dispatched
    closurethe pointer to a user defined object (possibly NULL) that will be passed to the callback
    @@ -173,7 +158,9 @@

    Function Documentation

    - + +

    ◆ stanSubscription_AckMsg()

    +
    @@ -196,10 +183,10 @@

    Function Documentation

    -

    If the subscription is created with manual acknowledgment mode (see stanSubOptions_SetManualAckMode) then it is the user responsibility to acknowledge received messages when appropriate.

    +

    If the subscription is created with manual acknowledgment mode (see stanSubOptions_SetManualAckMode) then it is the user responsibility to acknowledge received messages when appropriate.

    Parameters
    - +
    subthe pointer to the stanSubscription object.
    subthe pointer to the stanSubscription object.
    msgthe message to acknowledge.
    @@ -207,7 +194,9 @@

    Function Documentation

    - + +

    ◆ stanSubscription_Unsubscribe()

    +
    @@ -221,19 +210,21 @@

    Function Documentation

    Removes interest on the channel. The subscription may still have a callback in progress, in that case, the subscription will still be valid until the callback returns.

    -

    For non-durable subscriptions, stanSubscription_Unsubscribe and stanSubscription_Close have the same effect.

    -

    For durable subscriptions, calling this function causes the server to remove the durable subscription (instead of simply suspending it). It means that once this call is made, calling stanConnection_Subscribe() with the same durable name creates a brand new durable subscription, instead of simply resuming delivery.

    -
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    +

    For non-durable subscriptions, stanSubscription_Unsubscribe and stanSubscription_Close have the same effect.

    +

    For durable subscriptions, calling this function causes the server to remove the durable subscription (instead of simply suspending it). It means that once this call is made, calling stanConnection_Subscribe() with the same durable name creates a brand new durable subscription, instead of simply resuming delivery.

    +
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    Parameters
    - +
    subthe pointer to the stanSubscription object.
    subthe pointer to the stanSubscription object.
    - + +

    ◆ stanSubscription_Close()

    +
    @@ -246,18 +237,20 @@

    Function Documentation

    -

    Similar to stanSubscription_Unsubscribe() except that durable interest is not removed in the server. The durable subscription can therefore be resumed.

    -
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    +

    Similar to stanSubscription_Unsubscribe() except that durable interest is not removed in the server. The durable subscription can therefore be resumed.

    +
    Warning
    See warning about connecting to a NATS Server v2.2.0+ in stanConnection_Connect().
    Parameters
    - +
    subthe pointer to the stanSubscription object.
    subthe pointer to the stanSubscription object.
    - + +

    ◆ stanSubscription_Destroy()

    +
    @@ -273,7 +266,7 @@

    Function Documentation

    Destroys the subscription object, freeing up memory. If not already done, this call will removes interest on the subject.

    Parameters
    - +
    subthe pointer to the stanSubscription object to destroy.
    subthe pointer to the stanSubscription object to destroy.
    diff --git a/doc/html/group__stan_sub_opts_group.html b/doc/html/group__stan_sub_opts_group.html index 7b9db9743..72f2c7375 100644 --- a/doc/html/group__stan_sub_opts_group.html +++ b/doc/html/group__stan_sub_opts_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Streaming Subscription Options @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,43 +93,45 @@

    Functions

    NATS_EXTERN natsStatus stanSubOptions_Create (stanSubOptions **newOpts) - Creates a stanSubOptions object. More...
    + Creates a stanSubOptions object. More...
      NATS_EXTERN natsStatus stanSubOptions_SetDurableName (stanSubOptions *opts, const char *durableName) - Sets the Durable Name for this subscription. More...
    + Sets the Durable Name for this subscription. More...
      NATS_EXTERN natsStatus stanSubOptions_SetAckWait (stanSubOptions *opts, int64_t wait) - Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages. More...
    + Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages. More...
      NATS_EXTERN natsStatus stanSubOptions_SetMaxInflight (stanSubOptions *opts, int maxInflight) - Sets the the maximum number of messages the cluster will send without an ACK. More...
    + Sets the the maximum number of messages the cluster will send without an ACK. More...
      NATS_EXTERN natsStatus stanSubOptions_StartAtSequence (stanSubOptions *opts, uint64_t seq) - Sets the desired start position based on the given sequence number. More...
    + Sets the desired start position based on the given sequence number. More...
      NATS_EXTERN natsStatus stanSubOptions_StartAtTime (stanSubOptions *opts, int64_t time) - Sets the desired start position based on the given time. More...
    + Sets the desired start position based on the given time. More...
      NATS_EXTERN natsStatus stanSubOptions_StartAtTimeDelta (stanSubOptions *opts, int64_t delta) - Sets the desired start position based on the given delta. More...
    + Sets the desired start position based on the given delta. More...
      NATS_EXTERN natsStatus stanSubOptions_StartWithLastReceived (stanSubOptions *opts) - The subscription should start with the last message in the channel. More...
    + The subscription should start with the last message in the channel. More...
      NATS_EXTERN natsStatus stanSubOptions_DeliverAllAvailable (stanSubOptions *opts) - The subscription should start with the first message in the channel. More...
    + The subscription should start with the first message in the channel. More...
      NATS_EXTERN natsStatus stanSubOptions_SetManualAckMode (stanSubOptions *opts, bool manual) - Sets the subscription's acknowledgment mode. More...
    + Sets the subscription's acknowledgment mode. More...
      NATS_EXTERN void stanSubOptions_Destroy (stanSubOptions *opts) - Destroys a stanSubOptions object. More...
    + Destroys a stanSubOptions object. More...
     

    Detailed Description

    NATS Streaming Subscription Options.

    Function Documentation

    - + +

    ◆ stanSubOptions_Create()

    +
    @@ -159,25 +144,27 @@

    Function Documentation

    -

    Creates a stanSubOptions object. This object is used when one wants to set specific options prior to create a subscription.

    -

    After making the appropriate stanSubOptions_SetXXX() calls, this object is passed to the stanConnection_Subscribe() or stanConnection_QueueSubscribe() call, which will clone this object. It means that modifications to the options object will not affect the created subscription.

    +

    Creates a stanSubOptions object. This object is used when one wants to set specific options prior to create a subscription.

    +

    After making the appropriate stanSubOptions_SetXXX() calls, this object is passed to the stanConnection_Subscribe() or stanConnection_QueueSubscribe() call, which will clone this object. It means that modifications to the options object will not affect the created subscription.

    The default options set in this call are: ackWait: 30000 milliseconds (30 seconds) maxIinflight: 1024 start position: new only

    Note
    The object needs to be destroyed when no longer needed.
    -
    See also
    stanConnection_Subscribe()
    +
    See also
    stanConnection_Subscribe()
    -stanConnection_QueueSubscribe()
    +stanConnection_QueueSubscribe()
    -stanSubOptions_Destroy()
    +stanSubOptions_Destroy()
    Parameters
    - +
    newOptsthe location where store the pointer to the newly created stanSubOptions object.
    newOptsthe location where store the pointer to the newly created stanSubOptions object.
    - + +

    ◆ stanSubOptions_SetDurableName()

    +
    @@ -205,7 +192,7 @@

    Function Documentation

    Note
    Durable names should be alphanumeric and not contain the character :.
    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    durableNamethe string representing the name of the durable subscription.
    @@ -213,7 +200,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_SetAckWait()

    +
    @@ -241,7 +230,7 @@

    Function Documentation

    If the server does not receive an acknowledgment from the subscription for a delivered message after this amount of time, the server will re-deliver the unacknowledged message.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    waithow long the server will wait for an acknowledgment from the subscription.
    @@ -249,7 +238,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_SetMaxInflight()

    +
    @@ -276,7 +267,7 @@

    Function Documentation

    If a subscription receives messages but does not acknowledge them, the server will stop sending new messages when it reaches this number. Unacknowledged messages are re-delivered regardless of that setting.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    maxInflightthe maximum number of messages the subscription will receive without sending back ACKs.
    @@ -284,7 +275,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_StartAtSequence()

    +
    @@ -312,7 +305,7 @@

    Function Documentation

    Conversely, if the given sequence is higher than the currently last sequence number, the subscription will receive only new published messages.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    seqthe starting sequence.
    @@ -320,7 +313,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_StartAtTime()

    +
    @@ -343,11 +338,11 @@

    Function Documentation

    -

    When the subscription is created, the server will send messages starting with the message which timestamp is at least the given time. The time is expressed in number of milliseconds since the EPOCH, as given by nats_Now() for instance.

    +

    When the subscription is created, the server will send messages starting with the message which timestamp is at least the given time. The time is expressed in number of milliseconds since the EPOCH, as given by nats_Now() for instance.

    If the time is in the past and the most recent message's timestamp is older than the given time, or if the time is in the future, the subscription will receive only new messages.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    timethe start time, expressed in milliseconds since the EPOCH.
    @@ -355,7 +350,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_StartAtTimeDelta()

    +
    @@ -382,7 +379,7 @@

    Function Documentation

    The delta is expressed in milliseconds.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    deltahe historical time delta (from now) from which to start receiving messages.
    @@ -390,7 +387,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_StartWithLastReceived()

    +
    @@ -406,14 +405,16 @@

    Function Documentation

    When the subscription is created, the server will start sending messages starting with the last message currently in the channel message's log. The subscription will then receive any new published message.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    - + +

    ◆ stanSubOptions_DeliverAllAvailable()

    +
    @@ -429,14 +430,16 @@

    Function Documentation

    When the subscription is created, the server will start sending messages starting with the first message currently in the channel message's log.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    - + +

    ◆ stanSubOptions_SetManualAckMode()

    +
    @@ -459,12 +462,12 @@

    Function Documentation

    -

    By default, a subscription will automatically send a message acknowledgment after the stanMsgHandler callback returns.

    -

    In order to control when the acknowledgment is sent, set the acknowledgment mode to manual and call stanSubscription_AckMsg().

    -
    See also
    stanSubscription_AckMsg()
    +

    By default, a subscription will automatically send a message acknowledgment after the stanMsgHandler callback returns.

    +

    In order to control when the acknowledgment is sent, set the acknowledgment mode to manual and call stanSubscription_AckMsg().

    +
    See also
    stanSubscription_AckMsg()
    Parameters
    - +
    optsthe pointer to the stanSubOptions object.
    optsthe pointer to the stanSubOptions object.
    manuala boolean indicating if the subscription should auto-acknowledge or if the user will.
    @@ -472,7 +475,9 @@

    Function Documentation

    - + +

    ◆ stanSubOptions_Destroy()

    +
    @@ -485,10 +490,10 @@

    Function Documentation

    -

    Destroys the stanSubOptions object, freeing used memory. See the note in the stanSubOptions_Create() call.

    +

    Destroys the stanSubOptions object, freeing used memory. See the note in the stanSubOptions_Create() call.

    Parameters
    - +
    optsthe pointer to the stanSubOptions object to destroy.
    optsthe pointer to the stanSubOptions object to destroy.
    diff --git a/doc/html/group__stats_group.html b/doc/html/group__stats_group.html index b9b2082f3..5071cbb34 100644 --- a/doc/html/group__stats_group.html +++ b/doc/html/group__stats_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Statistics @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,19 +93,21 @@

    Functions

    NATS_EXTERN natsStatus natsStatistics_Create (natsStatistics **newStats) - Creates a natsStatistics object. More...
    + Creates a natsStatistics object. More...
      NATS_EXTERN natsStatus natsStatistics_GetCounts (const natsStatistics *stats, uint64_t *inMsgs, uint64_t *inBytes, uint64_t *outMsgs, uint64_t *outBytes, uint64_t *reconnects) - Extracts the various statistics values. More...
    + Extracts the various statistics values. More...
      NATS_EXTERN void natsStatistics_Destroy (natsStatistics *stats) - Destroys the natsStatistics object. More...
    + Destroys the natsStatistics object. More...
     

    Detailed Description

    Statistics Functions.

    Function Documentation

    - + +

    ◆ natsStatistics_Create()

    +
    @@ -135,19 +120,21 @@

    Function Documentation

    -

    Creates a statistics object that can be passed to natsConnection_GetStats().

    +

    Creates a statistics object that can be passed to natsConnection_GetStats().

    Note
    The object needs to be destroyed when no longer needed.
    -
    See also
    natsStatistics_Destroy()
    +
    See also
    natsStatistics_Destroy()
    Parameters
    - +
    newStatsthe location where to store the pointer to the newly created natsStatistics object.
    newStatsthe location where to store the pointer to the newly created natsStatistics object.
    - + +

    ◆ natsStatistics_GetCounts()

    +
    @@ -196,10 +183,10 @@

    Function Documentation

    Gets the counts out of the statistics object.

    Note
    You can pass NULL to any of the count your are not interested in getting.
    -
    See also
    natsConnection_GetStats()
    +
    See also
    natsConnection_GetStats()
    Parameters
    - + @@ -211,7 +198,9 @@

    Function Documentation

    - + +

    ◆ natsStatistics_Destroy()

    +
    statsthe pointer to the natsStatistics object to get the values from.
    statsthe pointer to the natsStatistics object to get the values from.
    inMsgstotal number of inbound messages.
    inBytestotal size (in bytes) of inbound messages.
    outMsgstotal number of outbound messages.
    @@ -227,7 +216,7 @@

    Function Documentation

    Destroys the statistics object, freeing up memory.

    Parameters
    - +
    statsthe pointer to the natsStatistics object to destroy.
    statsthe pointer to the natsStatistics object to destroy.
    diff --git a/doc/html/group__status_group.html b/doc/html/group__status_group.html index 395949b2b..e94d7c736 100644 --- a/doc/html/group__status_group.html +++ b/doc/html/group__status_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Status @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,13 +93,15 @@

    Functions

    NATS_EXTERN const char * natsStatus_GetText (natsStatus s) - Get the text corresponding to a natsStatus. More...
    + Get the text corresponding to a natsStatus. More...
     

    Detailed Description

    -

    Functions related to natsStatus.

    +

    Functions related to natsStatus.

    Function Documentation

    - + +

    ◆ natsStatus_GetText()

    +
    diff --git a/doc/html/group__sub_group.html b/doc/html/group__sub_group.html index c07539602..fd176fc2c 100644 --- a/doc/html/group__sub_group.html +++ b/doc/html/group__sub_group.html @@ -4,7 +4,7 @@ - +NATS C Client with Streaming support: Subscription @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@ @@ -42,34 +35,22 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    - + - + + + +
    @@ -110,70 +93,72 @@

    Functions

    NATS_EXTERN natsStatus natsSubscription_NoDeliveryDelay (natsSubscription *sub) - Enables the No Delivery Delay mode. More...
    + Enables the No Delivery Delay mode. More...
      NATS_EXTERN natsStatus natsSubscription_NextMsg (natsMsg **nextMsg, natsSubscription *sub, int64_t timeout) - Returns the next available message. More...
    + Returns the next available message. More...
      NATS_EXTERN natsStatus natsSubscription_Unsubscribe (natsSubscription *sub) - Unsubscribes. More...
    + Unsubscribes. More...
      NATS_EXTERN natsStatus natsSubscription_AutoUnsubscribe (natsSubscription *sub, int max) - Auto-Unsubscribes. More...
    + Auto-Unsubscribes. More...
      NATS_EXTERN natsStatus natsSubscription_QueuedMsgs (natsSubscription *sub, uint64_t *queuedMsgs) - Gets the number of pending messages. More...
    + Gets the number of pending messages. More...
      NATS_EXTERN natsStatus natsSubscription_SetPendingLimits (natsSubscription *sub, int msgLimit, int bytesLimit) - Sets the limit for pending messages and bytes. More...
    + Sets the limit for pending messages and bytes. More...
      NATS_EXTERN natsStatus natsSubscription_GetPendingLimits (natsSubscription *sub, int *msgLimit, int *bytesLimit) - Returns the current limit for pending messages and bytes. More...
    + Returns the current limit for pending messages and bytes. More...
      NATS_EXTERN natsStatus natsSubscription_GetPending (natsSubscription *sub, int *msgs, int *bytes) - Returns the number of pending messages and bytes. More...
    + Returns the number of pending messages and bytes. More...
      NATS_EXTERN natsStatus natsSubscription_GetDelivered (natsSubscription *sub, int64_t *msgs) - Returns the number of delivered messages. More...
    + Returns the number of delivered messages. More...
      NATS_EXTERN natsStatus natsSubscription_GetDropped (natsSubscription *sub, int64_t *msgs) - Returns the number of dropped messages. More...
    + Returns the number of dropped messages. More...
      NATS_EXTERN natsStatus natsSubscription_GetMaxPending (natsSubscription *sub, int *msgs, int *bytes) - Returns the maximum number of pending messages and bytes. More...
    + Returns the maximum number of pending messages and bytes. More...
      NATS_EXTERN natsStatus natsSubscription_ClearMaxPending (natsSubscription *sub) - Clears the statistics regarding the maximum pending values. More...
    + Clears the statistics regarding the maximum pending values. More...
      NATS_EXTERN natsStatus natsSubscription_GetStats (natsSubscription *sub, int *pendingMsgs, int *pendingBytes, int *maxPendingMsgs, int *maxPendingBytes, int64_t *deliveredMsgs, int64_t *droppedMsgs) - Get various statistics from this subscription. More...
    + Get various statistics from this subscription. More...
      NATS_EXTERN bool natsSubscription_IsValid (natsSubscription *sub) - Checks the validity of the subscription. More...
    + Checks the validity of the subscription. More...
      NATS_EXTERN natsStatus natsSubscription_Drain (natsSubscription *sub) - Drains the subscription with a default timeout. More...
    + Drains the subscription with a default timeout. More...
      NATS_EXTERN natsStatus natsSubscription_DrainTimeout (natsSubscription *sub, int64_t timeout) - Drains the subscription with the specified timeout. More...
    + Drains the subscription with the specified timeout. More...
      NATS_EXTERN natsStatus natsSubscription_WaitForDrainCompletion (natsSubscription *sub, int64_t timeout) - Blocks until the drain operation completes. More...
    + Blocks until the drain operation completes. More...
      NATS_EXTERN natsStatus natsSubscription_DrainCompletionStatus (natsSubscription *sub) - Returns the status of the drain after completion. More...
    + Returns the status of the drain after completion. More...
      NATS_EXTERN natsStatus natsSubscription_SetOnCompleteCB (natsSubscription *sub, natsOnCompleteCB cb, void *closure) - Sets a completion callback. More...
    + Sets a completion callback. More...
      NATS_EXTERN void natsSubscription_Destroy (natsSubscription *sub) - Destroys the subscription. More...
    + Destroys the subscription. More...
     

    Detailed Description

    NATS Subscriptions.

    Function Documentation

    - + +

    ◆ natsSubscription_NoDeliveryDelay()

    +
    @@ -189,7 +174,7 @@

    Function Documentation

    By default, messages that arrive are not immediately delivered. This generally improves performance. However, in case of request-reply, this delay has a negative impact. In such case, call this function to have the subscriber be notified immediately each time a message arrives.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    @@ -197,7 +182,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_NextMsg()

    +
    @@ -227,12 +214,12 @@

    Function Documentation

    Return the next message available to a synchronous subscriber or block until one is available. A timeout (expressed in milliseconds) can be used to return when no message has been delivered. If the value is zero, then this call will not wait and return the next message that was pending in the client, and NATS_TIMEOUT otherwise.

    -
    Note
    If you create a subscription for a subject used as the reply subject of a natsConnection_PublishRequest call (or any of its variant), and there are no responders for the request subject, NATS Servers v2.2.0+ will return an empty message with a header "Status" and value "503". The library v2.2.0 until v2.4.1 would return this message to the user, which was wrong.
    - The library now returns no message and NATS_NO_RESPONDERS status.
    +
    Note
    If you create a subscription for a subject used as the reply subject of a natsConnection_PublishRequest call (or any of its variant), and there are no responders for the request subject, NATS Servers v2.2.0+ will return an empty message with a header "Status" and value "503". The library v2.2.0 until v2.4.1 would return this message to the user, which was wrong.
    + The library now returns no message and NATS_NO_RESPONDERS status.
    Parameters
    - +
    nextMsgthe location where to store the pointer to the next available message.
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    timeouttime, in milliseconds, after which this call will return NATS_TIMEOUT if no message is available.
    @@ -240,7 +227,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_Unsubscribe()

    +
    @@ -256,14 +245,16 @@

    Function Documentation

    Removes interest on the subject. Asynchronous subscription may still have a callback in progress, in that case, the subscription will still be valid until the callback returns.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    - + +

    ◆ natsSubscription_AutoUnsubscribe()

    +
    @@ -286,10 +277,10 @@

    Function Documentation

    -

    This call issues an automatic natsSubscription_Unsubscribe that is processed by the server when 'max' messages have been received. This can be useful when sending a request to an unknown number of subscribers.

    +

    This call issues an automatic natsSubscription_Unsubscribe that is processed by the server when 'max' messages have been received. This can be useful when sending a request to an unknown number of subscribers.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    maxthe maximum number of message you want this subscription to receive.
    @@ -297,7 +288,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_QueuedMsgs()

    +
    @@ -321,10 +314,10 @@

    Function Documentation

    Returns the number of queued messages in the client for this subscription.

    -
    Deprecated:
    Use natsSubscription_GetPending instead.
    +
    Deprecated:
    Use natsSubscription_GetPending instead.
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    queuedMsgsthe location where to store the number of queued messages.
    @@ -332,7 +325,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_SetPendingLimits()

    +
    @@ -361,15 +356,15 @@

    Function Documentation

    -

    Specifies the maximum number and size of incoming messages that can be buffered in the library for this subscription, before new incoming messages are dropped and NATS_SLOW_CONSUMER status is reported to the natsErrHandler callback (if one has been set).

    -

    If no limit is set at the subscription level, the limit set by natsOptions_SetMaxPendingMsgs before creating the connection will be used.

    +

    Specifies the maximum number and size of incoming messages that can be buffered in the library for this subscription, before new incoming messages are dropped and NATS_SLOW_CONSUMER status is reported to the natsErrHandler callback (if one has been set).

    +

    If no limit is set at the subscription level, the limit set by natsOptions_SetMaxPendingMsgs before creating the connection will be used.

    Note
    If no option is set, there is still a default of 65536 messages and 65536 * 1024 bytes.
    -
    See also
    natsOptions_SetMaxPendingMsgs
    +
    See also
    natsOptions_SetMaxPendingMsgs
    -natsSubscription_GetPendingLimits
    +natsSubscription_GetPendingLimits
    Parameters
    - +
    subhe pointer to the natsSubscription object.
    subhe pointer to the natsSubscription object.
    msgLimitthe limit in number of messages that the subscription can hold.
    bytesLimitthe limit in bytes that the subscription can hold.
    @@ -378,7 +373,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_GetPendingLimits()

    +
    @@ -407,14 +404,14 @@

    Function Documentation

    -

    Regardless if limits have been explicitly set with natsSubscription_SetPendingLimits, this call will store in the provided memory locations, the limits set for this subscription.

    +

    Regardless if limits have been explicitly set with natsSubscription_SetPendingLimits, this call will store in the provided memory locations, the limits set for this subscription.

    Note
    It is possible for msgLimit and/or bytesLimits to be NULL, in which case the corresponding value is obviously not stored, but the function will not return an error.
    -
    See also
    natsOptions_SetMaxPendingMsgs
    +
    See also
    natsOptions_SetMaxPendingMsgs
    -natsSubscription_SetPendingLimits
    +natsSubscription_SetPendingLimits
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    msgLimitif not NULL, the memory location where to store the maximum number of pending messages for this subscription.
    bytesLimitif not NULL, the memory location where to store the maximum size of pending messages for this subscription.
    @@ -423,7 +420,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_GetPending()

    +
    @@ -456,7 +455,7 @@

    Function Documentation

    Note
    It is possible for msgs and bytes to be NULL, in which case the corresponding values are obviously not stored, but the function will not return an error.
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    msgsif not NULL, the memory location where to store the number of pending messages.
    bytesif not NULL, the memory location where to store the total size of pending messages.
    @@ -465,7 +464,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_GetDelivered()

    +
    @@ -491,7 +492,7 @@

    Function Documentation

    Returns the number of delivered messages for this subscription.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    msgsthe memory location where to store the number of delivered messages.
    @@ -499,7 +500,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_GetDropped()

    +
    @@ -524,12 +527,12 @@

    Function Documentation

    Returns the number of known dropped messages for this subscription. This happens when a consumer is not keeping up and the library starts to drop messages when the maximum number (and/or size) of pending messages has been reached.

    Note
    If the server declares the connection a slow consumer, this number may not be valid.
    -
    See also
    natsOptions_SetMaxPendingMsgs
    +
    See also
    natsOptions_SetMaxPendingMsgs
    -natsSubscription_SetPendingLimits
    +natsSubscription_SetPendingLimits
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    msgsthe memory location where to store the number of dropped messages.
    @@ -537,7 +540,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_GetMaxPending()

    +
    @@ -570,7 +575,7 @@

    Function Documentation

    Note
    msgs and/or bytes can be NULL.
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    msgsif not NULL, the memory location where to store the maximum number of pending messages seen so far.
    bytesif not NULL, the memory location where to store the maximum number of bytes pending seen so far.
    @@ -579,7 +584,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_ClearMaxPending()

    +
    @@ -595,14 +602,16 @@

    Function Documentation

    Clears the statistics regarding the maximum pending values.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    - + +

    ◆ natsSubscription_GetStats()

    +
    @@ -657,16 +666,16 @@

    Function Documentation

    This is a convenient function to get several subscription's statistics in one call.

    Note
    Any or all of the statistics pointers can be NULL.
    -
    See also
    natsSubscription_GetPending
    +
    See also
    natsSubscription_GetPending
    -natsSubscription_GetMaxPending
    +natsSubscription_GetMaxPending
    -natsSubscription_GetDelivered
    +natsSubscription_GetDelivered
    -natsSubscription_GetDropped
    +natsSubscription_GetDropped
    Parameters
    - + @@ -679,7 +688,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_IsValid()

    +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    pendingMsgsif not NULL, memory location where to store the number of pending messages.
    pendingBytesif not NULL, memory location where to store the total size of pending messages.
    maxPendingMsgsif not NULL, memory location where to store the maximum number of pending messages seen so far.
    @@ -695,14 +706,16 @@

    Function Documentation

    Returns a boolean indicating whether the subscription is still active. This will return false if the subscription has already been closed, or auto unsubscribed.

    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    - + +

    ◆ natsSubscription_Drain()

    +
    @@ -716,23 +729,25 @@

    Function Documentation

    Drain will remove interest but continue to invoke callbacks until all messages have been processed.

    -

    This call uses a default drain timeout of 30 seconds. See natsSubscription_DrainTimeout for details on behavior when timeout elapses.

    -
    Warning
    This function does not block waiting for the operation to complete. To synchronously wait, see natsSubscription_WaitForDrainCompletion
    -
    See also
    natsSubscription_DrainTimeout
    +

    This call uses a default drain timeout of 30 seconds. See natsSubscription_DrainTimeout for details on behavior when timeout elapses.

    +
    Warning
    This function does not block waiting for the operation to complete. To synchronously wait, see natsSubscription_WaitForDrainCompletion
    +
    See also
    natsSubscription_DrainTimeout
    -natsSubscription_WaitForDrainCompletion
    +natsSubscription_WaitForDrainCompletion
    -natsSubscription_DrainCompletionStatus
    +natsSubscription_DrainCompletionStatus
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    - + +

    ◆ natsSubscription_DrainTimeout()

    +
    @@ -759,19 +774,19 @@

    Function Documentation

    The timeout is expressed in milliseconds. Zero or negative value means that the call will not timeout, but see below for more details.

    When this call returns, the UNSUBSCRIBE protocol for this subscription has been enqueued to the outgoing connection buffer, but not sent to the server, ensuring that this call does not block.

    The library then asynchronously ensures that this protocol is sent and waits for a confirmation from the server. After that, it is guaranteed that no new message for this subscription will be received and the library can proceed with the rest of the draining.

    -

    However, should the "flush" of the protocol fail, the library will ensure that no new message is added to the subscription (in the event the server did not receive the UNSUBSCRIBE protocol and still attempts to deliver messages), and will proceed with the draining of the pending messages. Users can check the status of the draining after it has completed by calling natsSubscription_DrainCompletionStatus.

    +

    However, should the "flush" of the protocol fail, the library will ensure that no new message is added to the subscription (in the event the server did not receive the UNSUBSCRIBE protocol and still attempts to deliver messages), and will proceed with the draining of the pending messages. Users can check the status of the draining after it has completed by calling natsSubscription_DrainCompletionStatus.

    If no timeout is specified (that is, value is zero or negative), a timeout will be used for the "flush" of the protocol. Again, even in case of failure, the draining will proceed.

    If a timeout is specified, the complete process: "flush" of the protocol and draining of messages, must happen before the timeout elapses otherwise the subscription will be forcibly closed, and not all message callbacks may be invoked.

    -

    Regardless of the presence of a timeout or not, should the subscription or connection be closed while draining occurs, the draining process will stop. The natsSubscription_WaitForDrainCompletion call will not report an error. To know if an error occurred, the user can call natsSubscription_DrainCompletionStatus after ensuring that the drain has completed.

    -
    Warning
    This function does not block waiting for the operation to complete. To synchronously wait, see natsSubscription_WaitForDrainCompletion
    -
    See also
    natsSubscription_Drain
    +

    Regardless of the presence of a timeout or not, should the subscription or connection be closed while draining occurs, the draining process will stop. The natsSubscription_WaitForDrainCompletion call will not report an error. To know if an error occurred, the user can call natsSubscription_DrainCompletionStatus after ensuring that the drain has completed.

    +
    Warning
    This function does not block waiting for the operation to complete. To synchronously wait, see natsSubscription_WaitForDrainCompletion
    +
    See also
    natsSubscription_Drain
    -natsSubscription_WaitForDrainCompletion
    +natsSubscription_WaitForDrainCompletion
    -natsSubscription_DrainCompletionStatus
    +natsSubscription_DrainCompletionStatus
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    timeouthow long to wait for the operation to complete, expressed in milliseconds. If the timeout elapses the subscription will be closed.
    @@ -779,7 +794,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_WaitForDrainCompletion()

    +
    @@ -805,14 +822,14 @@

    Function Documentation

    This function blocks until the subscription is fully drained. Returns no error if the subscription is drained or closed, otherwise returns the error if the subscription was not in drained mode (NATS_ILLEGAL_STATE) or if this subscription was not drained or closed prior to the specified timeout (NATS_TIMEOUT).

    The timeout is expressed in milliseconds. Zero or negative value means that the call will not timeout.

    Note that if this call times-out, it does not mean that the drain stops. The drain will continue until its own timeout elapses.

    -
    See also
    natsSubscription_Drain
    +
    See also
    natsSubscription_Drain
    -natsSubscription_DrainTimeout
    +natsSubscription_DrainTimeout
    -natsSubscription_DrainCompletionStatus
    +natsSubscription_DrainCompletionStatus
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    timeouthow long to wait for the operation to complete, expressed in milliseconds.
    @@ -820,7 +837,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_DrainCompletionStatus()

    +
    @@ -835,26 +854,28 @@

    Function Documentation

    Once the drain has completed, users can use this function to know if the drain completed successfully or not.

    Possible return values (the list is not exhaustive):

    -

    NATS_OK the library sent the UNSUBSCRIBE protocol and finished processing all messages that were pending.
    - NATS_ILLEGAL_STATE this call was made for a subscription that had not started draining or the draining is still in progress.
    - NATS_INVALID_SUBSCRIPTION the subscription was closed while draining, which means that some messages may not have been processed.
    +

    NATS_OK the library sent the UNSUBSCRIBE protocol and finished processing all messages that were pending.
    + NATS_ILLEGAL_STATE this call was made for a subscription that had not started draining or the draining is still in progress.
    + NATS_INVALID_SUBSCRIPTION the subscription was closed while draining, which means that some messages may not have been processed.
    NATS_CONNECTION_CLOSED the connection was closed while draining, which means that some messages may not have been processed.

    -
    Note
    This call does not wait for the drain completion (see natsSubscription_WaitForDrainCompletion for that).
    -
    See also
    natsSubscription_Drain
    +
    Note
    This call does not wait for the drain completion (see natsSubscription_WaitForDrainCompletion for that).
    +
    See also
    natsSubscription_Drain
    -natsSubscription_DrainTimeout
    +natsSubscription_DrainTimeout
    -natsSubscription_WaitForDrainCompletion
    +natsSubscription_WaitForDrainCompletion
    Parameters
    - +
    subthe pointer to the natsSubscription object.
    subthe pointer to the natsSubscription object.
    - + +

    ◆ natsSubscription_SetOnCompleteCB()

    +
    @@ -883,17 +904,17 @@

    Function Documentation

    -

    In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (natsSubscription_Unsubscribe), the subscription should be closed from the message handler itslef.

    +

    In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (natsSubscription_Unsubscribe), the subscription should be closed from the message handler itslef.

    If the application closes the subscription from a different thread and immediately frees resources needed in the message handler, there is a risk of a crash since the subscription's message handler may still be invoked one last time or already in the process of executing.

    To address this, the user can set a callback that will be invoked after the subscription is closed and the message handler has returned. This applies to asynchronous subscriptions using their own dispatcher or using the library's delivery thread pool.

    Note
    You don't need to call this function if you are not freeing resources needed in the message handler or if you always close the subscription from the message handler itself.
    -If you plan on calling this function, you should do so before calling natsSubscription_AutoUnsubscribe, since there is a risk that the subscription be removed as soon as natsSubscription_AutoUnsubscribe returns.
    +If you plan on calling this function, you should do so before calling natsSubscription_AutoUnsubscribe, since there is a risk that the subscription be removed as soon as natsSubscription_AutoUnsubscribe returns.

    Calling this function on a synchronous or closed subscription will return NATS_INVALID_SUBSCRIPTION.

    -
    See also
    natsOnCompleteCB
    +
    See also
    natsOnCompleteCB
    Parameters
    - +
    subthe pointer to the natsSubscription object
    subthe pointer to the natsSubscription object
    cbthe callback to invoke when the last message of a closed subscription has been dispatched
    closurethe pointer to a user defined object (possibly NULL) that will be passed to the callback
    @@ -902,7 +923,9 @@

    Function Documentation

    - + +

    ◆ natsSubscription_Destroy()

    +
    @@ -918,7 +941,7 @@

    Function Documentation

    Destroys the subscription object, freeing up memory. If not already done, this call will removes interest on the subject.

    Parameters
    - +
    subthe pointer to the natsSubscription object to destroy.
    subthe pointer to the natsSubscription object to destroy.
    diff --git a/doc/html/group__types_group.html b/doc/html/group__types_group.html index 4630efbfe..b467b876a 100644 --- a/doc/html/group__types_group.html +++ b/doc/html/group__types_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Types @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -110,43 +93,45 @@

    Typedefs

    typedef struct __natsConnection natsConnection - A connection to a NATS Server. More...
    + A connection to a NATS Server. More...
      typedef struct __natsStatistics natsStatistics - Statistics of a natsConnection. More...
    + Statistics of a natsConnection. More...
      typedef struct __natsSubscription natsSubscription - Interest on a given subject. More...
    + Interest on a given subject. More...
      typedef struct __natsMsg natsMsg - A structure holding a subject, optional reply and payload. More...
    + A structure holding a subject, optional reply and payload. More...
      typedef struct __natsOptions natsOptions - Way to configure a natsConnection. More...
    + Way to configure a natsConnection. More...
      typedef char natsInbox - Unique subject often used for point-to-point communication. More...
    + Unique subject often used for point-to-point communication. More...
      typedef struct __stanConnection stanConnection - A connection to a NATS Streaming Server. More...
    + A connection to a NATS Streaming Server. More...
      typedef struct __stanSubscription stanSubscription - Interest on a given channel. More...
    + Interest on a given channel. More...
      typedef struct __stanMsg stanMsg - The Streaming message. More...
    + The Streaming message. More...
      typedef struct __stanConnOptions stanConnOptions - Way to configure a stanConnection. More...
    + Way to configure a stanConnection. More...
      typedef struct __stanSubOptions stanSubOptions - Way to configure a stanSubscription. More...
    + Way to configure a stanSubscription. More...
     

    Detailed Description

    NATS Types.

    Typedef Documentation

    - + +

    ◆ natsConnection

    +
    @@ -155,11 +140,13 @@

    Typedef Documentation

    -

    A natsConnection represents a bare connection to a NATS Server. It will send and receive byte array payloads.

    +

    A natsConnection represents a bare connection to a NATS Server. It will send and receive byte array payloads.

    - + +

    ◆ natsStatistics

    +
    @@ -172,7 +159,9 @@

    Typedef Documentation

    - + +

    ◆ natsSubscription

    +
    @@ -181,11 +170,13 @@

    Typedef Documentation

    -

    A natsSubscription represents interest in a given subject.

    +

    A natsSubscription represents interest in a given subject.

    - + +

    ◆ natsMsg

    +
    @@ -194,11 +185,13 @@

    Typedef Documentation

    -

    natsMsg is a structure used by Subscribers and natsConnection_PublishMsg().

    +

    natsMsg is a structure used by Subscribers and natsConnection_PublishMsg().

    - + +

    ◆ natsOptions

    +
    @@ -207,11 +200,13 @@

    Typedef Documentation

    -

    Options can be used to create a customized natsConnection.

    +

    Options can be used to create a customized natsConnection.

    - + +

    ◆ natsInbox

    +
    @@ -224,7 +219,9 @@

    Typedef Documentation

    - + +

    ◆ stanConnection

    +
    @@ -233,11 +230,13 @@

    Typedef Documentation

    -

    A stanConnection represents a connection to a NATS Streaming Server.

    +

    A stanConnection represents a connection to a NATS Streaming Server.

    - + +

    ◆ stanSubscription

    +
    @@ -246,11 +245,13 @@

    Typedef Documentation

    -

    A stanSubscription represents interest in a given channel.

    +

    A stanSubscription represents interest in a given channel.

    - + +

    ◆ stanMsg

    +
    @@ -259,11 +260,13 @@

    Typedef Documentation

    -

    stanMsg is the object passed to the subscriptions' message callbacks.

    +

    stanMsg is the object passed to the subscriptions' message callbacks.

    - + +

    ◆ stanConnOptions

    +
    @@ -272,11 +275,13 @@

    Typedef Documentation

    -

    Options can be used to create a customized stanConnection.

    +

    Options can be used to create a customized stanConnection.

    - + +

    ◆ stanSubOptions

    +
    @@ -285,7 +290,7 @@

    Typedef Documentation

    -

    Options can be used to create a customized stanSubscription.

    +

    Options can be used to create a customized stanSubscription.

    diff --git a/doc/html/group__wildcards_group.html b/doc/html/group__wildcards_group.html index ae903ce4f..1acb3ca2d 100644 --- a/doc/html/group__wildcards_group.html +++ b/doc/html/group__wildcards_group.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: Wildcards @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    diff --git a/doc/html/index.html b/doc/html/index.html index 52068a4c1..3275ba625 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -4,7 +4,7 @@ - + NATS C Client with Streaming support: NATS C client. @@ -13,16 +13,9 @@ - - @@ -33,7 +26,7 @@
    NATS C Client with Streaming support -  2.5.1 +  2.6.0
    The nats.io C Client, Supported by Synadia Communications Inc.
    @@ -42,34 +35,22 @@
    - + - + + + +
    @@ -99,7 +82,7 @@
    - +
    +
    diff --git a/doc/html/jquery.js b/doc/html/jquery.js index 1f4d0b47c..103c32d79 100644 --- a/doc/html/jquery.js +++ b/doc/html/jquery.js @@ -1,68 +1,35 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
    "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
    "),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
    "),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
    a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
    ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
    t
    ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
    ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

    ";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
    ","
    "]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
    ").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 + PowerTip v1.3.1 (2018-04-15) + https://stevenbenner.github.io/jquery-powertip/ + Copyright (c) 2018 Steven Benner (http://stevenbenner.com/). + Released under MIT license. + https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt +*/ +(function(root,factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(root.jQuery)}})(this,function($){var $document=$(document),$window=$(window),$body=$("body");var DATA_DISPLAYCONTROLLER="displayController",DATA_HASACTIVEHOVER="hasActiveHover",DATA_FORCEDOPEN="forcedOpen",DATA_HASMOUSEMOVE="hasMouseMove",DATA_MOUSEONTOTIP="mouseOnToPopup",DATA_ORIGINALTITLE="originalTitle",DATA_POWERTIP="powertip",DATA_POWERTIPJQ="powertipjq",DATA_POWERTIPTARGET="powertiptarget",EVENT_NAMESPACE=".powertip",RAD2DEG=180/Math.PI,MOUSE_EVENTS=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu"];var session={tooltips:null,isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,closeDelayTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var Collision={none:0,top:1,bottom:2,left:4,right:8};$.fn.powerTip=function(opts,arg){var targetElements=this,options,tipController;if(!targetElements.length){return targetElements}if($.type(opts)==="string"&&$.powerTip[opts]){return $.powerTip[opts].call(targetElements,targetElements,arg)}options=$.extend({},$.fn.powerTip.defaults,opts);tipController=new TooltipController(options);initTracking();targetElements.each(function elementSetup(){var $this=$(this),dataPowertip=$this.data(DATA_POWERTIP),dataElem=$this.data(DATA_POWERTIPJQ),dataTarget=$this.data(DATA_POWERTIPTARGET),title=$this.attr("title");if(!dataPowertip&&!dataTarget&&!dataElem&&title){$this.data(DATA_POWERTIP,title);$this.data(DATA_ORIGINALTITLE,title);$this.removeAttr("title")}$this.data(DATA_DISPLAYCONTROLLER,new DisplayController($this,options,tipController))});if(!options.manual){$.each(options.openEvents,function(idx,evt){if($.inArray(evt,options.closeEvents)>-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
    ');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ + * jquery.ui.widget.js + * jquery.ui.mouse.js */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('